diff --git a/src/battery.cpp b/src/battery.cpp index 3af874d9..39b78683 100644 --- a/src/battery.cpp +++ b/src/battery.cpp @@ -52,6 +52,10 @@ uint16_t read_voltage() { digitalWrite(EXT_POWER_SW, EXT_POWER_OFF); #endif +#ifdef HAS_PMU + voltage = axp.getBattVoltage(); +#endif + return (uint16_t)voltage; #else return 0; diff --git a/src/i2cscan.cpp b/src/i2cscan.cpp index 35898f0d..fb07d034 100644 --- a/src/i2cscan.cpp +++ b/src/i2cscan.cpp @@ -80,9 +80,10 @@ void AXP192_init(void) { axp.setPowerOutPut(AXP192_DCDC2, AXP202_ON); axp.setPowerOutPut(AXP192_EXTEN, AXP202_ON); axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON); - + axp.setChgLEDMode(AXP20X_LED_OFF); + //axp.setChgLEDMode(LED_BLINK_4HZ); + /* - axp.setChgLEDMode(LED_BLINK_4HZ); axp.setDCDC1Voltage(3300); pinMode(PMU_IRQ, INPUT_PULLUP);