|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
SPI_B backend binder for the ra8_io SPI-bus facade. More...
Go to the source code of this file.
Functions | |
| 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. | |
SPI_B backend binder for the ra8_io SPI-bus facade.
Binds a caller-owned ra8_io_spi_bus_t to the dedicated SPI_B block via thin trampolines to ra8_spi_xfer8 / ra8_spi_write_read / ra8_spi_set_clock (ra8_spi.h, unmodified). The channel must already be initialised through ra8_spi_init – the facade owns transfers only, never bring-up, so the caller keeps full control of mode, bit-rate, and chip-select routing.
Definition in file ra8_io_spi_bus_spi_b.h.
|
nodiscard |
Bind bus to SPI_B channel channel.
Installs the SPI_B trampoline vtable and records the channel in the handle context. No hardware is touched: initialise the channel with ra8_spi_init(channel, ...) (before or after binding) and route the pins yourself.
| [in,out] | bus | Caller-owned handle to bind (non-NULL). |
| [in] | channel | SPI_B channel index (0 or 1). |
| k_ra8_ok | bus now dispatches to ra8_spi_*. |
| k_ra8_err_null_ptr | bus was NULL. |
| k_ra8_err_invalid_arg | channel is out of range. |
Definition at line 143 of file ra8_io_spi_bus_spi_b.c.
References ra8_io_spi_bus_t::ctx, ra8_io_spi_bus_t::iface, k_ra8_err_invalid_arg, k_ra8_ok, k_ra8_spi_b_channel_count, RA8_CHECK_NULL_PTR, s_spi_b_iface, and s_tag.
Referenced by ep_bringup_panel_bus().