ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_io_stream_ram.h
Go to the documentation of this file.
1
18
19#pragma once
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include <stdint.h>
26
27#include "ra8_err.h"
28#include "ra8_io_stream.h"
29
43typedef struct {
44 uint8_t* buf;
45 uint32_t cap;
46 uint32_t len;
48
73 uint8_t* buf,
74 uint32_t cap);
75
96 uint32_t* out_used);
97
98#ifdef __cplusplus
99}
100#endif
Error Code Definitions for ra8-firmware.
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_ram_used(const ra8_io_stream_ram_state_t *state, uint32_t *out_used)
Report how many bytes have been captured into the RAM sink.
ra8_err_t ra8_io_stream_ram_init(ra8_io_stream_t *s, ra8_io_stream_ram_state_t *state, uint8_t *buf, uint32_t cap)
Bind a RAM stream sink into a caller-owned stream handle.
Caller-owned private state for a RAM stream sink.
uint32_t len
Bytes captured so far (private).
uint8_t * buf
Caller-owned capture buffer (private).
uint32_t cap
Buffer capacity in bytes (private).
Caller-allocated byte-stream handle binding a sink to its context.