LibDriver APDS9960
Loading...
Searching...
No Matches
driver_apds9960.h File Reference

driver apds9960 header file More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for driver_apds9960.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  apds9960_handle_s
 apds9960 handle structure definition More...
struct  apds9960_info_s
 apds9960 information structure definition More...

Macros

#define APDS9960_GESTURE_THRESHOLD   10
 apds9960 gesture algorithm params definition
#define APDS9960_GESTURE_SENSITIVITY_1   50
#define APDS9960_GESTURE_SENSITIVITY_2   20
#define DRIVER_APDS9960_LINK_INIT(HANDLE, STRUCTURE)
 initialize apds9960_handle_t structure
#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_READ(HANDLE, FUC)
 link iic_read function
#define DRIVER_APDS9960_LINK_IIC_WRITE(HANDLE, FUC)
 link iic_write 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

Typedefs

typedef struct apds9960_handle_s apds9960_handle_t
 apds9960 handle structure definition
typedef struct apds9960_info_s apds9960_info_t
 apds9960 information structure definition

Enumerations

enum  apds9960_bool_t { APDS9960_BOOL_FALSE = 0x00 , APDS9960_BOOL_TRUE = 0x01 }
 apds9960 bool enumeration definition More...
enum  apds9960_conf_t {
  APDS9960_CONF_GESTURE_ENABLE = 6 , APDS9960_CONF_PROXIMITY_INTERRUPT_ENABLE = 5 , APDS9960_CONF_ALS_INTERRUPT_ENABLE = 4 , APDS9960_CONF_WAIT_ENABLE = 3 ,
  APDS9960_CONF_PROXIMITY_DETECT_ENABLE = 2 , APDS9960_CONF_ALS_ENABLE = 1 , APDS9960_CONF_POWER_ON = 0
}
 apds9960 conf enumeration definition More...
enum  apds9960_proximity_interrupt_cycle_t {
  APDS9960_PROXIMITY_INTERRUPT_CYCLE_EVERY = 0 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_ANY = 1 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_2 = 2 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_3 = 3 ,
  APDS9960_PROXIMITY_INTERRUPT_CYCLE_4 = 4 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_5 = 5 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_6 = 6 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_7 = 7 ,
  APDS9960_PROXIMITY_INTERRUPT_CYCLE_8 = 8 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_9 = 9 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_10 = 10 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_11 = 11 ,
  APDS9960_PROXIMITY_INTERRUPT_CYCLE_12 = 12 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_13 = 13 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_14 = 14 , APDS9960_PROXIMITY_INTERRUPT_CYCLE_15 = 15
}
 apds9960 proximity interrupt cycle enumeration definition More...
enum  apds9960_als_interrupt_cycle_t {
  APDS9960_ALS_INTERRUPT_CYCLE_EVERY = 0 , APDS9960_ALS_INTERRUPT_CYCLE_ANY = 1 , APDS9960_ALS_INTERRUPT_CYCLE_2 = 2 , APDS9960_ALS_INTERRUPT_CYCLE_3 = 3 ,
  APDS9960_ALS_INTERRUPT_CYCLE_5 = 4 , APDS9960_ALS_INTERRUPT_CYCLE_10 = 5 , APDS9960_ALS_INTERRUPT_CYCLE_15 = 6 , APDS9960_ALS_INTERRUPT_CYCLE_20 = 7 ,
  APDS9960_ALS_INTERRUPT_CYCLE_25 = 8 , APDS9960_ALS_INTERRUPT_CYCLE_30 = 9 , APDS9960_ALS_INTERRUPT_CYCLE_35 = 10 , APDS9960_ALS_INTERRUPT_CYCLE_40 = 11 ,
  APDS9960_ALS_INTERRUPT_CYCLE_45 = 12 , APDS9960_ALS_INTERRUPT_CYCLE_50 = 13 , APDS9960_ALS_INTERRUPT_CYCLE_55 = 14 , APDS9960_ALS_INTERRUPT_CYCLE_60 = 15
}
 apds9960 als interrupt cycle enumeration definition More...
