40 if ((context ==
nullptr) || (destination ==
nullptr)) {
44 if (destination[0] ==
'\0') {
79 if ((context ==
nullptr) || (written ==
nullptr)) {
83 if ((data ==
nullptr) && (length != 0U)) {
119 if (context ==
nullptr) {
149 if (context ==
nullptr) {
171 if ((storage ==
nullptr) || (output ==
nullptr) || (data ==
nullptr)) {
174 if (capacity == 0U) {
190 if ((storage ==
nullptr) || (data ==
nullptr) || (length ==
nullptr)) {
196 *data = storage->
data;
197 *length = storage->
length;
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
struct ra8_mdl_storage_iface ra8_mdl_storage_iface_t
@ k_ra8_err_no_mem
Static buffer exhausted (no dynamic memory on this project).
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_err_invalid_state
Module in wrong state for requested operation.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_null_ptr
Pointer was NULL where a valid pointer was required.
@ k_ra8_err_invalid_size
Invalid size parameter (too large, too small, or misaligned).
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
void * memcpy(void *dst, const void *src, size_t n)
Copy memory area between non-overlapping regions.
static ra8_err_t internal_ram_begin(void *context, const char *destination)
Start a fresh private object in the bound caller buffer.
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.
static ra8_err_t internal_ram_write(void *context, const uint8_t *data, uint16_t length, uint16_t *written)
Append one complete transfer fragment to private RAM storage.
static ra8_err_t internal_ram_commit(void *context)
Publish the current private extent to the caller.
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.
static ra8_err_t internal_ram_abort(void *context)
Discard the logical extent of one active private object.
Caller-buffer transaction adapter for verified C6 media sources.
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.