Expand description
Power management framework for oveRTOS.
Provides a unified interface for sleep state management, peripheral power domains, wake source registration, pluggable power policies, and runtime power statistics.
The PM subsystem is a singleton — there is one system-wide power state.
Initialise with init and tear down with deinit.
Structs§
Enums§
- Domain
- Peripheral power domain identifiers.
- Event
- Transition event type for notification callbacks.
- State
- System power states, ordered by increasing sleep depth.
- Wake
Type - Wake source types.
Functions§
- activity
- Report system activity (ISR-safe). Resets the idle timer.
- deinit
- Tear down the PM subsystem and release resources.
- domain_
get_ refcount - Query the current reference count for a domain.
- domain_
release - Decrement the reference count for a peripheral power domain.
- domain_
request - Increment the reference count for a peripheral power domain.
- get_
budget_ status - Query actual low-power percentage vs. budget target.
- get_
state - Query the current power state.
- get_
stats - Query accumulated power statistics.
- init
- Initialise the PM subsystem.
- notify_
register ⚠ - Register a transition notification callback.
- notify_
unregister ⚠ - Unregister a transition notification callback.
- reset_
stats - Reset all accumulated power statistics to zero.
- set_
budget - Set a target percentage of time in low-power states.
- set_
policy ⚠ - Register a custom power policy callback. Pass
Noneto restore default. - set_
state - Request an explicit power state transition.
- wake_
register_ gpio - Register a GPIO wake source.
- wake_
register_ timer - Register a timer wake source.
- wake_
register_ uart - Register a UART wake source.
- wake_
unregister_ gpio - Unregister a GPIO wake source.