33 #define ADDR 0x39 // device address
36 #define REG_TIMING 0x81
38 #define REG_INT_SOURCE 0x83
41 #define REG_LOW_THRESH_LOW_BYTE 0x88
42 #define REG_LOW_THRESH_HIGH_BYTE 0x89
43 #define REG_HIGH_THRESH_LOW_BYTE 0x8A
44 #define REG_HIGH_THRESH_HIGH_BYTE 0x8B
45 #define REG_BLOCK_READ 0xCF
46 #define REG_GREEN_LOW 0xD0
47 #define REG_GREEN_HIGH 0xD1
48 #define REG_RED_LOW 0xD2
49 #define REG_RED_HIGH 0xD3
50 #define REG_BLUE_LOW 0xD4
51 #define REG_BLUE_HIGH 0xD5
52 #define REG_CLEAR_LOW 0xD6
53 #define REG_CLEAR_HIGH 0xD7
54 #define CTL_DAT_INIITIATE 0x03
58 #define SYNC_EDGE 0x40
59 #define INTEG_MODE_FREE 0x00
60 #define INTEG_MODE_MANUAL 0x10
61 #define INTEG_MODE_SYN_SINGLE 0x20
62 #define INTEG_MODE_SYN_MULTI 0x30
64 #define INTEG_PARAM_PULSE_COUNT1 0x00
65 #define INTEG_PARAM_PULSE_COUNT2 0x01
66 #define INTEG_PARAM_PULSE_COUNT4 0x02
67 #define INTEG_PARAM_PULSE_COUNT8 0x03
71 #define INTR_DISABLE 0x00
72 #define INTR_LEVEL 0x10
73 #define INTR_PERSIST_EVERY 0x00
74 #define INTR_PERSIST_SINGLE 0x01
77 #define INT_SOURCE_GREEN 0x00
78 #define INT_SOURCE_RED 0x01
79 #define INT_SOURCE_BLUE 0x10
80 #define INT_SOURCE_CLEAR 0x03
87 #define PRESCALER_1 0x00
88 #define PRESCALER_2 0x01
89 #define PRESCALER_4 0x02
90 #define PRESCALER_8 0x03
91 #define PRESCALER_16 0x04
92 #define PRESCALER_32 0x05
93 #define PRESCALER_64 0x06
148 mraa_i2c_context m_i2Ctx;
150 uint16_t i2cReadReg_N (
int reg,
unsigned int len, uint8_t * buffer);
151 mraa_result_t i2cWriteReg_N (uint8_t reg,
unsigned int len, uint8_t * buffer);
152 mraa_result_t i2cWriteReg (uint8_t reg, uint8_t data);
Definition: tcs3414cs.h:100
void clearInterrupt()
Definition: tcs3414cs.cxx:92
~TCS3414CS()
Definition: tcs3414cs.cxx:74
void readRGB(tcs3414sc_rgb_t *rgb)
Definition: tcs3414cs.cxx:79
C++ API for TCS3414CS chip (Color sensor)
Definition: tcs3414cs.h:113
std::string name()
Definition: tcs3414cs.h:142
TCS3414CS()
Definition: tcs3414cs.cxx:44