driver apds9960 basic header file
uint8_t apds9960_set_gesture_dimension(apds9960_handle_t *handle, apds9960_gesture_dimension_select_t s)
set the gesture dimension
uint8_t apds9960_set_gesture_gain(apds9960_handle_t *handle, apds9960_gesture_gain_control_t gain)
set the gesture gain
uint8_t apds9960_set_als_interrupt_high_threshold(apds9960_handle_t *handle, uint16_t threshold)
set the als interrupt high threshold
uint8_t apds9960_deinit(apds9960_handle_t *handle)
close the chip
uint8_t apds9960_set_gesture_wait_time(apds9960_handle_t *handle, apds9960_gesture_wait_time_t t)
set the gesture wait time
uint8_t apds9960_set_gesture_exit_persistence(apds9960_handle_t *handle, apds9960_gesture_exit_persistence_t persistence)
set the gesture exit persistence
uint8_t apds9960_set_proximity_pulse_length(apds9960_handle_t *handle, apds9960_proximity_pulse_length_t len)
set the proximity pulse length
uint8_t apds9960_set_saturation_interrupt(apds9960_handle_t *handle, apds9960_saturation_interrupt_t saturation, apds9960_bool_t enable)
set the saturation interrupt
uint8_t apds9960_set_proximity_down_left_offset(apds9960_handle_t *handle, int8_t offset)
set the proximity down left offset
uint8_t apds9960_set_als_interrupt_cycle(apds9960_handle_t *handle, apds9960_als_interrupt_cycle_t cycle)
set the als interrupt cycle
uint8_t apds9960_gesture_fifo_clear(apds9960_handle_t *handle)
clear the gesture fifo status
uint8_t apds9960_wait_time_convert_to_register(apds9960_handle_t *handle, float ms, uint8_t *reg)
convert the wait time to the register raw data
uint8_t apds9960_read_proximity(apds9960_handle_t *handle, uint8_t *proximity)
read the proximity data
uint8_t apds9960_set_proximity_gain(apds9960_handle_t *handle, apds9960_proximity_gain_t gain)
set the proximity gain
uint8_t apds9960_adc_integration_time_convert_to_register(apds9960_handle_t *handle, float ms, uint8_t *reg)
convert the adc integration time to the register raw data
uint8_t apds9960_init(apds9960_handle_t *handle)
initialize the chip
uint8_t apds9960_set_proximity_interrupt_cycle(apds9960_handle_t *handle, apds9960_proximity_interrupt_cycle_t cycle)
set the proximity interrupt cycle
uint8_t apds9960_set_gesture_right_offset(apds9960_handle_t *handle, int8_t offset)
set the gesture right offset
uint8_t apds9960_set_gesture_fifo_threshold(apds9960_handle_t *handle, apds9960_gesture_fifo_threshold_t threshold)
set the gesture fifo threshold
uint8_t apds9960_set_proximity_pulse_count(apds9960_handle_t *handle, uint16_t count)
set the proximity pulse count
uint8_t apds9960_set_proximity_up_right_offset(apds9960_handle_t *handle, int8_t offset)
set the proximity up right offset
uint8_t apds9960_set_gesture_pulse_length(apds9960_handle_t *handle, apds9960_gesture_pulse_length_t len)
set the gesture pulse length
uint8_t apds9960_set_proximity_gain_compensation(apds9960_handle_t *handle, apds9960_bool_t enable)
enable or disable the proximity gain compensation
uint8_t apds9960_set_gesture_led_current(apds9960_handle_t *handle, apds9960_gesture_led_current_t current)
set the gesture led current
uint8_t apds9960_set_gesture_pulse_count(apds9960_handle_t *handle, uint16_t count)
set the gesture pulse count
uint8_t apds9960_set_wait_long(apds9960_handle_t *handle, apds9960_bool_t enable)
enable or disable the wait long
uint8_t apds9960_set_gesture_exit_mask(apds9960_handle_t *handle, uint8_t mask)
set the gesture exit mask
uint8_t apds9960_set_als_color_gain(apds9960_handle_t *handle, apds9960_als_color_gain_t gain)
set the als color gain
uint8_t apds9960_set_gesture_proximity_enter_threshold(apds9960_handle_t *handle, uint8_t threshold)
set the gesture proximity enter threshold
uint8_t apds9960_set_gesture_mode(apds9960_handle_t *handle, apds9960_bool_t enable)
enable or disable the gesture mode
uint8_t apds9960_set_led_boost(apds9960_handle_t *handle, apds9960_led_boost_t boost)
set the led boost
struct apds9960_handle_s apds9960_handle_t
apds9960 handle structure definition
uint8_t apds9960_set_sleep_after_interrupt(apds9960_handle_t *handle, apds9960_bool_t enable)
enable or disable sleeping after interrupt
uint8_t apds9960_read_rgbc(apds9960_handle_t *handle, uint16_t *red, uint16_t *green, uint16_t *blue, uint16_t *clear)
read the rgbc data
uint8_t apds9960_all_non_gesture_interrupt_clear(apds9960_handle_t *handle)
clear the all not gesture interrupt
uint8_t apds9960_set_conf(apds9960_handle_t *handle, apds9960_conf_t conf, apds9960_bool_t enable)
set the configuration
uint8_t apds9960_set_als_interrupt_low_threshold(apds9960_handle_t *handle, uint16_t threshold)
set the als interrupt low threshold
uint8_t apds9960_set_gesture_up_offset(apds9960_handle_t *handle, int8_t offset)
set the gesture up offset
uint8_t apds9960_set_gesture_interrupt(apds9960_handle_t *handle, apds9960_bool_t enable)
enable or disable the gesture interrupt
uint8_t apds9960_set_proximity_interrupt_low_threshold(apds9960_handle_t *handle, uint8_t threshold)
set the proximity interrupt low threshold
uint8_t apds9960_set_gesture_left_offset(apds9960_handle_t *handle, int8_t offset)
set the gesture left offset
uint8_t apds9960_set_adc_integration_time(apds9960_handle_t *handle, uint8_t integration_time)
set the adc integration time
uint8_t apds9960_set_led_current(apds9960_handle_t *handle, apds9960_led_current_t current)
set the led current
uint8_t apds9960_set_proximity_interrupt_high_threshold(apds9960_handle_t *handle, uint8_t threshold)
set the proximity interrupt high threshold
uint8_t apds9960_set_wait_time(apds9960_handle_t *handle, uint8_t wait_time)
set the wait time
uint8_t apds9960_set_gesture_proximity_exit_threshold(apds9960_handle_t *handle, uint8_t threshold)
set the gesture proximity exit threshold
uint8_t apds9960_set_proximity_mask(apds9960_handle_t *handle, apds9960_proximity_mask_t mask, apds9960_bool_t enable)
enable or disable the proximity mask
uint8_t apds9960_set_gesture_down_offset(apds9960_handle_t *handle, int8_t offset)
set the gesture down offset
@ APDS9960_PROXIMITY_MASK_RIGHT
@ APDS9960_PROXIMITY_MASK_DOWN
@ APDS9960_PROXIMITY_MASK_UP
@ APDS9960_PROXIMITY_MASK_LEFT
@ APDS9960_SATURATION_INTERRUPT_PROXIMITY
@ APDS9960_SATURATION_INTERRUPT_CLEAR_PHOTODIODE
@ APDS9960_CONF_WAIT_ENABLE
@ APDS9960_CONF_ALS_ENABLE
@ APDS9960_CONF_PROXIMITY_DETECT_ENABLE
@ APDS9960_CONF_GESTURE_ENABLE
@ APDS9960_CONF_PROXIMITY_INTERRUPT_ENABLE
@ APDS9960_CONF_ALS_INTERRUPT_ENABLE
#define APDS9960_BASIC_DEFAULT_GESTURE_GAIN
#define APDS9960_BASIC_DEFAULT_GESTURE_PROXIMITY_ENTER_THRESHOLD
#define APDS9960_BASIC_DEFAULT_GESTURE_RIGHT_OFFSET
#define APDS9960_BASIC_DEFAULT_PROXIMITY_INTERRUPT_CYCLE
#define APDS9960_BASIC_DEFAULT_GESTURE_PULSE_COUNT
#define APDS9960_BASIC_DEFAULT_SATURATION_INTERRUPT_PROXIMITY
#define APDS9960_BASIC_DEFAULT_ALS_INTERRUPT_CYCLE
#define APDS9960_BASIC_DEFAULT_WAIT_TIME
#define APDS9960_BASIC_DEFAULT_ADC_INTEGRATION_TIME
apds9960 basic example default definition
#define APDS9960_BASIC_DEFAULT_PROXIMITY_MASK_UP
#define APDS9960_BASIC_DEFAULT_PROXIMITY_MASK_DOWN
#define APDS9960_BASIC_DEFAULT_PROXIMITY_INTERRUPT_HIGH_THRESHOLD
#define APDS9960_BASIC_DEFAULT_PROXIMITY_UP_RIGHT_OFFSET
#define APDS9960_BASIC_DEFAULT_SLEEP_AFTER_INTERRUPT
#define APDS9960_BASIC_DEFAULT_PROXIMITY_MASK_LEFT
#define APDS9960_BASIC_DEFAULT_PROXIMITY_DOWN_LEFT_OFFSET
#define APDS9960_BASIC_DEFAULT_GESTURE_INTERRUPT
#define APDS9960_BASIC_DEFAULT_ALS_COLOR_GAIN
#define APDS9960_BASIC_DEFAULT_GESTURE_DIMENSION
#define APDS9960_BASIC_DEFAULT_PROXIMITY_INTERRUPT_LOW_THRESHOLD
#define APDS9960_BASIC_DEFAULT_PROXIMITY_PULSE_COUNT
#define APDS9960_BASIC_DEFAULT_ALS_INTERRUPT_HIGH_THRESHOLD
uint8_t apds9960_basic_deinit(void)
basic example deinit
#define APDS9960_BASIC_DEFAULT_GESTURE_PULSE_LENGTH
#define APDS9960_BASIC_DEFAULT_GESTURE_LEFT_OFFSET
#define APDS9960_BASIC_DEFAULT_ALS_INTERRUPT_LOW_THRESHOLD
#define APDS9960_BASIC_DEFAULT_GESTURE_PROXIMITY_EXIT_THRESHOLD
#define APDS9960_BASIC_DEFAULT_PROXIMITY_MASK_RIGHT
#define APDS9960_BASIC_DEFAULT_GESTURE_DOWN_OFFSET
#define APDS9960_BASIC_DEFAULT_GESTURE_EXIT_MASK
#define APDS9960_BASIC_DEFAULT_SATURATION_INTERRUPT_CLEAR_PHOTODIODE
#define APDS9960_BASIC_DEFAULT_GESTURE_EXIT_PERSISTENCE
#define APDS9960_BASIC_DEFAULT_PROXIMITY_GAIN_COMPENSATION
#define APDS9960_BASIC_DEFAULT_GESTURE_WAIT_TIME
#define APDS9960_BASIC_DEFAULT_LED_BOOST
#define APDS9960_BASIC_DEFAULT_PROXIMITY_GAIN
#define APDS9960_BASIC_DEFAULT_GESTURE_UP_OFFSET
#define APDS9960_BASIC_DEFAULT_GESTURE_LED_CURRENT
uint8_t apds9960_basic_init(void)
basic example init
#define APDS9960_BASIC_DEFAULT_PROXIMITY_PULSE_LENGTH
uint8_t apds9960_basic_read_proximity(uint8_t *proximity)
basic example read proximity
uint8_t apds9960_basic_read_rgbc(uint16_t *red, uint16_t *green, uint16_t *blue, uint16_t *clear)
basic example read rgbc
#define APDS9960_BASIC_DEFAULT_GESTURE_FIFO_THRESHOLD
#define APDS9960_BASIC_DEFAULT_LED_CURRENT
uint8_t apds9960_interface_iic_init(void)
interface iic bus init
uint8_t apds9960_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
void apds9960_interface_receive_callback(uint8_t type)
interface receive callback
void apds9960_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t apds9960_interface_iic_deinit(void)
interface iic bus deinit
uint8_t apds9960_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
void apds9960_interface_debug_print(const char *const fmt,...)
interface print format data
#define DRIVER_APDS9960_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_APDS9960_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_APDS9960_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function
#define DRIVER_APDS9960_LINK_INIT(HANDLE, STRUCTURE)
initialize apds9960_handle_t structure
#define DRIVER_APDS9960_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_APDS9960_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_APDS9960_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_APDS9960_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
link receive_callback function