ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_mdl_storage_ram.h
Go to the documentation of this file.
1
20#pragma once
21
22#include <stddef.h>
23#include <stdint.h>
24
26#include "ra8_err.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
41typedef struct {
42 uint8_t* data;
43 size_t capacity;
44 size_t length;
45 bool active;
46 bool committed;
48
68 uint8_t* data,
69 size_t capacity);
70
88 const uint8_t** data,
89 size_t* length);
90
91#ifdef __cplusplus
92} /* extern "C" */
93#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_err_t ra8_mdl_storage_ram_view(const ra8_mdl_storage_ram_t *storage, const uint8_t **data, size_t *length)
Expose the complete committed source as an immutable byte view.
ra8_err_t ra8_mdl_storage_ram_init(ra8_mdl_storage_ram_t *storage, ra8_mdl_storage_iface_t *output, uint8_t *data, size_t capacity)
Bind a caller buffer as one transactional media destination.
Mutable transaction over one caller-owned destination span.
size_t capacity
Writable backing capacity.
size_t length
Private or committed byte count.
bool committed
A read-only view may be exposed.
bool active
A transfer may append bytes.
uint8_t * data
Caller-owned backing bytes.