245 uint32_t* out_count);
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_i2c_state_t s_i2c_state[k_ra8_i2c_channel_count]
Per-channel state table indexed by channel.
const char *const g_i2c_tag
Log tag for this driver, shared with ra8_i2c_config.c.
I2C Bus Interface (IIC) controller driver – polling mode.
void(* ra8_i2c_peripheral_event_fn_t)(void *ctx, ra8_i2c_peripheral_event_t event)
Address-match callback fired by ra8_i2c_peripheral_dispatch.
bool priv_ra8_i2c_internal_peripheral_tx_continue(uint8_t icsr2, uint32_t sent, uint32_t len)
Transmit-loop predicate: keep sending while no NACK and data remains.
bool priv_ra8_i2c_internal_peripheral_poll_done(uint8_t icsr1, uint8_t icsr2)
Poll-exit predicate: an own-address match or a STOP was observed.
bool priv_ra8_i2c_internal_peripheral_rx_continue(uint8_t icsr2, uint32_t received, uint32_t capacity)
Receive-loop predicate: keep draining while no STOP and room remains.
bool priv_ra8_i2c_internal_clk_invalid(uint32_t bus_hz, uint32_t pclkb_hz)
Pure predicate: either clock argument is zero.
ra8_err_t priv_ra8_i2c_internal_target_drain_rx(volatile r_i2c_regs_t *reg, uint8_t *buf, uint32_t capacity, uint32_t *out_count)
Drain controller-write data bytes from ICDRR into buf.
bool priv_ra8_i2c_internal_peripheral_tx_done(uint8_t icsr2)
Transmit-completion predicate: the controller ended the read.
I2C Bus Interface (IIC) register layout for the Renesas RA8D2.
@ k_ra8_i2c_channel_count
HUM Ch 39.1, p 2367 (3 channels).
Memory-mapped register block for one IIC channel.
Per-channel driver state shared by both I2C translation units.
void * peripheral_ctx
Opaque context passed to peripheral_handler.
bool bus_held
True when the previous write returned with send_stop=false so the next call must inject a repeated-ST...
bool peripheral_active
True between ra8_i2c_peripheral_init and ra8_i2c_peripheral_deinit – own-address matching is armed an...
bool initialized
Tracks ra8_i2c_init / ra8_i2c_deinit.
ra8_i2c_peripheral_event_fn_t peripheral_handler
Address-match callback fired by ra8_i2c_peripheral_dispatch; NULL when no handler is attached.