|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Opaque to applications – backends implement this internally and export a binding helper through their own header. More...
#include <ra8_io_i2c_bus_internal.h>
Data Fields | |
| ra8_err_t(* | write )(void *ctx, uint8_t addr, const uint8_t *data, uint32_t len, bool send_stop) |
| Controller write; send_stop false holds the bus. | |
| ra8_err_t(* | read )(void *ctx, uint8_t addr, uint8_t *data, uint32_t len) |
| Controller read; always ends with STOP. | |
| ra8_err_t(* | transfer )(void *ctx, uint8_t addr, const uint8_t *wr, uint32_t wr_len, uint8_t *rd, uint32_t rd_len) |
| Write-then-RESTART-then-read combined transaction. | |
Opaque to applications – backends implement this internally and export a binding helper through their own header.
One vtable per I2C transport.
The concrete vtable layout lives in src/ra8_io_i2c_bus_internal.h. Apps never construct one; they call a backend's _bind_*() helper, which binds the backend's const vtable into a caller-owned ra8_io_i2c_bus_t.
Each callback receives the backend's opaque ctx (the bound channel) so backends keep no static state.
All three rows are mandatory: both RA8D2 I2C transports implement the full controller transfer surface, so the dispatcher never NULL-checks a row beyond the binding check on the handle itself.
Definition at line 49 of file ra8_io_i2c_bus_internal.h.
| ra8_err_t(* ra8_io_i2c_bus_iface::read) (void *ctx, uint8_t addr, uint8_t *data, uint32_t len) |
Controller read; always ends with STOP.
Definition at line 54 of file ra8_io_i2c_bus_internal.h.
Referenced by ra8_io_i2c_bus_read().
| ra8_err_t(* ra8_io_i2c_bus_iface::transfer) (void *ctx, uint8_t addr, const uint8_t *wr, uint32_t wr_len, uint8_t *rd, uint32_t rd_len) |
Write-then-RESTART-then-read combined transaction.
Definition at line 57 of file ra8_io_i2c_bus_internal.h.
Referenced by ra8_io_i2c_bus_transfer().
| ra8_err_t(* ra8_io_i2c_bus_iface::write) (void *ctx, uint8_t addr, const uint8_t *data, uint32_t len, bool send_stop) |
Controller write; send_stop false holds the bus.
Definition at line 51 of file ra8_io_i2c_bus_internal.h.
Referenced by ra8_io_i2c_bus_write().