enum  apds9960_proximity_pulse_length_t { APDS9960_PROXIMITY_PULSE_LENGTH_4_US = 0x00 , APDS9960_PROXIMITY_PULSE_LENGTH_8_US = 0x01 , APDS9960_PROXIMITY_PULSE_LENGTH_16_US = 0x02 , APDS9960_PROXIMITY_PULSE_LENGTH_32_US = 0x03 }
 apds9960 proximity pulse length enumeration definition More...
enum  apds9960_led_current_t { APDS9960_LED_CURRENT_100_MA = 0x00 , APDS9960_LED_CURRENT_50_MA = 0x01 , APDS9960_LED_CURRENT_25_MA = 0x02 , APDS9960_LED_CURRENT_12P5_MA = 0x03 }
 apds9960 led current enumeration definition More...
enum  apds9960_proximity_gain_t { APDS9960_PROXIMITY_GAIN_1X = 0x00 , APDS9960_PROXIMITY_GAIN_2X = 0x01 , APDS9960_PROXIMITY_GAIN_4X = 0x02 , APDS9960_PROXIMITY_GAIN_8X = 0x03 }
 apds9960 proximity gain enumeration definition More...
enum  apds9960_als_color_gain_t { APDS9960_ALS_COLOR_GAIN_1X = 0x00 , APDS9960_ALS_COLOR_GAIN_4X = 0x01 , APDS9960_ALS_COLOR_GAIN_16X = 0x02 , APDS9960_ALS_COLOR_GAIN_64X = 0x03 }
 apds9960 als and color gain enumeration definition More...
enum  apds9960_saturation_interrupt_t { APDS9960_SATURATION_INTERRUPT_PROXIMITY = 7 , APDS9960_SATURATION_INTERRUPT_CLEAR_PHOTODIODE = 6 }
 apds9960 saturation interrupt enumeration definition More...
enum  apds9960_led_boost_t { APDS9960_LED_BOOST_100_PERCENTAGE = 0x00 , APDS9960_LED_BOOST_150_PERCENTAGE = 0x01 , APDS9960_LED_BOOST_200_PERCENTAGE = 0x02 , APDS9960_LED_BOOST_300_PERCENTAGE = 0x03 }
 apds9960 led boost enumeration definition More...
enum  apds9960_status_t {
  APDS9960_STATUS_CPSAT = 7 , APDS9960_STATUS_PGSAT = 6 , APDS9960_STATUS_PINT = 5 , APDS9960_STATUS_AINT = 4 ,
  APDS9960_STATUS_GINT = 2 , APDS9960_STATUS_PVALID = 1 , APDS9960_STATUS_AVALID = 0
}
 apds9960 status enumeration definition More...
enum  apds9960_proximity_mask_t { APDS9960_PROXIMITY_MASK_UP = 3 , APDS9960_PROXIMITY_MASK_DOWN = 2 , APDS9960_PROXIMITY_MASK_LEFT = 1 , APDS9960_PROXIMITY_MASK_RIGHT = 0 }
 apds9960 proximity mask enumeration definition More...
enum  apds9960_gesture_fifo_threshold_t { APDS9960_GESTURE_FIFO_THRESHOLD_1_DATASET = 0 , APDS9960_GESTURE_FIFO_THRESHOLD_4_DATASET = 1 , APDS9960_GESTURE_FIFO_THRESHOLD_8_DATASET = 2 , APDS9960_GESTURE_FIFO_THRESHOLD_16_DATASET = 3 }
 apds9960 gesture fifo threshold enumeration definition More...
enum  apds9960_gesture_exit_persistence_t { APDS9960_GESTURE_EXIT_PERSISTENCE_1ST = 0 , APDS9960_GESTURE_EXIT_PERSISTENCE_2ND = 1 , APDS9960_GESTURE_EXIT_PERSISTENCE_4TH = 2 , APDS9960_GESTURE_EXIT_PERSISTENCE_7TH = 3 }
 apds9960 gesture exit persistence enumeration definition More...
enum  apds9960_gesture_gain_control_t { APDS9960_GESTURE_GAIN_1X = 0 , APDS9960_GESTURE_GAIN_2X = 1 , APDS9960_GESTURE_GAIN_4X = 2 , APDS9960_GESTURE_GAIN_8X = 3 }
 apds9960 gesture gain control enumeration definition More...
