oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
hal_pm.h
1/*
2 * Copyright (C) 2026 Kamil Lulko <kamil.lulko@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 *
6 * This file is part of oveRTOS.
7 */
8
9#ifndef OVE_HAL_PM_H
10#define OVE_HAL_PM_H
11
26#include "ove/pm.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
42int ove_hal_pm_enter_state(ove_pm_state_t state, uint32_t expected_idle_ms);
43
52int ove_hal_pm_wake_arm(const struct ove_pm_wake_src *src);
53
61
71
81
88
98
99#ifdef __cplusplus
100}
101#endif
102
105#endif /* OVE_HAL_PM_H */
int ove_hal_pm_wake_disarm(const struct ove_pm_wake_src *src)
Disarm a wake source after waking.
int ove_hal_pm_enter_state(ove_pm_state_t state, uint32_t expected_idle_ms)
Enter a hardware sleep state.
int ove_hal_pm_domain_enable(ove_pm_domain_t domain)
Enable power to a peripheral domain.
int ove_hal_pm_wake_arm(const struct ove_pm_wake_src *src)
Arm a wake source in hardware before entering sleep.
int ove_hal_pm_domain_disable(ove_pm_domain_t domain)
Disable power to a peripheral domain (power-gate).
uint32_t ove_hal_pm_get_next_timeout_ms(void)
Query the time until the next scheduled RTOS event.
void ove_hal_pm_idle_hook(void)
Idle hook entry point — registered with the RTOS idle mechanism.
ove_pm_state_t
System power states, ordered by increasing sleep depth.
Definition pm.h:50
ove_pm_domain_t
Peripheral power domain identifiers.
Definition pm.h:71
Wake source descriptor.
Definition pm.h:105