I2C improvements and fixes (#201)
- Show I2C device name in I2C Scanner app - Register various I2C devices from board implementations - Fix M5Stack Core2 power status - Fix pre-allocation issue in `hal::Device`
This commit is contained in:
committed by
GitHub
parent
2e61aea93c
commit
c0f4738abe
@@ -223,7 +223,7 @@ bool UnPhoneFeatures::init() {
|
||||
|
||||
void UnPhoneFeatures::printInfo() const {
|
||||
esp_io_expander_print_state(ioExpander);
|
||||
batteryManagement.printInfo();
|
||||
batteryManagement->printInfo();
|
||||
bool backlight_power;
|
||||
const char* backlight_power_state = getBacklightPower(backlight_power) && backlight_power ? "on" : "off";
|
||||
TT_LOG_I(TAG, "Backlight: %s", backlight_power_state);
|
||||
@@ -282,12 +282,12 @@ void UnPhoneFeatures::turnPeripheralsOff() const {
|
||||
bool UnPhoneFeatures::setShipping(bool on) const {
|
||||
if (on) {
|
||||
TT_LOG_W(TAG, "setShipping: on");
|
||||
batteryManagement.setWatchDogTimer(Bq24295::WatchDogTimer::Disabled);
|
||||
batteryManagement.setBatFetOn(false);
|
||||
batteryManagement->setWatchDogTimer(Bq24295::WatchDogTimer::Disabled);
|
||||
batteryManagement->setBatFetOn(false);
|
||||
} else {
|
||||
TT_LOG_W(TAG, "setShipping: off");
|
||||
batteryManagement.setWatchDogTimer(Bq24295::WatchDogTimer::Enabled40s);
|
||||
batteryManagement.setBatFetOn(true);
|
||||
batteryManagement->setWatchDogTimer(Bq24295::WatchDogTimer::Enabled40s);
|
||||
batteryManagement->setBatFetOn(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -297,5 +297,5 @@ void UnPhoneFeatures::wakeOnPowerSwitch() const {
|
||||
}
|
||||
|
||||
bool UnPhoneFeatures::isUsbPowerConnected() const {
|
||||
return batteryManagement.isUsbPowerConnected();
|
||||
return batteryManagement->isUsbPowerConnected();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user