39 #include <sys/select.h> 40 #include <sys/types.h> 43 #include <mraa/uart.h> 45 #define GROVESCAM_DEFAULT_UART 0 47 #define GROVESCAM_DEFAULT_CAMERA_ADDR 0 83 static const unsigned int MAX_PKT_LEN = 128;
97 GROVESCAM(
int uart, uint8_t camAddr=GROVESCAM_DEFAULT_CAMERA_ADDR);
122 int readData(uint8_t *buffer,
int len);
140 bool setupTty(speed_t baud=B115200);
159 bool preCapture(PIC_FORMATS_T fmt=FORMAT_VGA);
185 int ttyFd() {
return m_ttyFd; };
188 mraa_uart_context m_uart;
bool doCapture()
Definition: grovescam.cxx:283
int writeData(uint8_t *buffer, int len)
Definition: grovescam.cxx:131
API for the Grove Serial Camera.
Definition: grovescam.hpp:80
int readData(uint8_t *buffer, int len)
Definition: grovescam.cxx:113
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
bool init()
Definition: grovescam.cxx:193
bool preCapture(PIC_FORMATS_T fmt=FORMAT_VGA)
Definition: grovescam.cxx:246
GROVESCAM(int uart, uint8_t camAddr=GROVESCAM_DEFAULT_CAMERA_ADDR)
Definition: grovescam.cxx:39
bool storeImage(const char *fname)
Definition: grovescam.cxx:394
void drainInput()
Definition: grovescam.cxx:185
bool setupTty(speed_t baud=B115200)
Definition: grovescam.cxx:155
bool dataAvailable(unsigned int millis)
Definition: grovescam.cxx:82
~GROVESCAM()
Definition: grovescam.cxx:76
int getImageSize()
Definition: grovescam.hpp:182