AXP192 support fixes

This commit is contained in:
Verkehrsrot 2019-09-02 18:18:06 +02:00
parent c653462f90
commit 98a2edb8a7
2 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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);