40#include "ove_config.h"
56 OVE_PM_STATE_COUNT = 4,
73 OVE_PM_DOMAIN_RADIO = 0,
74 OVE_PM_DOMAIN_SENSOR = 1,
75 OVE_PM_DOMAIN_DISPLAY = 2,
76 OVE_PM_DOMAIN_AUDIO = 3,
77 OVE_PM_DOMAIN_STORAGE = 4,
78 OVE_PM_DOMAIN_COMMS = 5,
79 OVE_PM_DOMAIN_USER0 = 6,
80 OVE_PM_DOMAIN_USER1 = 7,
81 OVE_PM_DOMAIN_COUNT = 8,
118 unsigned int instance;
148 uint32_t next_timeout_ms,
void *user_data);
ove_gpio_irq_mode_t
GPIO interrupt trigger edge selection (re-exported for BSP-only callers).
Definition bsp.h:49
int ove_pm_set_policy(ove_pm_policy_fn policy, void *user_data)
Register a custom power policy callback.
int ove_pm_wake_unregister(const struct ove_pm_wake_src *src)
Unregister a previously registered wake source.
ove_pm_state_t
System power states, ordered by increasing sleep depth.
Definition pm.h:51
int ove_pm_set_state(ove_pm_state_t state)
Request an explicit transition to state.
void ove_pm_deinit(void)
Tear down the PM subsystem and release resources.
void(* ove_pm_notify_fn)(ove_pm_event_t event, ove_pm_state_t from_state, ove_pm_state_t to_state, void *user_data)
Transition notification callback.
Definition pm.h:158
int ove_pm_get_budget_status(uint32_t *actual_pct_x100)
Query actual low-power percentage vs. budget target.
int ove_pm_domain_release(ove_pm_domain_t domain)
Decrement the reference count for a peripheral power domain.
int ove_pm_domain_get_refcount(ove_pm_domain_t domain)
Query the current reference count for a domain.
void ove_pm_idle_process(void)
Process idle — called from RTOS idle context by the HAL.
ove_pm_wake_type_t
Wake source types.
Definition pm.h:62
int ove_pm_notify_register(ove_pm_notify_fn cb, void *user_data)
Register a transition notification callback.
void ove_pm_reset_stats(void)
Reset all accumulated power statistics to zero.
void ove_pm_activity(void)
Report system activity (resets idle timer).
int ove_pm_wake_register(const struct ove_pm_wake_src *src)
Register a wake source.
int ove_pm_init(const struct ove_pm_cfg *cfg)
Initialise the PM subsystem.
ove_pm_event_t
Transition event type for notification callbacks.
Definition pm.h:87
ove_pm_domain_t
Peripheral power domain identifiers.
Definition pm.h:72
int ove_pm_domain_request(ove_pm_domain_t domain)
Increment the reference count for a peripheral power domain.
int ove_pm_get_stats(struct ove_pm_stats *stats)
Query accumulated power statistics.
ove_pm_state_t(* ove_pm_policy_fn)(ove_pm_state_t current, uint32_t idle_ms, uint32_t next_timeout_ms, void *user_data)
Power policy callback — returns recommended next state.
Definition pm.h:147
int ove_pm_set_budget(uint32_t target_low_power_pct_x100)
Set a target percentage of time in low-power states.
ove_pm_state_t ove_pm_get_state(void)
Query the current power state.
int ove_pm_notify_unregister(ove_pm_notify_fn cb, void *user_data)
Unregister a transition notification callback.
@ OVE_PM_STATE_ACTIVE
Definition pm.h:52
@ OVE_PM_STATE_STANDBY
Definition pm.h:54
@ OVE_PM_STATE_IDLE
Definition pm.h:53
@ OVE_PM_STATE_DEEP_SLEEP
Definition pm.h:55
@ OVE_PM_WAKE_UART
Definition pm.h:65
@ OVE_PM_WAKE_TIMER
Definition pm.h:64
@ OVE_PM_WAKE_GPIO
Definition pm.h:63
@ OVE_PM_WAKE_RTC
Definition pm.h:66
@ OVE_PM_EVENT_PRE_SLEEP
Definition pm.h:88
@ OVE_PM_EVENT_POST_WAKE
Definition pm.h:89
@ OVE_ERR_NOT_SUPPORTED
Definition types.h:98
PM subsystem configuration.
Definition pm.h:97
uint32_t standby_threshold_ms
Definition pm.h:99
uint32_t deep_sleep_threshold_ms
Definition pm.h:100
uint32_t idle_threshold_ms
Definition pm.h:98
Runtime power statistics.
Definition pm.h:129
uint32_t active_pct_x100
Definition pm.h:133
uint32_t transition_count[OVE_PM_STATE_COUNT]
Definition pm.h:131
uint64_t total_runtime_us
Definition pm.h:132
uint64_t time_in_state_us[OVE_PM_STATE_COUNT]
Definition pm.h:130
Wake source descriptor.
Definition pm.h:106
struct ove_pm_wake_src::@5::@10 rtc
ove_pm_wake_type_t type
Definition pm.h:107
struct ove_pm_wake_src::@5::@7 gpio
struct ove_pm_wake_src::@5::@8 timer
struct ove_pm_wake_src::@5::@9 uart