This commit is contained in:
cyberman54 2020-12-16 18:54:23 +01:00
parent 3fb5d258b7
commit 93e194506f
2 changed files with 3 additions and 7 deletions

View File

@ -140,9 +140,6 @@ void AXP192_init(void) {
pmu.adc1Enable(AXP202_VBUS_VOL_ADC1, true);
pmu.adc1Enable(AXP202_VBUS_CUR_ADC1, true);
// switch power rails on
AXP192_power(pmu_power_on);
#ifdef PMU_INT
pinMode(PMU_INT, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(PMU_INT), PMUIRQ, FALLING);
@ -161,6 +158,9 @@ void AXP192_init(void) {
pmu.enableChargeing(true);
#endif
// switch power rails on
AXP192_power(pmu_power_on);
ESP_LOGI(TAG, "AXP192 PMU initialized");
}
}

View File

@ -51,10 +51,6 @@ void do_after_reset(void) {
ESP_LOGI(TAG, "Time spent in deep sleep: %d ms", sleep_time_ms);
RTC_runmode = RUNMODE_WAKEUP;
// power on all rails if has PMU
#ifdef HAS_PMU
AXP192_power(pmu_power_on);
#endif
break;
case ESP_SLEEP_WAKEUP_ALL: