|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
SCI Simple-SPI 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_sci_spi (ra8_io_spi_bus_t *bus, uint8_t channel) |
| Bind bus to SCI Simple-SPI channel channel. | |
SCI Simple-SPI backend binder for the ra8_io SPI-bus facade.
Binds a caller-owned ra8_io_spi_bus_t to an SCI channel running in Simple-SPI mode via thin trampolines to ra8_sci_spi_xfer8 / ra8_sci_spi_xfer / ra8_sci_spi_set_clock (ra8_sci_spi.h, unmodified). This is the transport behind the EK-RA8D2 Pmod2 microSD path. The channel must already be initialised through ra8_sci_spi_init – the facade owns transfers only, never bring-up.
The SCI block clocks 8-bit frames only, so ra8_io_spi_bus_write_read on this backend reports k_ra8_err_not_supported for 16/32-bit widths.
Definition in file ra8_io_spi_bus_sci_spi.h.
|
nodiscard |
Bind bus to SCI Simple-SPI channel channel.
Installs the SCI Simple-SPI trampoline vtable and records the channel in the handle context. No hardware is touched: initialise the channel with ra8_sci_spi_init(channel, ...) (before or after binding) and own the chip-select as a GPIO yourself.
| [in,out] | bus | Caller-owned handle to bind (non-NULL). |
| [in] | channel | SCI channel index (0..9). |
| k_ra8_ok | bus now dispatches to ra8_sci_spi_*. |
| k_ra8_err_null_ptr | bus was NULL. |
| k_ra8_err_invalid_arg | channel is out of range. |
Definition at line 151 of file ra8_io_spi_bus_sci_spi.c.
References ra8_io_spi_bus_t::ctx, ra8_io_spi_bus_t::iface, k_ra8_err_invalid_arg, k_ra8_ok, k_ra8_sci_channel_count, RA8_CHECK_NULL_PTR, s_sci_spi_iface, and s_tag.
Referenced by priv_ra8_esp_hosted_spi_open().