power.cpp: fix HAS_BUTTON if no button
This commit is contained in:
parent
b4d7ddb838
commit
be99c712d7
@ -64,10 +64,12 @@ void AXP192_powerevent_IRQ(void) {
|
|||||||
pmu.setChgLEDMode(AXP20X_LED_BLINK_1HZ);
|
pmu.setChgLEDMode(AXP20X_LED_BLINK_1HZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAS_BUTTON
|
||||||
// short press -> esp32 deep sleep mode, can be exited by pressing user button
|
// short press -> esp32 deep sleep mode, can be exited by pressing user button
|
||||||
if (pmu.isPEKShortPressIRQ()) {
|
if (pmu.isPEKShortPressIRQ()) {
|
||||||
enter_deepsleep(0, HAS_BUTTON);
|
enter_deepsleep(0, HAS_BUTTON);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// long press -> shutdown power, can be exited by another longpress
|
// long press -> shutdown power, can be exited by another longpress
|
||||||
if (pmu.isPEKLongtPressIRQ()) {
|
if (pmu.isPEKLongtPressIRQ()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user