enum  apds9960_gesture_led_current_t { APDS9960_GESTURE_LED_CURRENT_100_MA = 0x00 , APDS9960_GESTURE_LED_CURRENT_50_MA = 0x01 , APDS9960_GESTURE_LED_CURRENT_25_MA = 0x02 , APDS9960_GESTURE_LED_CURRENT_12P5_MA = 0x03 }
 apds9960 gesture led current enumeration definition More...
enum  apds9960_gesture_wait_time_t {
  APDS9960_GESTURE_WAIT_TIME_0_MS = 0x00 , APDS9960_GESTURE_WAIT_TIME_2P8_MS = 0x01 , APDS9960_GESTURE_WAIT_TIME_5P6_MS = 0x02 , APDS9960_GESTURE_WAIT_TIME_8P4_MS = 0x03 ,
  APDS9960_GESTURE_WAIT_TIME_14_MS = 0x04 , APDS9960_GESTURE_WAIT_TIME_22P4_MS = 0x05 , APDS9960_GESTURE_WAIT_TIME_30P8_MS = 0x06 , APDS9960_GESTURE_WAIT_TIME_39P2_MS = 0x07
}
 apds9960 gesture wait time enumeration definition More...
enum  apds9960_gesture_pulse_length_t { APDS9960_GESTURE_PULSE_LENGTH_4_US = 0x00 , APDS9960_GESTURE_PULSE_LENGTH_8_US = 0x01 , APDS9960_GESTURE_PULSE_LENGTH_16_US = 0x02 , APDS9960_GESTURE_PULSE_LENGTH_32_US = 0x03 }
 apds9960 gesture pulse length enumeration definition More...
enum  apds9960_gesture_dimension_select_t { APDS9960_GESTURE_DIMENSION_SELECT_BOTH_PAIRS_ACTIVE = 0x00 , APDS9960_GESTURE_DIMENSION_SELECT_ONLY_UP_DOWN_PAIRS_ACTIVE = 0x01 , APDS9960_GESTURE_DIMENSION_SELECT_ONLY_LEFT_RIGHT_PAIRS_ACTIVE = 0x02 }
 apds9960 gesture dimension select enumeration definition More...
enum  apds9960_gesture_status_t { APDS9960_GESTURE_STATUS_FIFO_OVERFLOW = 0x01 , APDS9960_GESTURE_STATUS_FIFO_VALID = 0x00 }
 apds9960 gesture status enumeration definition More...
enum  apds9960_interrupt_status_t {
  APDS9960_INTERRUPT_STATUS_GESTURE_LEFT = 15 , APDS9960_INTERRUPT_STATUS_GESTURE_RIGHT = 14 , APDS9960_INTERRUPT_STATUS_GESTURE_UP = 13 , APDS9960_INTERRUPT_STATUS_GESTURE_DOWN = 12 ,
  APDS9960_INTERRUPT_STATUS_GESTURE_NEAR = 11 , APDS9960_INTERRUPT_STATUS_GESTURE_FAR = 10 , APDS9960_INTERRUPT_STATUS_GFOV = 9 , APDS9960_INTERRUPT_STATUS_GVALID = 8 ,
  APDS9960_INTERRUPT_STATUS_CPSAT = 7 , APDS9960_INTERRUPT_STATUS_PGSAT = 6 , APDS9960_INTERRUPT_STATUS_PINT = 5 , APDS9960_INTERRUPT_STATUS_AINT = 4 ,
  APDS9960_INTERRUPT_STATUS_GINT = 2 , APDS9960_INTERRUPT_STATUS_PVALID = 1 , APDS9960_INTERRUPT_STATUS_AVALID = 0
}
 apds9960 interrupt status enumeration definition More...

Functions

uint8_t apds9960_info (apds9960_info_t *info)
 get chip's information
uint8_t apds9960_irq_handler (apds9960_handle_t *handle)
 irq handler
uint8_t apds9960_init (apds9960_handle_t *handle)
 initialize the chip
uint8_t apds9960_deinit (apds9960_handle_t *handle)
 close the chip
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_read_proximity (apds9960_handle_t *handle, uint8_t *proximity)
 read the proximity data
