mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 23:07:17 +00:00
Merge pull request #8172 from Theosakamg/fix_APDS9960_a8
Add APDS-9960 chip A8 sensor support
This commit is contained in:
commit
b7a539749f
@ -56,6 +56,7 @@
|
|||||||
|
|
||||||
#define APDS9960_CHIPID_1 0xAB
|
#define APDS9960_CHIPID_1 0xAB
|
||||||
#define APDS9960_CHIPID_2 0x9C
|
#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_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
|
#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; }
|
if (APDS9960type || I2cActive(APDS9960_I2C_ADDR)) { return; }
|
||||||
|
|
||||||
APDS9960type = I2cRead8(APDS9960_I2C_ADDR, APDS9960_ID);
|
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()) {
|
if (APDS9960_init()) {
|
||||||
I2cSetActiveFound(APDS9960_I2C_ADDR, APDS9960stype);
|
I2cSetActiveFound(APDS9960_I2C_ADDR, APDS9960stype);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user