|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Caller-filled SPI transfer seam: one full-duplex byte exchange. More...
#include <ra8_spi_bus_ops.h>
Data Fields | |
| ra8_err_t(* | xfer8 )(void *ctx, uint8_t tx, uint8_t *rx) |
| Full-duplex single-byte exchange on the bound bus. | |
| void * | ctx |
| Opaque cookie handed to xfer8 (binder-owned). | |
Caller-filled SPI transfer seam: one full-duplex byte exchange.
A device driver stores this struct by value from its config and routes every SPI byte through xfer8(ctx, ...). The ctx cookie is opaque to the driver; the binder that filled the seam decides what it points at (the Ring-4 ra8_io_spi_bus_as_ops() points it at the bound ra8_io_spi_bus_t handle, which must therefore out-live the driver). Tests may fill the seam directly with a local trampoline.
Definition at line 75 of file ra8_spi_bus_ops.h.
| void* ra8_spi_bus_ops_t::ctx |
Opaque cookie handed to xfer8 (binder-owned).
Definition at line 92 of file ra8_spi_bus_ops.h.
Referenced by internal_ra8_epaper_recv16(), internal_ra8_epaper_send16(), and ra8_io_spi_bus_as_ops().
Full-duplex single-byte exchange on the bound bus.
Shifts tx out on COPI while capturing the CIPO byte into *rx. rx may be NULL to discard the received byte. Matches the ra8_spi_xfer8 / ra8_sci_spi_xfer8 contract byte for byte.
| [in] | ctx | Binder-owned cookie (the ctx member below). |
| [in] | tx | Byte to shift out. |
| [out] | rx | Receive slot; may be NULL to discard. |
Definition at line 90 of file ra8_spi_bus_ops.h.
Referenced by internal_ra8_epaper_recv16(), internal_ra8_epaper_send16(), ra8_epaper_validate_cfg(), and ra8_io_spi_bus_as_ops().