v2.0.0
Macros | Typedefs | Enumerations | Functions
powman.h File Reference
`#include "pico.h"`
`#include "hardware/structs/powman.h"`
Include dependency graph for powman.h:

Go to the source code of this file.

## Macros
#define | PARAM_ASSERTIONS_ENABLED_HARDWARE_POWMAN 0
#define | POWMAN_POWER_STATE_NONE 0

## Typedefs
typedef uint32_t | powman_power_state

## Enumerations
enum | powman_power_domains { POWMAN_POWER_DOMAIN_SRAM_BANK1 = 0 , POWMAN_POWER_DOMAIN_SRAM_BANK0 = 1 , POWMAN_POWER_DOMAIN_XIP_CACHE = 2 , POWMAN_POWER_DOMAIN_SWITCHED_CORE = 3 , POWMAN_POWER_DOMAIN_COUNT = 4 }
| Power domains of powman. More...

## Functions
void | powman_timer_set_1khz_tick_source_lposc (void)
| Use the ~32KHz low power oscillator as the powman timer source.
void | powman_timer_set_1khz_tick_source_lposc_with_hz (uint32_t lposc_freq_hz)
| Use the low power oscillator (specifying frequency) as the powman timer source. More...
void | powman_timer_set_1khz_tick_source_xosc (void)
| Use the crystal oscillator as the powman timer source.
void | powman_timer_set_1khz_tick_source_xosc_with_hz (uint32_t xosc_freq_hz)
| Use the crystal oscillator as the powman timer source. More...
void | powman_timer_set_1khz_tick_source_gpio (uint32_t gpio)
| Use a 1KHz external tick as the powman timer source. More...
void | powman_timer_enable_gpio_1hz_sync (uint32_t gpio)
| Use a 1Hz external signal as the powman timer source for seconds only. More...
void | powman_timer_disable_gpio_1hz_sync (void)
| Stop using 1Hz external signal as the powman timer source for seconds.
uint64_t | powman_timer_get_ms (void)
| Returns current time in ms.
void | powman_timer_set_ms (uint64_t time_ms)
| Set current time in ms. More...
void | powman_timer_enable_alarm_at_ms (uint64_t alarm_time_ms)
| Set an alarm at an absolute time in ms. More...
void | powman_timer_disable_alarm (void)
| Disable the alarm. More...
static void | powman_set_bits (volatile uint32_t *reg, uint32_t bits)
| hw_set_bits helper function More...
static void | powman_clear_bits (volatile uint32_t *reg, uint32_t bits)
| hw_clear_bits helper function More...
static bool | powman_timer_is_running (void)
| Determine if the powman timer is running.
static void | powman_timer_stop (void)
| Stop the powman timer.
static void | powman_timer_start (void)
| Start the powman timer.
static void | powman_clear_alarm (void)
| Clears the powman alarm. More...
powman_power_state | powman_get_power_state (void)
| Get the current power state.
int | powman_set_power_state (powman_power_state state)
| Set the power state. More...
static powman_power_state | powman_power_state_with_domain_on (powman_power_state orig, enum powman_power_domains domain)
| Helper function modify a powman_power_state to turn a domain on. More...
static powman_power_state | powman_power_state_with_domain_off (powman_power_state orig, enum powman_power_domains domain)
| Helper function modify a powman_power_state to turn a domain off. More...
static bool | powman_power_state_is_domain_on (powman_power_state state, enum powman_power_domains domain)
| Helper function to check if a domain is on in a given powman_power_state. More...
void | powman_enable_alarm_wakeup_at_ms (uint64_t alarm_time_ms)
| Wake up from an alarm at a given time. More...
void | powman_enable_gpio_wakeup (uint gpio_wakeup_num, uint32_t gpio, bool edge, bool high)
| Wake up from a gpio. More...
void | powman_disable_alarm_wakeup (void)
| Disable waking up from alarm.
void | powman_disable_gpio_wakeup (uint gpio_wakeup_num)
| Disable wake up from a gpio. More...
void | powman_disable_all_wakeups (void)
| Disable all wakeup sources.
bool | powman_configure_wakeup_state (powman_power_state sleep_state, powman_power_state wakeup_state)
| Configure sleep state and wakeup state. More...
static void | powman_set_debug_power_request_ignored (bool ignored)
| Ignore wake up when the debugger is attached. More...