ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_i3c_i2c_internal.h
Go to the documentation of this file.
1
11
12#pragma once
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#include <stdint.h>
19
20#include "ra8_attributes.h"
21#include "ra8_err.h"
22#include "ra8_i3c_i2c.h"
23#include "ra8_i3c_i2c_regs.h"
24
52
67
87void priv_i3c_i2c_start(volatile r_i3c_i2c_regs_t* reg);
88
108void priv_i3c_i2c_stop(volatile r_i3c_i2c_regs_t* reg);
109
129void priv_i3c_i2c_clear_bst(volatile r_i3c_i2c_regs_t* reg);
130
155ra8_err_t priv_i3c_i2c_send_address(volatile r_i3c_i2c_regs_t* reg, uint8_t address_byte);
156
188bool priv_i3c_i2c_len_buf_invalid(uint32_t len, const void* buf);
189
224bool priv_i3c_i2c_should_dispatch(uint8_t mask, const void* cb);
225
226#ifdef __cplusplus
227}
228#endif
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
ra8_i3c_i2c_state_t s_iic_b_state[k_ra8_i3c_i2c_channel_count]
Per-channel state table indexed by channel.
IIC_B (I3C unified IP, I2C-only mode) controller driver.
void(* ra8_i3c_i2c_complete_fn_t)(void *ctx, uint8_t err_mask)
Transfer-complete / error callback signature.
void priv_i3c_i2c_start(volatile r_i3c_i2c_regs_t *reg)
Issue a START condition on the given channel registers.
bool priv_i3c_i2c_should_dispatch(uint8_t mask, const void *cb)
Pure predicate: non-zero error mask AND a non-NULL callback.
Definition ra8_i3c_i2c.c:96
void priv_i3c_i2c_clear_bst(volatile r_i3c_i2c_regs_t *reg)
Clear all latched bus-status flags ahead of a new transaction.
bool priv_i3c_i2c_len_buf_invalid(uint32_t len, const void *buf)
Pure predicate: non-zero length AND a NULL buffer pointer.
Definition ra8_i3c_i2c.c:76
ra8_err_t priv_i3c_i2c_send_address(volatile r_i3c_i2c_regs_t *reg, uint8_t address_byte)
Send a single address byte and wait for TDBEF0 readiness.
void priv_i3c_i2c_stop(volatile r_i3c_i2c_regs_t *reg)
Issue a STOP condition and clear the prior STOP-detect flag.
IIC_B (I3C-based I2C) register layout for the Renesas RA8D2.
@ k_ra8_i3c_i2c_channel_count
HUM Ch 40.1.1, p 2445.
Memory-mapped register block for one IIC_B / I3C channel.
Per-channel dispatch state shared across the driver's TUs.
bool bus_held
True when the previous transaction returned with restart=true and the next call must inject a RESTART...
void * ctx
Callback context.
bool initialized
Tracks ra8_i3c_i2c_init / ra8_i3c_i2c_deinit.
ra8_i3c_i2c_complete_fn_t cb
Callback or NULL.