-
-
Notifications
You must be signed in to change notification settings - Fork 710
Suspend from application layer #5606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a simplified suspend functionality for the Trezor device application firmware. The implementation allows the device to enter a low-power state and wake up on button, BLE, or power events.
- Adds power button handling that either locks the device (when PIN is set) or suspends it (when no PIN is set)
- Implements suspend device functionality with configurable wakeup flags
- Integrates power button event detection into the UI event handling system
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
core/src/trezor/ui/__init__.py |
Adds power button event handling and integrates suspend functionality into the UI event loop |
core/src/apps/management/pm/suspend.py |
New module implementing the suspend device functionality with wakeup flag handling |
core/embed/upymod/qstrdefsport.h |
Adds string constants for the new suspend module to MicroPython's string table |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
model | device_test | click_test | persistence_test |
---|---|---|---|
T2T1 | |||
T3B1 | |||
T3T1 | |||
T3W1 |
Latest CI run: 17131271804
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % small question:
- power button event is handled before the event is passed to rust layout [no changelog]
3ca5d8b
to
c7efbf4
Compare
This PR adds the first simplified version of suspend to the application firmware. More improvements will follow.
Description:
suspend
introduced to uPy in Firmware autodim #5417BTN
stops all workflows and locks the device. Repeated powerBTN
press suspends the device.BTN
/BLE
/PWR
- all treated equally - wakes up the deviceMissing:
PWR
button (when charging starts)Supersedes #5199