13#ifndef ZEPHYR_INCLUDE_DRIVERS_I2C_I2C_EMUL_H_
14#define ZEPHYR_INCLUDE_DRIVERS_I2C_I2C_EMUL_H_
Public APIs for the I2C drivers.
int(* i2c_emul_transfer_t)(const struct emul *target, struct i2c_msg *msgs, int num_msgs, int addr)
Passes I2C messages to the emulator.
Definition i2c_emul.h:69
int i2c_emul_register(const struct device *dev, struct i2c_emul *emul)
Register an emulated device on the controller.
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:412
An emulator instance - represents the target emulated device/peripheral that is interacted with throu...
Definition emul.h:82
Definition of the emulator API.
Definition i2c_emul.h:82
i2c_emul_transfer_t transfer
Definition i2c_emul.h:83
Node in a linked list of emulators for I2C devices.
Definition i2c_emul.h:37
const struct emul * target
Target emulator - REQUIRED for all emulated bus nodes of any type.
Definition i2c_emul.h:41
sys_snode_t node
Definition i2c_emul.h:38
const struct i2c_emul_api * api
Definition i2c_emul.h:44
uint16_t addr
Definition i2c_emul.h:53
struct i2c_emul_api * mock_api
A mock API that if not NULL will take precedence over the actual API.
Definition i2c_emul.h:50
One I2C Message.
Definition i2c.h:184