tidy up first

This commit is contained in:
Gareth Coleman 2024-04-18 20:57:03 +01:00
parent 78d915b454
commit a149999cec
2 changed files with 3 additions and 6 deletions

View File

@ -41,8 +41,9 @@ class ScanI2C
BQ24295, BQ24295,
LSM6DS3, LSM6DS3,
TCA9555, TCA9555,
RGBLED_CA, #ifdef HAS_NCP5623
NCP5623, NCP5623,
#endif
} DeviceType; } DeviceType;
// typedef uint8_t DeviceAddress; // typedef uint8_t DeviceAddress;

View File

@ -494,15 +494,11 @@ void setup()
* "found". * "found".
*/ */
// Only one supported I2C RGB LED currently (plus common anode RGB LED used by the unPhone) // Only one supported RGB LED currently
#ifdef HAS_NCP5623 #ifdef HAS_NCP5623
rgb_found = i2cScanner->find(ScanI2C::DeviceType::NCP5623); rgb_found = i2cScanner->find(ScanI2C::DeviceType::NCP5623);
#endif #endif
#ifdef UNPHONE
rgb_found.type = ScanI2C::DeviceType::RGBLED_CA;
#endif
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL)
auto acc_info = i2cScanner->firstAccelerometer(); auto acc_info = i2cScanner->firstAccelerometer();
accelerometer_found = acc_info.type != ScanI2C::DeviceType::NONE ? acc_info.address : accelerometer_found; accelerometer_found = acc_info.type != ScanI2C::DeviceType::NONE ? acc_info.address : accelerometer_found;