ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_io_stream_posix.h
Go to the documentation of this file.
1
20
21#pragma once
22
23#ifndef RA8_OFF_TARGET
24#error "port/posix is host-only and must never be compiled or linked into target firmware."
25#endif
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#include "ra8_io_stream.h"
32
34typedef struct {
35 int fd;
37
55[[nodiscard]] ra8_err_t
57
58#ifdef __cplusplus
59}
60#endif
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
ra8_io targetable byte-stream facade – one writer, many destinations.
ra8_err_t ra8_io_stream_posix_init(ra8_io_stream_t *stream, ra8_io_stream_posix_state_t *state, int fd)
Bind a borrowed writable descriptor as a byte-stream sink.
Caller-owned state retained by one POSIX stream binding.
int fd
Borrowed writable descriptor; never closed by the adapter.
Caller-allocated byte-stream handle binding a sink to its context.