39static const char*
const s_tag =
"ra8_io_i2c_bus_i3c";
77 return ra8_i3c_write((uint8_t)(uintptr_t)ctx, addr, data, len, !send_stop);
112 return ra8_i3c_read((uint8_t)(uintptr_t)ctx, addr, data, len,
false);
152 return ra8_i3c_transfer((uint8_t)(uintptr_t)ctx, addr, wr, wr_len, rd, rd_len);
169 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.
I3C Bus Interface driver – unified native-I3C + I2C-compat modes.
ra8_err_t ra8_i3c_read(uint8_t channel, uint8_t addr, uint8_t *buf, uint32_t len, bool restart)
Read len bytes from addr.
ra8_err_t ra8_i3c_transfer(uint8_t channel, uint8_t addr, const uint8_t *wr, uint32_t wr_len, uint8_t *rd, uint32_t rd_len)
Write-then-read with repeated-START framing (I2C mode).
ra8_err_t ra8_i3c_write(uint8_t channel, uint8_t addr, const uint8_t *data, uint32_t len, bool restart)
Write len bytes to addr.
IIC_B (I3C-based I2C) register layout for the Renesas RA8D2.
@ k_ra8_i3c_i2c_channel_count
HUM Ch 40.1.1, p 2445.
ra8_io I2C-bus facade – one controller-transfer vtable over thechip's two I2C implementations.
struct ra8_io_i2c_bus_iface ra8_io_i2c_bus_iface_t
static const ra8_io_i2c_bus_iface_t s_i3c_compat_iface
I3C I2C-compat backend vtable – every row forwards to ra8_i3c_*.
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.
static ra8_err_t internal_i3c_compat_write(void *ctx, uint8_t addr, const uint8_t *data, uint32_t len, bool send_stop)
I3C-compat backend: controller write.
static ra8_err_t internal_i3c_compat_read(void *ctx, uint8_t addr, uint8_t *data, uint32_t len)
I3C-compat backend: controller read.
static ra8_err_t internal_i3c_compat_transfer(void *ctx, uint8_t addr, const uint8_t *wr, uint32_t wr_len, uint8_t *rd, uint32_t rd_len)
I3C-compat backend: write-then-RESTART-then-read.
I3C I2C-compatibility backend binder for the ra8_io I2C-bus facade.
Internal vtable type for the ra8_io I2C-bus facade.
Caller-allocated I2C-bus handle binding a backend to its context.
const ra8_io_i2c_bus_iface_t * iface
Bound backend vtable (private).
void * ctx
Backend-private context (private).