uint8_t apds9960_read_gesture_fifo (apds9960_handle_t *handle, uint8_t(*data)[4], uint8_t *len)
 read data from the gesture fifo
uint8_t apds9960_gesture_decode (apds9960_handle_t *handle, uint8_t(*data)[4], uint8_t len)
 decode gestures from the fifo data
uint8_t apds9960_set_gesture_decode_threshold (apds9960_handle_t *handle, uint8_t threshold)
 set the gesture decode threshold
uint8_t apds9960_get_gesture_decode_threshold (apds9960_handle_t *handle, uint8_t *threshold)
 get the gesture decode threshold
uint8_t apds9960_set_gesture_decode_sensitivity_1 (apds9960_handle_t *handle, int32_t sensitivity)
 set the gesture decode sensitivity 1
uint8_t apds9960_get_gesture_decode_sensitivity_1 (apds9960_handle_t *handle, int32_t *sensitivity)
 get the gesture decode sensitivity 1
uint8_t apds9960_set_gesture_decode_sensitivity_2 (apds9960_handle_t *handle, int32_t sensitivity)
 set the gesture decode sensitivity 2
uint8_t apds9960_get_gesture_decode_sensitivity_2 (apds9960_handle_t *handle, int32_t *sensitivity)
 get the gesture decode sensitivity 2
uint8_t apds9960_set_conf (apds9960_handle_t *handle, apds9960_conf_t conf, apds9960_bool_t enable)
 set the configuration
uint8_t apds9960_get_conf (apds9960_handle_t *handle, apds9960_conf_t conf, apds9960_bool_t *enable)
 get the configuration
uint8_t apds9960_set_adc_integration_time (apds9960_handle_t *handle, uint8_t integration_time)
 set the adc integration time
uint8_t apds9960_get_adc_integration_time (apds9960_handle_t *handle, uint8_t *integration_time)
 get the adc integration time
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_adc_integration_time_convert_to_data (apds9960_handle_t *handle, uint8_t reg, float *ms)
 convert the register raw data to the integration time
uint8_t apds9960_set_wait_time (apds9960_handle_t *handle, uint8_t wait_time)
 set the wait time
uint8_t apds9960_get_wait_time (apds9960_handle_t *handle, uint8_t *wait_time)
 get the wait time
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_wait_time_convert_to_data (apds9960_handle_t *handle, uint8_t reg, float *ms)
 convert the register raw data to the wait time
uint8_t apds9960_set_als_interrupt_low_threshold (apds9960_handle_t *handle, uint16_t threshold)
 set the als interrupt low threshold
uint8_t apds9960_get_als_interrupt_low_threshold (apds9960_handle_t *handle, uint16_t *threshold)
 get the als interrupt low threshold
uint8_t apds9960_set_als_interrupt_high_threshold (apds9960_handle_t *handle, uint16_t threshold)
 set the als interrupt high threshold
uint8_t apds9960_get_als_interrupt_high_threshold (apds9960_handle_t *handle, uint16_t *threshold)
 get the als interrupt high threshold
uint8_t apds9960_set_proximity_interrupt_low_threshold (apds9960_handle_t *handle, uint8_t threshold)
 set the proximity interrupt low threshold
uint8_t apds9960_get_proximity_interrupt_low_threshold (apds9960_handle_t *handle, uint8_t *threshold)
 get the proximity interrupt low threshold
uint8_t apds9960_set_proximity_interrupt_high_threshold (apds9960_handle_t *handle, uint8_t threshold)
 set the proximity interrupt high threshold
uint8_t apds9960_get_proximity_interrupt_high_threshold (apds9960_handle_t *handle, uint8_t *threshold)
 get the proximity interrupt high threshold
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_get_proximity_interrupt_cycle (apds9960_handle_t *handle, apds9960_proximity_interrupt_cycle_t *cycle)
 get the proximity interrupt cycle
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_get_als_interrupt_cycle (apds9960_handle_t *handle, apds9960_als_interrupt_cycle_t *cycle)
 get the als interrupt cycle
uint8_t apds9960_set_wait_long (apds9960_handle_t *handle, apds9960_bool_t enable)
 enable or disable the wait long
