|
Nexus Embedded Platform 0.1.0
Statically assembled reusable embedded mechanisms
|
Optional raw timer edge capture with caller-owned events. More...
#include "nexus/core/time.h"Go to the source code of this file.
Data Structures | |
| struct | nx_timer_capture_event_t |
| Hardware modulo counter and the separate IRQ observation time. More... | |
| struct | nx_timer_capture_state_t |
| Fixed counter units and current software retention state. More... | |
| struct | nx_timer_capture_ops_t |
| Shared immutable methods; no per-call acquisition or allocation. More... | |
| struct | nx_timer_capture_t |
| Immutable identity; state and methods outlive calls and IRQs. More... | |
Enumerations | |
| enum | nx_timer_capture_flags { NX_TIMER_CAPTURE_OVERCAPTURE = 1U , NX_TIMER_CAPTURE_RING_LOSS = 2U } |
| Observable loss incidents, not an exact count of physical edges. More... | |
Functions | |
| nx_result_t | nx_timer_capture_start (const nx_timer_capture_t *port, nx_timer_capture_event_t *events, size_t capacity) |
| Borrow an exact event ring and enable the fixed capture channel. | |
| nx_result_t | nx_timer_capture_stop (const nx_timer_capture_t *port) |
| Disable and read back channel/IRQ sources before returning storage. | |
| nx_result_t | nx_timer_capture_read (const nx_timer_capture_t *port, nx_timer_capture_event_t *event) |
| Copy the oldest event in a short saved-mask metadata section. | |
| nx_result_t | nx_timer_capture_state (const nx_timer_capture_t *port, nx_timer_capture_state_t *state) |
| Query counter units and observable queue/loss facts. | |
Optional raw timer edge capture with caller-owned events.
Definition in file timer_capture.h.
Observable loss incidents, not an exact count of physical edges.
| Enumerator | |
|---|---|
| NX_TIMER_CAPTURE_OVERCAPTURE | |
| NX_TIMER_CAPTURE_RING_LOSS | |
Definition at line 13 of file timer_capture.h.
| nx_result_t nx_timer_capture_read | ( | const nx_timer_capture_t * | port, |
| nx_timer_capture_event_t * | event ) |
Copy the oldest event in a short saved-mask metadata section.
| [in] | port | Single privileged task consumer. |
| [out] | event | Separate writable output, unchanged on EMPTY/rejection. |
| nx_result_t nx_timer_capture_start | ( | const nx_timer_capture_t * | port, |
| nx_timer_capture_event_t * | events, | ||
| size_t | capacity ) |
Borrow an exact event ring and enable the fixed capture channel.
| [in] | port | One privileged task owner, serialized with stop/read. |
| [in,out] | events | Aligned writable ring, capacity positive. |
| [in] | capacity | Number of events; no hidden buffer or worker. |
| nx_result_t nx_timer_capture_state | ( | const nx_timer_capture_t * | port, |
| nx_timer_capture_state_t * | state ) |
Query counter units and observable queue/loss facts.
| [in] | port | Privileged task owner; no concurrent lifecycle writer. |
| [out] | state | Separate writable snapshot. |
| nx_result_t nx_timer_capture_stop | ( | const nx_timer_capture_t * | port | ) |
Disable and read back channel/IRQ sources before returning storage.
| [in] | port | Privileged task owner, with generated IRQ owner retained. |