212 for (i = 0; i < times; i++)
214 uint16_t red, green, blue, clear;
217 if (
tcs34725_read_rgbc(&gs_handle, (uint16_t *)&red, (uint16_t *)&green, (uint16_t *)&blue, (uint16_t *)&clear) != 0)
242 for (i = 0; i < times; i++)
244 uint16_t red, green, blue, clear;
247 if (
tcs34725_read_rgbc(&gs_handle, (uint16_t *)&red, (uint16_t *)&green, (uint16_t *)&blue, (uint16_t *)&clear) != 0)
272 for (i = 0; i < times; i++)
274 uint16_t red, green, blue, clear;
277 if (
tcs34725_read_rgbc(&gs_handle, (uint16_t *)&red, (uint16_t *)&green, (uint16_t *)&blue, (uint16_t *)&clear) != 0)
302 for (i = 0; i < times; i++)
304 uint16_t red, green, blue, clear;
307 if (
tcs34725_read_rgbc(&gs_handle, (uint16_t *)&red, (uint16_t *)&green, (uint16_t *)&blue, (uint16_t *)&clear) != 0)
343 for (i = 0; i < times; i++)
345 uint16_t red, green, blue, clear;
348 if (
tcs34725_read_rgbc(&gs_handle, (uint16_t *)&red, (uint16_t *)&green, (uint16_t *)&blue, (uint16_t *)&clear) != 0)
373 for (i = 0; i < times; i++)
375 uint16_t red, green, blue, clear;
378 if (
tcs34725_read_rgbc(&gs_handle, (uint16_t *)&red, (uint16_t *)&green, (uint16_t *)&blue, (uint16_t *)&clear) != 0)
403 for (i = 0; i < times; i++)
405 uint16_t red, green, blue, clear;
408 if (
tcs34725_read_rgbc(&gs_handle, (uint16_t *)&red, (uint16_t *)&green, (uint16_t *)&blue, (uint16_t *)&clear) != 0)
433 for (i = 0; i < times; i++)
435 uint16_t red, green, blue, clear;
438 if (
tcs34725_read_rgbc(&gs_handle, (uint16_t *)&red, (uint16_t *)&green, (uint16_t *)&blue, (uint16_t *)&clear) != 0)
463 for (i = 0; i < times; i++)
465 uint16_t red, green, blue, clear;
468 if (
tcs34725_read_rgbc(&gs_handle, (uint16_t *)&red, (uint16_t *)&green, (uint16_t *)&blue, (uint16_t *)&clear) != 0)
493 for (i = 0; i < times; i++)
495 uint16_t red, green, blue, clear;
498 if (
tcs34725_read_rgbc(&gs_handle, (uint16_t *)&red, (uint16_t *)&green, (uint16_t *)&blue, (uint16_t *)&clear) != 0)
driver tcs34725 read test header file
uint8_t tcs34725_set_rgbc_integration_time(tcs34725_handle_t *handle, tcs34725_integration_time_t t)
set the rgbc adc integration time
uint8_t tcs34725_deinit(tcs34725_handle_t *handle)
close the chip
struct tcs34725_info_s tcs34725_info_t
tcs34725 information structure definition
uint8_t tcs34725_set_gain(tcs34725_handle_t *handle, tcs34725_gain_t gain)
set the adc gain
uint8_t tcs34725_set_rgbc(tcs34725_handle_t *handle, tcs34725_bool_t enable)
enable or disable the rgbc adc
uint8_t tcs34725_set_wait_time(tcs34725_handle_t *handle, tcs34725_wait_time_t t)
set the wait time
uint8_t tcs34725_set_power_on(tcs34725_handle_t *handle, tcs34725_bool_t enable)
enable or disable the power
uint8_t tcs34725_info(tcs34725_info_t *info)
get chip information
struct tcs34725_handle_s tcs34725_handle_t
tcs34725 handle structure definition
uint8_t tcs34725_init(tcs34725_handle_t *handle)
initialize the chip
uint8_t tcs34725_read_rgbc(tcs34725_handle_t *handle, uint16_t *red, uint16_t *green, uint16_t *blue, uint16_t *clear)
read the rgbc data
uint8_t tcs34725_set_wait(tcs34725_handle_t *handle, tcs34725_bool_t enable)
enable or disable the wait time
@ TCS34725_WAIT_TIME_2P4MS
@ TCS34725_INTEGRATION_TIME_700MS
@ TCS34725_INTEGRATION_TIME_50MS
@ TCS34725_INTEGRATION_TIME_24MS
@ TCS34725_INTEGRATION_TIME_101MS
@ TCS34725_INTEGRATION_TIME_2P4MS
@ TCS34725_INTEGRATION_TIME_154MS
void tcs34725_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t tcs34725_interface_iic_init(void)
interface iic bus init
uint8_t tcs34725_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
uint8_t tcs34725_interface_iic_deinit(void)
interface iic bus deinit
uint8_t tcs34725_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
void tcs34725_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t tcs34725_set_rgbc_clear_high_interrupt_threshold(tcs34725_handle_t *handle, uint16_t threshold)
set the rgbc clear high interrupt threshold
uint8_t tcs34725_set_rgbc_interrupt(tcs34725_handle_t *handle, tcs34725_bool_t enable)
enable or disable the rgbc interrupt
uint8_t tcs34725_set_rgbc_clear_low_interrupt_threshold(tcs34725_handle_t *handle, uint16_t threshold)
set the rgbc clear low interrupt threshold
uint8_t tcs34725_set_interrupt_mode(tcs34725_handle_t *handle, tcs34725_interrupt_mode_t mode)
set the interrupt mode
@ TCS34725_INTERRUPT_MODE_1_CLEAR_CHANNEL_OUT_OF_THRESHOLD
#define DRIVER_TCS34725_LINK_INIT(HANDLE, STRUCTURE)
initialize tcs34725_handle_t structure
#define DRIVER_TCS34725_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_TCS34725_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_TCS34725_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_TCS34725_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function
#define DRIVER_TCS34725_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_TCS34725_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
uint8_t tcs34725_read_test(uint32_t times)
read test
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v