/** * @file power.h * @brief Power management: DC/DC regulator, GPIOTE wakeup, WFI sleep. */ #pragma once #include /** @brief Enable the DC/DC converter, configure GPIO input and GPIOTE wakeup on the PTT button. */ void power_init(void); /** * @brief 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. */ void power_sleep_until_button(void); /** * @brief Return the current state of the PTT button. * @return true when the button is pressed. */ bool power_button_pressed(void);