33static const char*
const s_tag =
"ra8_io_spi_bus_spi_b";
150 bus->
ctx = (
void*)(uintptr_t)channel;
static const char * s_tag
Logging / check tag.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_io SPI-bus facade – one controller-transfer vtable over thechip's two SPI implementations.
struct ra8_io_spi_bus_iface ra8_io_spi_bus_iface_t
Internal vtable type for the ra8_io SPI-bus facade.
static ra8_err_t internal_spi_b_xfer8(void *ctx, uint8_t tx, uint8_t *rx)
SPI_B backend: full-duplex single-byte exchange.
static const ra8_io_spi_bus_iface_t s_spi_b_iface
SPI_B backend vtable – every row forwards to ra8_spi_*.
static ra8_err_t internal_spi_b_write_read(void *ctx, const void *tx, void *rx, uint32_t len, ra8_spi_bit_width_t width)
SPI_B backend: full-duplex multi-frame transfer.
ra8_err_t ra8_io_spi_bus_bind_spi_b(ra8_io_spi_bus_t *bus, uint8_t channel)
Bind bus to SPI_B channel channel.
static ra8_err_t internal_spi_b_set_clock(void *ctx, uint32_t baud_hz, uint32_t pclk_hz)
SPI_B backend: re-program the SPBR bit-rate divider.
SPI_B backend binder for the ra8_io SPI-bus facade.
SPI_B controller driver (RA8D2 Type-B SPI peripheral).
ra8_spi_bit_width_t
Per-frame bit width for multi-byte transfers.
ra8_err_t ra8_spi_write_read(uint8_t channel, const void *tx, void *rx, uint32_t len, ra8_spi_bit_width_t bit_width)
Multi-frame full-duplex polling transfer.
ra8_err_t ra8_spi_xfer8(uint8_t channel, uint8_t tx, uint8_t *rx)
Full-duplex 8-bit exchange.
ra8_err_t ra8_spi_set_clock(uint8_t channel, uint32_t baud_hz, uint32_t pclka_hz)
Change the SPI clock without tearing down the channel.
SPI_B register layout for the Renesas RA8D2.
@ k_ra8_spi_b_channel_count
SPI0 + SPI1.
Caller-allocated SPI-bus handle binding a backend to its context.
void * ctx
Backend-private context (private).
const ra8_io_spi_bus_iface_t * iface
Bound backend vtable (private).