72typedef enum : uint16_t {
326ra8_smbus_block_read(uint8_t target_7b, uint8_t cmd, uint8_t* buf, uint8_t cap, uint8_t* out_len);
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Injected I2C-bus seam consumed by Ring-3 I2C device drivers.
ra8_err_t ra8_smbus_write_byte_data(uint8_t target_7b, uint8_t cmd, uint8_t data)
Write Byte Data: register-indexed byte write (SMBus 3.2 sec 6.5.4).
ra8_smbus_limits_t
Spec-mandated buffer ceilings.
@ k_ra8_smbus_block_max
Max data bytes per block xfer.
@ k_ra8_smbus_alert_addr_7b
Alert Response Address (ARA).
@ k_ra8_smbus_frame_max
Max wire bytes incl.
uint8_t ra8_smbus_pec(const uint8_t *data, uint32_t len)
Compute CRC-8/SMBus over a buffer.
ra8_err_t ra8_smbus_init(const ra8_smbus_cfg_t *cfg)
Initialise the SMBus layer over the injected bus seam.
ra8_err_t ra8_smbus_alert_register_callback(ra8_smbus_alert_fn_t fn, void *ctx)
Register a callback fired when ra8_smbus_alert_dispatch successfully reads the Alert Response Address...
ra8_err_t ra8_smbus_send_byte(uint8_t target_7b, uint8_t data)
Send Byte transaction (SMBus 3.2 section 6.5.2).
ra8_err_t ra8_smbus_block_write(uint8_t target_7b, uint8_t cmd, const uint8_t *data, uint8_t len)
Block Write (SMBus 3.2 section 6.5.7).
void(* ra8_smbus_alert_fn_t)(void *ctx, uint8_t target_7b, uint8_t status)
SMBALERT# notification callback.
ra8_err_t ra8_smbus_alert_dispatch(void)
Dispatch a single SMBALERT# event: read the ARA and fire the registered callback.
ra8_err_t ra8_smbus_block_read(uint8_t target_7b, uint8_t cmd, uint8_t *buf, uint8_t cap, uint8_t *out_len)
Block Read (SMBus 3.2 section 6.5.8).
ra8_err_t ra8_smbus_receive_byte(uint8_t target_7b, uint8_t *out_data)
Receive Byte transaction (SMBus 3.2 section 6.5.3).
ra8_err_t ra8_smbus_deinit(void)
Tear the SMBus layer down and release the driver slot.
ra8_err_t ra8_smbus_read_byte_data(uint8_t target_7b, uint8_t cmd, uint8_t *out_data)
Read Byte Data: register-indexed byte read (SMBus 3.2 sec 6.5.5).
Caller-filled I2C controller-transfer seam (write / read / write-then-read).
Configuration descriptor for ra8_smbus_init.
ra8_i2c_bus_ops_t bus
Injected I2C transfer seam (app-bound).
bool pec_enabled
Append + verify PEC on every xfer.