53 uint16_t threshold_check;
653 threshold = rand() % 0xFFFFU;
676 threshold = rand() % 0xFFFFU;
driver veml7700 register test header file
uint8_t veml7700_get_interrupt_status(veml7700_handle_t *handle, veml7700_bool_t *low_threshold, veml7700_bool_t *high_threshold)
get interrupt status
uint8_t veml7700_set_als_integration_time(veml7700_handle_t *handle, veml7700_als_integration_time_t t)
set als integration time
veml7700_bool_t
veml7700 bool enumeration definition
uint8_t veml7700_deinit(veml7700_handle_t *handle)
close the chip
uint8_t veml7700_set_als_interrupt(veml7700_handle_t *handle, veml7700_bool_t enable)
enable or disable als interrupt
uint8_t veml7700_get_als_persistence(veml7700_handle_t *handle, veml7700_als_persistence_t *persistence)
get als persistence
uint8_t veml7700_get_power_saving_mode(veml7700_handle_t *handle, veml7700_power_saving_mode_t *mode)
get power saving mode
uint8_t veml7700_info(veml7700_info_t *info)
get chip's information
uint8_t veml7700_get_als_low_threshold(veml7700_handle_t *handle, uint16_t *threshold)
get als low threshold
struct veml7700_info_s veml7700_info_t
veml7700 information structure definition
uint8_t veml7700_init(veml7700_handle_t *handle)
initialize the chip
uint8_t veml7700_set_als_mode(veml7700_handle_t *handle, veml7700_als_mode_t mode)
set als mode
uint8_t veml7700_set_als_gain(veml7700_handle_t *handle, veml7700_als_gain_t gain)
set als gain
veml7700_power_saving_mode_t
veml7700 power saving mode enumeration definition
uint8_t veml7700_get_als_gain(veml7700_handle_t *handle, veml7700_als_gain_t *gain)
get als gain
uint8_t veml7700_get_als_high_threshold(veml7700_handle_t *handle, uint16_t *threshold)
get als high threshold
struct veml7700_handle_s veml7700_handle_t
veml7700 handle structure definition
uint8_t veml7700_get_als_interrupt(veml7700_handle_t *handle, veml7700_bool_t *enable)
get als interrupt status
veml7700_als_integration_time_t
veml7700 als integration time enumeration definition
uint8_t veml7700_set_als_persistence(veml7700_handle_t *handle, veml7700_als_persistence_t persistence)
set als persistence
veml7700_als_gain_t
veml7700 als gain enumeration definition
uint8_t veml7700_set_als_low_threshold(veml7700_handle_t *handle, uint16_t threshold)
set als low threshold
uint8_t veml7700_get_als_integration_time(veml7700_handle_t *handle, veml7700_als_integration_time_t *t)
get als integration time
uint8_t veml7700_set_als_high_threshold(veml7700_handle_t *handle, uint16_t threshold)
set als high threshold
uint8_t veml7700_get_auto_range(veml7700_handle_t *handle, veml7700_bool_t *enable)
get auto range
uint8_t veml7700_get_power_saving(veml7700_handle_t *handle, veml7700_bool_t *enable)
get power saving status
uint8_t veml7700_set_auto_range(veml7700_handle_t *handle, veml7700_bool_t enable)
set auto range
veml7700_als_persistence_t
veml7700 als persistence enumeration definition
veml7700_als_mode_t
veml7700 als mode enumeration definition
uint8_t veml7700_set_power_saving(veml7700_handle_t *handle, veml7700_bool_t enable)
enable or disable power saving
uint8_t veml7700_set_power_saving_mode(veml7700_handle_t *handle, veml7700_power_saving_mode_t mode)
set power saving mode
uint8_t veml7700_get_als_mode(veml7700_handle_t *handle, veml7700_als_mode_t *mode)
get als mode
@ VEML7700_POWER_SAVING_MODE3
@ VEML7700_POWER_SAVING_MODE2
@ VEML7700_POWER_SAVING_MODE4
@ VEML7700_POWER_SAVING_MODE1
@ VEML7700_ALS_INTEGRATION_TIME_400MS
@ VEML7700_ALS_INTEGRATION_TIME_50MS
@ VEML7700_ALS_INTEGRATION_TIME_25MS
@ VEML7700_ALS_INTEGRATION_TIME_200MS
@ VEML7700_ALS_INTEGRATION_TIME_800MS
@ VEML7700_ALS_INTEGRATION_TIME_100MS
@ VEML7700_ALS_GAIN_1_DIV_4
@ VEML7700_ALS_GAIN_1_DIV_8
@ VEML7700_ALS_PERSISTENCE_1
@ VEML7700_ALS_PERSISTENCE_2
@ VEML7700_ALS_PERSISTENCE_8
@ VEML7700_ALS_PERSISTENCE_4
@ VEML7700_ALS_MODE_SHUT_DOWN
@ VEML7700_ALS_MODE_POWER_ON
uint8_t veml7700_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
void veml7700_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t veml7700_interface_iic_init(void)
interface iic bus init
void veml7700_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t veml7700_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
uint8_t veml7700_interface_iic_deinit(void)
interface iic bus deinit
#define DRIVER_VEML7700_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_VEML7700_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_VEML7700_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function
#define DRIVER_VEML7700_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_VEML7700_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_VEML7700_LINK_INIT(HANDLE, STRUCTURE)
initialize veml7700_handle_t structure
#define DRIVER_VEML7700_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
uint8_t veml7700_register_test(void)
register test
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v