Driver for the TCS3472 RGB color light-to-digital converter with IR blocking filter. More...
![]() |
Data Structures | |
struct | driver_tcs3472_rgbc_t |
TCS3472 RGBC color data. More... | |
struct | driver_tcs3472_t |
TCS3472 sensor driver structure. More... | |
Enumerations | |
enum | driver_tcs3472_gain_t { TCS3472_GAIN_1X = 0x00, TCS3472_GAIN_4X = 0x01, TCS3472_GAIN_16X = 0x02, TCS3472_GAIN_60X = 0x03 } |
TCS3472 gain settings. More... | |
enum | driver_tcs3472_integration_time_t { TCS3472_INTEGRATION_2_4MS = 0xFF, TCS3472_INTEGRATION_24MS = 0xF6, TCS3472_INTEGRATION_50MS = 0xEB, TCS3472_INTEGRATION_101MS = 0xD5, TCS3472_INTEGRATION_154MS = 0xC0, TCS3472_INTEGRATION_700MS = 0x00 } |
TCS3472 integration time presets. More... | |
Functions | |
bool | driver_tcs3472_init (driver_tcs3472_t *driver, hw_i2c_t *i2c) |
Initialize the TCS3472 sensor with default settings. More... | |
bool | driver_tcs3472_init_with_config (driver_tcs3472_t *driver, hw_i2c_t *i2c, driver_tcs3472_gain_t gain, driver_tcs3472_integration_time_t integration) |
Initialize the TCS3472 sensor with custom settings. More... | |
void | driver_tcs3472_finalize (driver_tcs3472_t *driver) |
Finalize and power down the TCS3472 sensor. More... | |
bool | driver_tcs3472_read (driver_tcs3472_t *driver, driver_tcs3472_rgbc_t *data) |
Read RGBC color data. More... | |
Driver for the TCS3472 RGB color light-to-digital converter with IR blocking filter.
TCS3472 gain settings.
Enumerator | |
---|---|
TCS3472_GAIN_1X | 1x gain |
TCS3472_GAIN_4X | 4x gain |
TCS3472_GAIN_16X | 16x gain |
TCS3472_GAIN_60X | 60x gain |
Definition at line 22 of file drivers_tcs3472.h.
TCS3472 integration time presets.
Definition at line 33 of file drivers_tcs3472.h.
void driver_tcs3472_finalize | ( | driver_tcs3472_t * | driver | ) |
Finalize and power down the TCS3472 sensor.
driver | Pointer to the TCS3472 driver structure |
bool driver_tcs3472_init | ( | driver_tcs3472_t * | driver, |
hw_i2c_t * | i2c | ||
) |
Initialize the TCS3472 sensor with default settings.
driver | Pointer to the TCS3472 driver structure |
i2c | Pointer to an initialized I2C bus handle |
Initializes the sensor with:
bool driver_tcs3472_init_with_config | ( | driver_tcs3472_t * | driver, |
hw_i2c_t * | i2c, | ||
driver_tcs3472_gain_t | gain, | ||
driver_tcs3472_integration_time_t | integration | ||
) |
Initialize the TCS3472 sensor with custom settings.
driver | Pointer to the TCS3472 driver structure |
i2c | Pointer to an initialized I2C bus handle |
gain | Gain setting |
integration | Integration time setting |
bool driver_tcs3472_read | ( | driver_tcs3472_t * | driver, |
driver_tcs3472_rgbc_t * | data | ||
) |
Read RGBC color data.
driver | Pointer to the TCS3472 driver structure |
data | Pointer to structure to receive RGBC data |