modules/woz_uwb/src/facade/woz_logfmt.c
asxeem/openaliro
Module

woz_logfmt.c

PRETTY-gated high-res timestamp + compact colored log line.

modules/woz_uwb/src/facade/woz_logfmt.c8 documented symbols

Overview

PRETTY-gated high-res timestamp + compact colored log line.

API

Fstatic log_timestamp_t woz_timestamp_get(void)

modules/woz_uwb/src/facade/woz_logfmt.c:47

Advance + read the 64-bit cycle accumulator (irq-safe; any context).

called by woz_wrap_sample

Fstatic void woz_wrap_sample(struct k_timer *t)

modules/woz_uwb/src/facade/woz_logfmt.c:61

Periodic sampler so a CYCCNT wrap is never missed during console idle.

calls woz_timestamp_get

Cstruct woz_sink

modules/woz_uwb/src/facade/woz_logfmt.c:70

Small bounded sink so cbpprintf can render into a stack buffer.

Fstatic int woz_sink_out(int c, void *ctx)

modules/woz_uwb/src/facade/woz_logfmt.c:81

Sink callback for formatted output: append one character to the buffer if space remains.

c
Character to append.
ctx
Pointer to woz_sink context.
returns
Character appended.

Fstatic void woz_sink_str(struct woz_sink *s, const char *str)

modules/woz_uwb/src/facade/woz_logfmt.c:98

Append a null-terminated string to the sink buffer one character at a time, stopping at end of string or exhausted buffer space.

s
Sink context.
str
String to append (null-terminated).
called by woz_msg_format

Fstatic const char *module_color(const char *name)

modules/woz_uwb/src/facade/woz_logfmt.c:107

Stable per-module colour from a name hash (djb2).

called by woz_msg_format

Fstatic void woz_msg_format(const struct log_output *output, struct log_msg *msg, uint32_t flags)

modules/woz_uwb/src/facade/woz_logfmt.c:121

Render one message as SEC.NS module message, or delegate hexdumps.

calls module_color, woz_sink_str

Fstatic int woz_logfmt_init(void)

modules/woz_uwb/src/facade/woz_logfmt.c:231

Initialize the DWT cycle counter and log formatting on startup.

returns
0 on success.