45 #define APDS9930_AGAIN_1X 0 |
45 #define APDS9930_AGAIN_1X 0 |
46 #define APDS9930_AGAIN_8X 1 |
46 #define APDS9930_AGAIN_8X 1 |
47 #define APDS9930_AGAIN_16X 2 |
47 #define APDS9930_AGAIN_16X 2 |
48 #define APDS9930_AGAIN_120X 3 |
48 #define APDS9930_AGAIN_120X 3 |
49 |
49 |
|
50 /* Default values */ |
|
51 #define APDS9930_DEFAULT_ATIME 0xED |
|
52 #define APDS9930_DEFAULT_WTIME 0xFF |
|
53 #define APDS9930_DEFAULT_PTIME 0xFF |
|
54 #define APDS9930_DEFAULT_PPULSE 0x08 |
|
55 #define APDS9930_DEFAULT_POFFSET 0 // 0 offset |
|
56 #define APDS9930_DEFAULT_CONFIG 0 |
|
57 #define APDS9930_DEFAULT_PDRIVE APDS9930_LED_DRIVE_100MA |
|
58 #define APDS9930_DEFAULT_PDIODE 2 |
|
59 #define APDS9930_DEFAULT_PGAIN APDS9930_PGAIN_8X |
|
60 #define APDS9930_DEFAULT_AGAIN APDS9930_AGAIN_1X |
|
61 #define APDS9930_DEFAULT_PILT 0 // Low proximity threshold |
|
62 #define APDS9930_DEFAULT_PIHT 50 // High proximity threshold |
|
63 #define APDS9930_DEFAULT_AILT 0xFFFF // Force interrupt for calibration |
|
64 #define APDS9930_DEFAULT_AIHT 0 |
|
65 #define APDS9930_DEFAULT_PERS 0x22 // 2 consecutive prox or ALS for int. |
|
66 |
|
67 |
50 /** |
68 /** |
51 * Device descriptor |
69 * Device descriptor |
52 */ |
70 */ |
53 typedef struct { |
71 typedef struct { |
54 i2c_dev_t i2c_dev; |
72 i2c_dev_t i2c_dev; |