Add APDS-9960 chip A8 sensor support

Signed-off-by: Mickael Gaillard <mick.gaillard@gmail.com>
This commit is contained in:
Mickael Gaillard 2020-04-14 11:02:36 +02:00
parent b49f810d71
commit 35782c41aa
1 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@
#define APDS9960_CHIPID_1 0xAB
#define APDS9960_CHIPID_2 0x9C
#define APDS9960_CHIPID_3 0xA8
#define APDS9930_CHIPID_1 0x12 // we will check, if someone got an incorrect sensor
#define APDS9930_CHIPID_2 0x39 // there are case reports about "accidentially bought" 9930's
@ -1884,7 +1885,7 @@ void APDS9960_detect(void)
if (APDS9960type || I2cActive(APDS9960_I2C_ADDR)) { return; }
APDS9960type = I2cRead8(APDS9960_I2C_ADDR, APDS9960_ID);
if (APDS9960type == APDS9960_CHIPID_1 || APDS9960type == APDS9960_CHIPID_2) {
if (APDS9960type == APDS9960_CHIPID_1 || APDS9960type == APDS9960_CHIPID_2 || APDS9960type == APDS9960_CHIPID_3) {
if (APDS9960_init()) {
I2cSetActiveFound(APDS9960_I2C_ADDR, APDS9960stype);