|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Caller-buffer transaction adapter for verified C6 media sources. More...
Go to the source code of this file.
Data Structures | |
| struct | ra8_mdl_storage_ram_t |
| Mutable transaction over one caller-owned destination span. More... | |
Functions | |
| 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. | |
| 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. | |
Caller-buffer transaction adapter for verified C6 media sources.
Binds ra8_mdl_storage_iface_t to one caller-owned byte span. Downloaded source bytes stay private until commit, then become available through a read-only view. Abort discards the logical extent. This adapter is intended for bounded source material that the RA8 will transform before publishing; it owns no heap, filesystem, transport, or static workspace.
Definition in file ra8_mdl_storage_ram.h.
|
nodiscard |
Bind a caller buffer as one transactional media destination.
| [out] | storage | Caller-owned adapter state. |
| [out] | output | Bound coordinator interface. |
| [in,out] | data | Writable source-buffer backing. |
| [in] | capacity | Backing capacity in bytes. |
| k_ra8_ok | The idle adapter and complete interface are ready. |
| k_ra8_err_null_ptr | A required pointer is NULL. |
| k_ra8_err_invalid_size | capacity is zero. |
data spans capacity writable bytes. storage or data. output unchanged. Definition at line 164 of file ra8_mdl_storage_ram.c.
References internal_ram_abort(), internal_ram_begin(), internal_ram_commit(), internal_ram_write(), k_ra8_err_invalid_size, k_ra8_err_null_ptr, and k_ra8_ok.
Referenced by priv_media_download_image_run().
|
nodiscard |
Expose the complete committed source as an immutable byte view.
| [in] | storage | Initialized adapter state. |
| [out] | data | Receives the first committed byte. |
| [out] | length | Receives the exact committed byte count. |
| k_ra8_ok | A nonempty committed view was returned. |
| k_ra8_err_null_ptr | A required pointer is NULL. |
| k_ra8_err_invalid_state | No completed transaction is committed. |
storage is not concurrently mutated by a transfer. Definition at line 188 of file ra8_mdl_storage_ram.c.
References ra8_mdl_storage_ram_t::active, ra8_mdl_storage_ram_t::committed, ra8_mdl_storage_ram_t::data, k_ra8_err_invalid_state, k_ra8_err_null_ptr, k_ra8_ok, and ra8_mdl_storage_ram_t::length.
Referenced by internal_format().