Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
lowpower.h
Go to the documentation of this file.
1
9#ifndef NEXUS_OS_LOWPOWER_H
10#define NEXUS_OS_LOWPOWER_H
11#include "nexus/core/status.h"
12#include <stdint.h>
13#ifdef __cplusplus
14extern "C" {
15#endif
17#define NX_FREERTOS_LATE_TICK_BUDGET 8u
19typedef struct {
20 uint64_t time_us;
21 uint32_t phase_us;
23
43typedef struct {
44 void* context;
45 uint64_t (*now_us)(void* context);
48 nx_result_t (*arm_deadline)(void* context, uint64_t deadline_us);
49 void (*disarm)(void* context);
50 void (*resume_tick)(void* context, uint64_t next_tick_us);
52
73void nx_freertos_suppress_ticks_and_sleep(uint32_t expected_idle_ticks);
74#ifdef __cplusplus
75}
76#endif
77#endif /* NEXUS_OS_LOWPOWER_H */
const nx_freertos_lowpower_port_t * nx_freertos_lowpower_port(void)
Return the explicitly selected continuous timer port.
void nx_freertos_suppress_ticks_and_sleep(uint32_t expected_idle_ticks)
Kernel tickless hook with measured phase preservation.
Small vendor-independent result vocabulary.
nx_result_t
Operation result; success at submission means admission only.
Definition status.h:21
Caller-owned, immutable tickless timer implementation.
Definition lowpower.h:43
nx_result_t(* arm_deadline)(void *context, uint64_t deadline_us)
Definition lowpower.h:48
uint64_t(* now_us)(void *context)
Definition lowpower.h:45
nx_result_t(* pause_tick)(void *context, nx_freertos_tick_snapshot_t *snapshot)
Definition lowpower.h:46
void(* resume_tick)(void *context, uint64_t next_tick_us)
Definition lowpower.h:50
void(* disarm)(void *context)
Definition lowpower.h:49
Stopped-tick epoch with the concrete port's declared precision.
Definition lowpower.h:19