39 #include <sys/select.h> 40 #include <sys/types.h> 43 #include <mraa/uart.h> 45 #define SCAM_DEFAULT_UART 0 47 #define SCAM_DEFAULT_CAMERA_ADDR 0 82 static const unsigned int MAX_PKT_LEN = 128;
96 SCAM(
int uart, uint8_t camAddr=SCAM_DEFAULT_CAMERA_ADDR);
121 int readData(uint8_t *buffer,
int len);
139 bool setupTty(speed_t baud=B115200);
158 bool preCapture(PIC_FORMATS_T fmt=FORMAT_VGA);
184 int ttyFd() {
return m_ttyFd; };
187 mraa_uart_context m_uart;
SCAM(int uart, uint8_t camAddr=SCAM_DEFAULT_CAMERA_ADDR)
Definition: scam.cxx:39
int readData(uint8_t *buffer, int len)
Definition: scam.cxx:113
bool storeImage(const char *fname)
Definition: scam.cxx:394
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
bool setupTty(speed_t baud=B115200)
Definition: scam.cxx:155
int getImageSize()
Definition: scam.hpp:181
API for the Serial Camera.
Definition: scam.hpp:79
~SCAM()
Definition: scam.cxx:76
bool dataAvailable(unsigned int millis)
Definition: scam.cxx:82
bool doCapture()
Definition: scam.cxx:283
bool init()
Definition: scam.cxx:193
bool preCapture(PIC_FORMATS_T fmt=FORMAT_VGA)
Definition: scam.cxx:246
void drainInput()
Definition: scam.cxx:185
int writeData(uint8_t *buffer, int len)
Definition: scam.cxx:131