|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Opaque to applications – backends implement this internally and export a binding helper through their own header. More...
#include <ra8_io_spi_bus_internal.h>
Data Fields | |
| ra8_err_t(* | xfer8 )(void *ctx, uint8_t tx, uint8_t *rx) |
| Full-duplex single-byte exchange (rx may be NULL). | |
| ra8_err_t(* | write_read )(void *ctx, const void *tx, void *rx, uint32_t len, ra8_spi_bit_width_t width) |
| Full-duplex multi-frame transfer (either buffer may be NULL). | |
| ra8_err_t(* | set_clock )(void *ctx, uint32_t baud_hz, uint32_t pclk_hz) |
| Re-program the bit-rate divider from baud_hz / pclk_hz. | |
Opaque to applications – backends implement this internally and export a binding helper through their own header.
One vtable per SPI transport.
The concrete vtable layout lives in src/ra8_io_spi_bus_internal.h. Apps never construct one; they call a backend's _bind_*() helper, which binds the backend's const vtable into a caller-owned ra8_io_spi_bus_t.
Each callback receives the backend's opaque ctx (the bound channel) so backends keep no static state.
All three rows are mandatory: both RA8D2 SPI transports implement the full transfer surface, so the dispatcher never NULL-checks a row beyond the binding check on the handle itself.
Definition at line 50 of file ra8_io_spi_bus_internal.h.
| ra8_err_t(* ra8_io_spi_bus_iface::set_clock) (void *ctx, uint32_t baud_hz, uint32_t pclk_hz) |
Re-program the bit-rate divider from baud_hz / pclk_hz.
Definition at line 59 of file ra8_io_spi_bus_internal.h.
Referenced by ra8_io_spi_bus_set_clock().
| ra8_err_t( * ra8_io_spi_bus_iface::write_read) (void *ctx, const void *tx, void *rx, uint32_t len, ra8_spi_bit_width_t width) |
Full-duplex multi-frame transfer (either buffer may be NULL).
Definition at line 55 of file ra8_io_spi_bus_internal.h.
Referenced by ra8_io_spi_bus_write_read().
| ra8_err_t(* ra8_io_spi_bus_iface::xfer8) (void *ctx, uint8_t tx, uint8_t *rx) |
Full-duplex single-byte exchange (rx may be NULL).
Definition at line 52 of file ra8_io_spi_bus_internal.h.
Referenced by ra8_io_spi_bus_xfer8().