uint8_t apds9960_get_wait_long (apds9960_handle_t *handle, apds9960_bool_t *enable)
 get the wait long status
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_get_proximity_pulse_length (apds9960_handle_t *handle, apds9960_proximity_pulse_length_t *len)
 get the proximity pulse length
uint8_t apds9960_set_proximity_pulse_count (apds9960_handle_t *handle, uint16_t count)
 set the proximity pulse count
uint8_t apds9960_get_proximity_pulse_count (apds9960_handle_t *handle, uint16_t *count)
 get the proximity pulse count
uint8_t apds9960_set_led_current (apds9960_handle_t *handle, apds9960_led_current_t current)
 set the led current
uint8_t apds9960_get_led_current (apds9960_handle_t *handle, apds9960_led_current_t *current)
 get the led current
uint8_t apds9960_set_proximity_gain (apds9960_handle_t *handle, apds9960_proximity_gain_t gain)
 set the proximity gain
uint8_t apds9960_get_proximity_gain (apds9960_handle_t *handle, apds9960_proximity_gain_t *gain)
 get the proximity gain
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_get_als_color_gain (apds9960_handle_t *handle, apds9960_als_color_gain_t *gain)
 get the als color gain
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_get_saturation_interrupt (apds9960_handle_t *handle, apds9960_saturation_interrupt_t saturation, apds9960_bool_t *enable)
 get the saturation interrupt
uint8_t apds9960_set_led_boost (apds9960_handle_t *handle, apds9960_led_boost_t boost)
 set the led boost
uint8_t apds9960_get_led_boost (apds9960_handle_t *handle, apds9960_led_boost_t *boost)
 get the led boost
uint8_t apds9960_get_status (apds9960_handle_t *handle, uint8_t *status)
 get the status
uint8_t apds9960_set_proximity_up_right_offset (apds9960_handle_t *handle, int8_t offset)
 set the proximity up right offset
uint8_t apds9960_get_proximity_up_right_offset (apds9960_handle_t *handle, int8_t *offset)
 get the proximity up right offset
uint8_t apds9960_set_proximity_down_left_offset (apds9960_handle_t *handle, int8_t offset)
 set the proximity down left offset
uint8_t apds9960_get_proximity_down_left_offset (apds9960_handle_t *handle, int8_t *offset)
 get the proximity down left offset
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_get_proximity_gain_compensation (apds9960_handle_t *handle, apds9960_bool_t *enable)
 get the proximity gain compensation status
uint8_t apds9960_set_sleep_after_interrupt (apds9960_handle_t *handle, apds9960_bool_t enable)
 enable or disable sleeping after interrupt
uint8_t apds9960_get_sleep_after_interrupt (apds9960_handle_t *handle, apds9960_bool_t *enable)
 get the sleeping after interrupt status
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_get_proximity_mask (apds9960_handle_t *handle, apds9960_proximity_mask_t mask, apds9960_bool_t *enable)
 get the proximity mask status
uint8_t apds9960_set_gesture_proximity_enter_threshold (apds9960_handle_t *handle, uint8_t threshold)
 set the gesture proximity enter threshold
uint8_t apds9960_get_gesture_proximity_enter_threshold (apds9960_handle_t *handle, uint8_t *threshold)
 get the gesture proximity enter threshold
uint8_t apds9960_set_gesture_proximity_exit_threshold (apds9960_handle_t *handle, uint8_t threshold)
 set the gesture proximity exit threshold
uint8_t apds9960_get_gesture_proximity_exit_threshold (apds9960_handle_t *handle, uint8_t *threshold)
 get the gesture proximity exit threshold
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_get_gesture_fifo_threshold (apds9960_handle_t *handle, apds9960_gesture_fifo_threshold_t *threshold)
 get the gesture fifo threshold
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_get_gesture_exit_persistence (apds9960_handle_t *handle, apds9960_gesture_exit_persistence_t *persistence)
 get the gesture exit persistence
uint8_t apds9960_set_gesture_exit_mask (apds9960_handle_t *handle, uint8_t mask)
 set the gesture exit mask
uint8_t apds9960_get_gesture_exit_mask (apds9960_handle_t *handle, uint8_t *mask)
 get the gesture exit mask
