28static const char*
const s_tag =
"ra8_io_stream_uart";
66 if (out_written !=
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_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.
struct ra8_io_stream_iface ra8_io_stream_iface_t
Public implementer contract for ra8_io byte-stream backends.
ra8_err_t ra8_io_stream_bind(ra8_io_stream_t *stream, const ra8_io_stream_iface_t *iface, void *context)
Bind a backend vtable and caller-owned state into a stream handle.
static const ra8_io_stream_iface_t s_uart_iface
UART stream sink vtable.
ra8_err_t ra8_io_stream_uart_init(ra8_io_stream_t *s, ra8_io_stream_uart_state_t *state, uint8_t channel)
Bind a UART stream sink into a caller-owned stream handle.
static ra8_err_t internal_uart_flush(void *ctx)
UART sink: drain the SCI transmit shift register.
static ra8_err_t internal_uart_write(void *ctx, const uint8_t *buf, uint32_t len, uint32_t *out_written)
UART sink: write all bytes out of the SCI channel by polling.
ra8_io byte-stream sink over a UART/SCI channel.
Full-featured Serial Communications Interface driver.
ra8_err_t ra8_sci_write_polling(uint8_t channel, const uint8_t *data, uint32_t len)
Send len bytes by polling (convenience wrapper).
ra8_err_t ra8_sci_flush(uint8_t channel)
Block until the channel's transmit shift register is empty.
Caller-allocated byte-stream handle binding a sink to its context.
Caller-owned private state for a UART stream sink.
uint8_t channel
SCI channel index (private).