Added initial support for Texas Instruments LP5562 (#6381)

* Added initial support for Texas Instrument LP5562
* Added proper support for Ambient Lighting
* Code merge for all RBG_LED enabled devices
* Fixed forgotten log_info & added firstRGBLED()
This commit is contained in:
Clément Hampaï
2025-04-01 22:39:40 +02:00
committed by GitHub
parent 644849126c
commit f6ed10f329
8 changed files with 87 additions and 16 deletions

View File

@@ -41,6 +41,12 @@ ScanI2C::FoundDevice ScanI2C::firstAccelerometer() const
return firstOfOrNONE(8, types);
}
ScanI2C::FoundDevice ScanI2C::firstRGBLED() const
{
ScanI2C::DeviceType types[] = {NCP5623, LP5562};
return firstOfOrNONE(2, types);
}
ScanI2C::FoundDevice ScanI2C::find(ScanI2C::DeviceType) const
{
return DEVICE_NONE;

View File

@@ -49,6 +49,7 @@ class ScanI2C
VEML7700,
RCWL9620,
NCP5623,
LP5562,
TSL2591,
OPT3001,
MLX90632,
@@ -121,6 +122,8 @@ class ScanI2C
FoundDevice firstAccelerometer() const;
FoundDevice firstRGBLED() const;
virtual FoundDevice find(DeviceType) const;
virtual bool exists(DeviceType) const;

View File

@@ -218,6 +218,9 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
#ifdef HAS_NCP5623
SCAN_SIMPLE_CASE(NCP5623_ADDR, NCP5623, "NCP5623", (uint8_t)addr.address);
#endif
#ifdef HAS_LP5562
SCAN_SIMPLE_CASE(LP5562_ADDR, LP5562, "LP5562", (uint8_t)addr.address);
#endif
#ifdef HAS_PMU
SCAN_SIMPLE_CASE(XPOWERS_AXP192_AXP2101_ADDRESS, PMU_AXP192_AXP2101, "AXP192/AXP2101", (uint8_t)addr.address)
#endif