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

Caller-owned private state for a RAM block device. More...

#include <ra8_io_blockdev_ram.h>

Data Fields

uint8_t * storage
 Caller-owned backing buffer (private).
uint32_t block_count
 Number of 512-byte logical blocks (private).
bool read_only
 true => writes and erases are rejected (private).

Detailed Description

Caller-owned private state for a RAM block device.

Zero-initialise and pass to ra8_io_blockdev_ram_init, which fills it and binds it into a ra8_io_blockdev_t. Treat the fields as private. The storage buffer and this state must out-live every call made through the device.

Invariant
storage covers block_count * k_ra8_io_block_size_bytes bytes.
Since
0.1.0

Definition at line 46 of file ra8_io_blockdev_ram.h.

Field Documentation

◆ block_count

uint32_t ra8_io_blockdev_ram_state_t::block_count

Number of 512-byte logical blocks (private).

Definition at line 48 of file ra8_io_blockdev_ram.h.

Referenced by internal_ram_bounds(), internal_ram_get_caps(), and ra8_io_blockdev_ram_init().

◆ read_only

bool ra8_io_blockdev_ram_state_t::read_only

true => writes and erases are rejected (private).

Definition at line 49 of file ra8_io_blockdev_ram.h.

Referenced by internal_ram_erase(), internal_ram_get_caps(), internal_ram_write(), and ra8_io_blockdev_ram_init().

◆ storage

uint8_t* ra8_io_blockdev_ram_state_t::storage

Caller-owned backing buffer (private).

Definition at line 47 of file ra8_io_blockdev_ram.h.

Referenced by internal_ram_erase(), internal_ram_read(), internal_ram_write(), and ra8_io_blockdev_ram_init().


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