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#include <stdint.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
39#define OVE_PM_NO_TIMEOUT UINT32_MAX
40
51int ove_hal_pm_enter_state(ove_pm_state_t state, uint32_t expected_idle_ms);
52
61int ove_hal_pm_wake_arm(const struct ove_pm_wake_src *src);
62
70
80
90
97
107
120
128
129#ifdef __cplusplus
130}
131#endif
132
135#endif /* OVE_HAL_PM_H */
int ove_hal_pm_wake_disarm(const struct ove_pm_wake_src *src)
Disarm a wake source after waking.
void ove_hal_pm_teardown(void)
Tear down backend-side PM machinery.
int ove_hal_pm_setup(void)
Initialise backend-side PM machinery.
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:51
ove_pm_domain_t
Peripheral power domain identifiers.
Definition pm.h:72
Wake source descriptor.
Definition pm.h:106