uint8_t apds9960_set_gesture_gain (apds9960_handle_t *handle, apds9960_gesture_gain_control_t gain)
 set the gesture gain
uint8_t apds9960_get_gesture_gain (apds9960_handle_t *handle, apds9960_gesture_gain_control_t *gain)
 get the gesture gain
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_get_gesture_led_current (apds9960_handle_t *handle, apds9960_gesture_led_current_t *current)
 get the gesture led current
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_get_gesture_wait_time (apds9960_handle_t *handle, apds9960_gesture_wait_time_t *t)
 get the gesture wait time
uint8_t apds9960_set_gesture_up_offset (apds9960_handle_t *handle, int8_t offset)
 set the gesture up offset
uint8_t apds9960_get_gesture_up_offset (apds9960_handle_t *handle, int8_t *offset)
 get the gesture up offset
uint8_t apds9960_set_gesture_down_offset (apds9960_handle_t *handle, int8_t offset)
 set the gesture down offset
uint8_t apds9960_get_gesture_down_offset (apds9960_handle_t *handle, int8_t *offset)
 get the gesture down offset
uint8_t apds9960_set_gesture_left_offset (apds9960_handle_t *handle, int8_t offset)
 set the gesture left offset
uint8_t apds9960_get_gesture_left_offset (apds9960_handle_t *handle, int8_t *offset)
 get the gesture left offset
uint8_t apds9960_set_gesture_right_offset (apds9960_handle_t *handle, int8_t offset)
 set the gesture right offset
uint8_t apds9960_get_gesture_right_offset (apds9960_handle_t *handle, int8_t *offset)
 get the gesture 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_get_gesture_pulse_length (apds9960_handle_t *handle, apds9960_gesture_pulse_length_t *len)
 get the gesture pulse length
uint8_t apds9960_set_gesture_pulse_count (apds9960_handle_t *handle, uint16_t count)
 set the gesture pulse count
uint8_t apds9960_get_gesture_pulse_count (apds9960_handle_t *handle, uint16_t *count)
 get the gesture pulse count
uint8_t apds9960_set_gesture_dimension (apds9960_handle_t *handle, apds9960_gesture_dimension_select_t s)
 set the gesture dimension
uint8_t apds9960_get_gesture_dimension_select (apds9960_handle_t *handle, apds9960_gesture_dimension_select_t *s)
 get the gesture dimension
uint8_t apds9960_gesture_fifo_clear (apds9960_handle_t *handle)
 clear the gesture fifo status
uint8_t apds9960_set_gesture_interrupt (apds9960_handle_t *handle, apds9960_bool_t enable)
 enable or disable the gesture interrupt
uint8_t apds9960_get_gesture_interrupt (apds9960_handle_t *handle, apds9960_bool_t *enable)
 get the gesture interrupt status
uint8_t apds9960_set_gesture_mode (apds9960_handle_t *handle, apds9960_bool_t enable)
 enable or disable the gesture mode
uint8_t apds9960_get_gesture_mode (apds9960_handle_t *handle, apds9960_bool_t *enable)
 get the gesture mode status
uint8_t apds9960_get_gesture_fifo_level (apds9960_handle_t *handle, uint8_t *level)
 get the gesture fifo level
uint8_t apds9960_get_gesture_status (apds9960_handle_t *handle, uint8_t *status)
 get the gesture status
uint8_t apds9960_force_interrupt (apds9960_handle_t *handle)
 force an interrupt
uint8_t apds9960_proximity_interrupt_clear (apds9960_handle_t *handle)
 clear the proximity interrupt
uint8_t apds9960_als_interrupt_clear (apds9960_handle_t *handle)
 clear the als interrupt
uint8_t apds9960_all_non_gesture_interrupt_clear (apds9960_handle_t *handle)
 clear the all not gesture interrupt
uint8_t apds9960_set_reg (apds9960_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 set the chip register
uint8_t apds9960_get_reg (apds9960_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 get the chip register

Detailed Description

driver apds9960 header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2022-01-23

history

Date Version Author Description
2022/01/23 1.0 Shifeng Li first upload

Definition in file driver_apds9960.h.