fix: don't wake up after USB connect (#644)

## Summary

* fixes problem that if short power button press is enabled, connecting
device to usb leads to waking up
This commit is contained in:
Arthur Tazhitdinov
2026-02-01 16:19:33 +05:00
committed by GitHub
parent 5a97334ace
commit 0d82b03981
3 changed files with 35 additions and 13 deletions

View File

@@ -47,8 +47,9 @@ class HalGPIO {
// Check if USB is connected
bool isUsbConnected() const;
// Check if wakeup was caused by power button press
bool isWakeupByPowerButton() const;
enum class WakeupReason { PowerButton, AfterFlash, AfterUSBPower, Other };
WakeupReason getWakeupReason() const;
// Button indices
static constexpr uint8_t BTN_BACK = 0;