Merge pull request #8172 from Theosakamg/fix_APDS9960_a8

Add APDS-9960 chip A8 sensor support
This commit is contained in:
Theo Arends 2020-04-14 11:14:22 +02:00 committed by GitHub
commit b7a539749f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);