|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Redirect ra8_log output into an ra8_io stream. More...
Go to the source code of this file.
Functions | |
| ra8_err_t | ra8_io_log_attach (ra8_io_stream_t *s) |
| Route ra8_log output to a bound ra8_io stream. | |
| void | ra8_io_log_detach (void) |
| Restore the default ITM log backend. | |
Redirect ra8_log output into an ra8_io stream.
Bridges the ra8_core logger to the ra8_io stream facade: attach a bound ra8_io_stream_t and every subsequent log byte (the [TAG] LEVEL: message line the logger would have sent to ITM) is written to that stream instead. This makes the log destination run-time selectable – a UART, a USB-CDC link, a RAM capture buffer, or a raw block device – without ra8_core depending on ra8_io. Detach to restore the default ITM backend.
Definition in file ra8_io_log.h.
|
nodiscard |
Route ra8_log output to a bound ra8_io stream.
| [in] | s | Bound stream to receive log bytes (must out-live the redirect). |
| k_ra8_ok | Logging now flows to s. |
| k_ra8_err_null_ptr | s was NULL. |
| k_ra8_err_not_initialized | s has no sink bound. |
Definition at line 61 of file ra8_io_log.c.
References ra8_io_stream_t::iface, internal_io_log_byte(), k_ra8_err_not_initialized, k_ra8_ok, RA8_CHECK_NULL_PTR, ra8_log_set_byte_sink(), and s_tag.
Referenced by main().
| void ra8_io_log_detach | ( | void | ) |
Restore the default ITM log backend.
Clears any stream installed by ra8_io_log_attach.
Definition at line 71 of file ra8_io_log.c.
References ra8_log_set_byte_sink().