7#ifndef ZEPHYR_INCLUDE_DRIVERS_SPI_SPI_EMUL_H_
8#define ZEPHYR_INCLUDE_DRIVERS_SPI_SPI_EMUL_H_
APIs and macros for the Zephyr device model.
Public APIs for the device emulation framework.
Main header file for SPI (Serial Peripheral Interface) driver API.
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:44
int(* spi_emul_io_t)(const struct emul *target, const struct spi_config *config, const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs)
Passes SPI messages to the emulator.
Definition spi_emul.h:75
int spi_emul_register(const struct device *dev, struct spi_emul *emul)
Register an emulated device on the controller.
uint32_t spi_emul_get_config(const struct device *dev)
Back door to allow an emulator to retrieve the host configuration.
Header file for the single-linked list API.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:543
An emulator instance - represents the target emulated device/peripheral that is interacted with throu...
Definition emul.h:88
SPI scatter-gather buffer array structure.
Definition spi.h:679
SPI controller configuration structure.
Definition spi.h:449
Definition of the emulator API.
Definition spi_emul.h:88
spi_emul_io_t io
Passes SPI messages to the emulator.
Definition spi_emul.h:90
Node in a linked list of emulators for SPI devices.
Definition spi_emul.h:39
const struct emul * target
Target emulator - REQUIRED for all bus emulators.
Definition spi_emul.h:44
sys_snode_t node
Node in the controller's linked list of emulators.
Definition spi_emul.h:41
struct spi_emul_api * mock_api
A mock API that if not NULL will take precedence over the actual API.
Definition spi_emul.h:53
uint16_t chipsel
SPI chip-select of the emulated device.
Definition spi_emul.h:56
const struct spi_emul_api * api
API provided for this device.
Definition spi_emul.h:47