|
Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
|
Caller-owned, immutable tickless timer implementation. More...
#include <lowpower.h>
Data Fields | |
| void * | context |
| uint64_t(* | now_us )(void *context) |
| nx_result_t(* | pause_tick )(void *context, nx_freertos_tick_snapshot_t *snapshot) |
| nx_result_t(* | arm_deadline )(void *context, uint64_t deadline_us) |
| void(* | disarm )(void *context) |
| void(* | resume_tick )(void *context, uint64_t next_tick_us) |
Caller-owned, immutable tickless timer implementation.
All methods run in privileged Idle Thread mode with PRIMASK=1 and scheduler suspended. They are bounded, never block or call kernel functions. pause_tick atomically stops the periodic tick and snapshots elapsed phase in its current tick period; a pending tick is rejected without effects. SUCCESS borrows the timer until resume_tick. now_us is the same monotonic clock as snapshot, continuous during shallow sleep. arm_deadline programs an enabled IRQ wake source; rejection retains no alarm. disarm removes only that alarm. resume_tick restores the periodic source with its next expiry at the supplied absolute clock instant, preserving phase within its declared quantization and sampling bound rather than adding callback latency to every tick. It must not publish an already accounted tick. The alarm wakes by deadline; at most eight extra ticks of latency may be caught up. Reversed clocks or larger latency fail stop. This does not configure clocks, NVIC, SCR or a board timer.
Definition at line 43 of file lowpower.h.
| nx_result_t(* nx_freertos_lowpower_port_t::arm_deadline) (void *context, uint64_t deadline_us) |
Definition at line 48 of file lowpower.h.
| void* nx_freertos_lowpower_port_t::context |
Definition at line 44 of file lowpower.h.
| void(* nx_freertos_lowpower_port_t::disarm) (void *context) |
Definition at line 49 of file lowpower.h.
| uint64_t(* nx_freertos_lowpower_port_t::now_us) (void *context) |
Definition at line 45 of file lowpower.h.
| nx_result_t(* nx_freertos_lowpower_port_t::pause_tick) (void *context, nx_freertos_tick_snapshot_t *snapshot) |
Definition at line 46 of file lowpower.h.
| void(* nx_freertos_lowpower_port_t::resume_tick) (void *context, uint64_t next_tick_us) |
Definition at line 50 of file lowpower.h.