|
ptt-fhss
Bare-metal PTT firmware for nRF52840 with FHSS
|
Power management implementation. More...
Macros | |
| #define | BUTTON_PIN 2u |
| #define | BUTTON_ACTIVE_LOW 1u |
Functions | |
| void | power_init (void) |
| Enable the DC/DC converter, configure GPIO input and GPIOTE wakeup on the PTT button. | |
| void | power_sleep_until_button (void) |
| Enter SYSTEM_ON low-power sleep and return on the next GPIOTE event. | |
| bool | power_button_pressed (void) |
| Return the current state of the PTT button. | |
| void | GPIOTE_IRQHandler (void) |
Power management implementation.
| #define BUTTON_ACTIVE_LOW 1u |
| #define BUTTON_PIN 2u |
| void GPIOTE_IRQHandler | ( | void | ) |
| bool power_button_pressed | ( | void | ) |
Return the current state of the PTT button.
| void power_init | ( | void | ) |
Enable the DC/DC converter, configure GPIO input and GPIOTE wakeup on the PTT button.
| void power_sleep_until_button | ( | void | ) |
Enter SYSTEM_ON low-power sleep and return on the next GPIOTE event.
Sets TASKS_LOWPWR then executes WFI. The CPU wakes when the GPIOTE interrupt fires (button press) and resumes from here.