AXP192 support fixes
This commit is contained in:
parent
c653462f90
commit
98a2edb8a7
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user