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
81 static const unsigned int MAX_PKT_LEN = 128;
95 GROVESCAM(
int uart, uint8_t camAddr=GROVESCAM_DEFAULT_CAMERA_ADDR);
120 int readData(uint8_t *buffer,
int len);
138 bool setupTty(speed_t baud=B115200);
157 bool preCapture(PIC_FORMATS_T fmt=FORMAT_VGA);
183 int ttyFd() {
return m_ttyFd; };
186 mraa_uart_context m_uart;
bool doCapture()
Definition: grovescam.cxx:282
int writeData(uint8_t *buffer, int len)
Definition: grovescam.cxx:132
API for the Grove Serial Camera.
Definition: grovescam.h:78
int readData(uint8_t *buffer, int len)
Definition: grovescam.cxx:114
bool init()
Definition: grovescam.cxx:194
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:392
void drainInput()
Definition: grovescam.cxx:186
bool setupTty(speed_t baud=B115200)
Definition: grovescam.cxx:156
bool dataAvailable(unsigned int millis)
Definition: grovescam.cxx:82
~GROVESCAM()
Definition: grovescam.cxx:76
int getImageSize()
Definition: grovescam.h:180