ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_io_blockdev_vsource_ctx_t Struct Reference

Caller-owned adapter context binding a block device to a vsource read. More...

#include <ra8_io_blockdev_vsource.h>

Collaboration diagram for ra8_io_blockdev_vsource_ctx_t:

Data Fields

const ra8_io_blockdev_tbd
 Bound block device (private; read-only use).
uint8_t scratch [(uint32_t) k_ra8_io_block_size_bytes]
 One-sector bounce buffer (private).

Detailed Description

Caller-owned adapter context binding a block device to a vsource read.

Zero-initialise and pass to ra8_io_blockdev_vsource_init, which records the bound block device and prepares the embedded one-sector bounce buffer. The ctx you register with ra8_vsource_add_paged is the address of this struct, and ra8_io_blockdev_vsource_read is the callback. Treat the fields as private. The struct and the bound device must out-live every read made through them.

Invariant
bd is non-NULL once ra8_io_blockdev_vsource_init has succeeded.
scratch is exactly one logical block (512 bytes).
Since
0.1.0

Definition at line 84 of file ra8_io_blockdev_vsource.h.

Field Documentation

◆ bd

const ra8_io_blockdev_t* ra8_io_blockdev_vsource_ctx_t::bd

Bound block device (private; read-only use).

Definition at line 85 of file ra8_io_blockdev_vsource.h.

Referenced by internal_bd_read_middle(), internal_bd_read_sector(), and ra8_io_blockdev_vsource_init().

◆ scratch

uint8_t ra8_io_blockdev_vsource_ctx_t::scratch[(uint32_t) k_ra8_io_block_size_bytes]

One-sector bounce buffer (private).

Definition at line 87 of file ra8_io_blockdev_vsource.h.

Referenced by internal_bd_copy_slice(), internal_bd_read_sector(), and ra8_io_blockdev_vsource_init().


The documentation for this struct was generated from the following file: