ProtoCore v0.0.2
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
trace_capture.cpp File Reference

Pre/post-trigger sample-window assembler - implementation. More...

Go to the source code of this file.

Detailed Description

Pre/post-trigger sample-window assembler - implementation.

All state is one static instance (internal linkage) - zero heap, fixed capacity PC_TC_MAX_WINDOW_SAMPLES. The pre-trigger ring is sized to the configured pretrigger_samples (<= the compile-time max) and indexed with a running write cursor; pc_tc_trigger() reads it out oldest-first into the front of the window buffer. No dynamic memory, no locks: feed() and trigger() are each a single bounded pass with no blocking, so both are safe to call from an ISR (a DMA-complete callback and a GPIO trigger ISR respectively).

Definition in file trace_capture.cpp.