Nexus Embedded Platform 0.1.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
nx_freertos_lowpower_port_t Struct Reference

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)

Detailed Description

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.

Field Documentation

◆ arm_deadline

nx_result_t(* nx_freertos_lowpower_port_t::arm_deadline) (void *context, uint64_t deadline_us)

Definition at line 48 of file lowpower.h.

◆ context

void* nx_freertos_lowpower_port_t::context

Definition at line 44 of file lowpower.h.

◆ disarm

void(* nx_freertos_lowpower_port_t::disarm) (void *context)

Definition at line 49 of file lowpower.h.

◆ now_us

uint64_t(* nx_freertos_lowpower_port_t::now_us) (void *context)

Definition at line 45 of file lowpower.h.

◆ pause_tick

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.

◆ resume_tick

void(* nx_freertos_lowpower_port_t::resume_tick) (void *context, uint64_t next_tick_us)

Definition at line 50 of file lowpower.h.


The documentation for this struct was generated from the following file: