|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Fixed-frame memory source backend implementation. More...
#include "ra8_camera_source_memory.h"#include <stddef.h>#include <string.h>#include "ra8_attributes.h"#include "ra8_camera_internal.h"#include "ra8_err.h"Go to the source code of this file.
Functions | |
| static ra8_err_t | internal_memory_get_info (void *ctx, ra8_camera_source_info_t *out_info) |
| Query the fixed frame's native geometry. | |
| static ra8_err_t | internal_memory_capture (void *ctx, const ra8_camera_buffer_t *buffer, ra8_camera_frame_t *out_frame) |
| Copy the fixed frame into the caller's capture buffer. | |
| ra8_err_t | ra8_camera_source_memory_init (ra8_camera_source_t *source, ra8_camera_source_memory_state_t *state, const ra8_camera_frame_t *frame) |
| Bind a repeatable source backed by one immutable frame. | |
Variables | |
| static const ra8_camera_source_iface_t | s_memory_source_iface |
| Fixed-frame source vtable. | |
Fixed-frame memory source backend implementation.
Implements the private source vtable with bounds-checked metadata queries and a byte-for-byte copy into caller-owned capture storage.
Definition in file ra8_camera_source_memory.c.
|
static |
Copy the fixed frame into the caller's capture buffer.
Implements source capture as a bounded byte-for-byte copy.
| [in] | ctx | Bound memory-source state. |
| [in] | buffer | Caller-owned writable capture storage. |
| [out] | out_frame | Receives a view of copied bytes. |
| k_ra8_ok | Frame copied. |
| k_ra8_err_null_ptr | State, buffer, or output pointer is NULL. |
| k_ra8_err_invalid_size | Buffer cannot hold the fixed frame. |
Definition at line 81 of file ra8_camera_source_memory.c.
References ra8_camera_frame_t::bytes, ra8_camera_buffer_t::capacity, ra8_camera_buffer_t::data, ra8_camera_frame_t::data, ra8_camera_source_memory_state_t::frame, k_ra8_err_invalid_size, k_ra8_err_null_ptr, k_ra8_ok, and memcpy().
|
static |
Query the fixed frame's native geometry.
Copies immutable metadata from the memory-source state.
| [in] | ctx | Bound memory-source state. |
| [out] | out_info | Receives source geometry and capacity. |
| k_ra8_ok | Information returned. |
| k_ra8_err_null_ptr | State or output pointer is NULL. |
Definition at line 42 of file ra8_camera_source_memory.c.
References ra8_camera_frame_t::bytes, ra8_camera_frame_t::format, ra8_camera_source_memory_state_t::frame, ra8_camera_frame_t::height, k_ra8_err_null_ptr, k_ra8_ok, RA8_INTERNAL, ra8_camera_frame_t::stride_bytes, and ra8_camera_frame_t::width.
|
nodiscard |
Bind a repeatable source backed by one immutable frame.
| [out] | source | Caller-owned source handle to bind. |
| [out] | state | Caller-owned backend state to populate. |
| [in] | frame | Valid immutable frame to replay. |
| k_ra8_ok | Source bound. |
| k_ra8_err_null_ptr | An argument or frame->data was NULL. |
| other | Propagated from ra8_camera_frame_validate. |
Definition at line 108 of file ra8_camera_source_memory.c.
References ra8_camera_source_t::ctx, ra8_camera_source_memory_state_t::frame, ra8_camera_source_t::iface, k_ra8_err_null_ptr, k_ra8_ok, ra8_camera_frame_validate(), and s_memory_source_iface.
|
static |
Fixed-frame source vtable.
Definition at line 103 of file ra8_camera_source_memory.c.