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

## 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 12:51:31 +05:00
committed by GitHub
parent f4df513bf3
commit 6b7065b986
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;