104#if (MAX44009_BASIC_DEFAULT_AUTO_RANGE != MAX44009_BOOL_FALSE)
driver max44009 interrupt header file
uint8_t max44009_read(max44009_handle_t *handle, uint16_t *raw, float *lux)
read data
uint8_t max44009_set_integration_time(max44009_handle_t *handle, max44009_integration_time_t t)
set integration time
uint8_t max44009_set_current_div_8(max44009_handle_t *handle, max44009_bool_t enable)
enable or disable current div 8
uint8_t max44009_set_interrupt_high_threshold(max44009_handle_t *handle, uint8_t threshold)
set interrupt high threshold
struct max44009_handle_s max44009_handle_t
max44009 handle structure definition
uint8_t max44009_threshold_convert_to_register(max44009_handle_t *handle, float lux, uint8_t *reg)
convert the threshold to the register raw data
uint8_t max44009_set_addr_pin(max44009_handle_t *handle, max44009_address_t addr_pin)
set the address pin
uint8_t max44009_set_interrupt_low_threshold(max44009_handle_t *handle, uint8_t threshold)
set interrupt low threshold
uint8_t max44009_set_continuous_mode(max44009_handle_t *handle, max44009_bool_t enable)
enable or disable continuous mode
max44009_address_t
max44009 address enumeration definition
uint8_t max44009_set_interrupt(max44009_handle_t *handle, max44009_bool_t enable)
enable or disable interrupt
uint8_t max44009_deinit(max44009_handle_t *handle)
close the chip
uint8_t max44009_init(max44009_handle_t *handle)
initialize the chip
uint8_t max44009_set_auto_range(max44009_handle_t *handle, max44009_bool_t enable)
enable or disable auto range
uint8_t max44009_set_threshold_timer(max44009_handle_t *handle, uint8_t t)
set threshold timer
uint8_t max44009_timer_convert_to_register(max44009_handle_t *handle, float ms, uint8_t *reg)
convert the timer to the register raw data
uint8_t max44009_interrupt_init(max44009_address_t addr_pin, float low_threshold_lux, float high_threshold_lux, float time_ms)
interrupt example init
#define MAX44009_INTERRUPT_DEFAULT_AUTO_RANGE
max44009 interrupt example default definition
#define MAX44009_INTERRUPT_DEFAULT_INTEGRATION_TIME
uint8_t max44009_interrupt_read(float *lux)
interrupt example read
#define MAX44009_INTERRUPT_DEFAULT_CONTINUOUS_MODE
uint8_t max44009_interrupt_deinit(void)
interrupt example deinit
#define MAX44009_INTERRUPT_DEFAULT_CURRENT_DIV_8
void max44009_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t max44009_interface_iic_init(void)
interface iic bus init
uint8_t max44009_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
uint8_t max44009_interface_iic_deinit(void)
interface iic bus deinit
uint8_t max44009_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
void max44009_interface_delay_ms(uint32_t ms)
interface delay ms
#define DRIVER_MAX44009_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_MAX44009_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_MAX44009_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_MAX44009_LINK_INIT(HANDLE, STRUCTURE)
initialize max44009_handle_t structure
#define DRIVER_MAX44009_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_MAX44009_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function
#define DRIVER_MAX44009_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function