Module pm

Module pm 

Source
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§

Cfg
PM subsystem configuration.
Stats
Runtime power statistics.

Enums§

Domain
Peripheral power domain identifiers.
Event
Transition event type for notification callbacks.
State
System power states, ordered by increasing sleep depth.
WakeType
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 None to 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.