28static const char*
const s_tag =
"ra8_io_log";
64 if (s->
iface ==
nullptr) {
static const char * s_tag
Logging / check tag.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_not_initialized
Module not initialized – _init() not yet called successfully.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_err_t ra8_io_log_attach(ra8_io_stream_t *s)
Route ra8_log output to a bound ra8_io stream.
static void internal_io_log_byte(void *ctx, uint8_t byte)
Byte sink: write one log byte to the attached stream.
void ra8_io_log_detach(void)
Restore the default ITM log backend.
Redirect ra8_log output into an ra8_io stream.
ra8_io targetable byte-stream facade – one writer, many destinations.
ra8_err_t ra8_io_stream_write(ra8_io_stream_t *s, const uint8_t *buf, uint32_t len, uint32_t *out_written)
Write len bytes to the bound sink.
Lightweight Logging Interface for ra8-firmware.
void ra8_log_set_byte_sink(ra8_log_byte_sink_fn_t fn, void *ctx)
Install (or clear) an optional byte sink for log output.
Caller-allocated byte-stream handle binding a sink to its context.
const ra8_io_stream_iface_t * iface
Bound sink vtable (private).