|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
I3C I2C-compatibility backend binder for the ra8_io I2C-bus facade. More...
Go to the source code of this file.
Functions | |
| ra8_err_t | ra8_io_i2c_bus_bind_i3c_compat (ra8_io_i2c_bus_t *bus, uint8_t channel) |
| Bind bus to I3C channel channel in I2C-compatibility mode. | |
I3C I2C-compatibility backend binder for the ra8_io I2C-bus facade.
Binds a caller-owned ra8_io_i2c_bus_t to the I3C block running in its legacy I2C-compatibility controller mode via thin trampolines to ra8_i3c_write / ra8_i3c_read / ra8_i3c_transfer (ra8_i3c.h, unmodified). The channel must already be initialised through ra8_i3c_init with k_ra8_i3c_mode_i2c – the facade owns transfers only, never bring-up.
The facade's send_stop flag is adapted to the I3C driver's inverted restart flag inside the trampolines, so both backends present the identical ra8_io_i2c_bus_* semantics.
Definition in file ra8_io_i2c_bus_i3c_compat.h.
|
nodiscard |
Bind bus to I3C channel channel in I2C-compatibility mode.
Installs the I3C-compat trampoline vtable and records the channel in the handle context. No hardware is touched: initialise the channel with ra8_i3c_init(channel, ...) using k_ra8_i3c_mode_i2c (before or after binding) and route the SCL/SDA pins yourself.
| [in,out] | bus | Caller-owned handle to bind (non-NULL). |
| [in] | channel | I3C channel index (only 0 on RA8D2). |
| k_ra8_ok | bus now dispatches to ra8_i3c_*. |
| k_ra8_err_null_ptr | bus was NULL. |
| k_ra8_err_invalid_arg | channel is out of range. |
Definition at line 162 of file ra8_io_i2c_bus_i3c_compat.c.
References ra8_io_i2c_bus_t::ctx, ra8_io_i2c_bus_t::iface, k_ra8_err_invalid_arg, k_ra8_i3c_i2c_channel_count, k_ra8_ok, RA8_CHECK_NULL_PTR, s_i3c_compat_iface, and s_tag.
Referenced by main(), and ra8_board_touch_open().