7#ifndef ZEPHYR_INCLUDE_DRIVERS_SPI_SPI_EMUL_H_
8#define ZEPHYR_INCLUDE_DRIVERS_SPI_SPI_EMUL_H_
Public API for SPI drivers and applications.
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
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:72
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.
__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:403
An emulator instance - represents the target emulated device/peripheral that is interacted with throu...
Definition emul.h:80
SPI buffer array structure.
Definition spi.h:437
SPI controller configuration structure.
Definition spi.h:301
Definition of the emulator API.
Definition spi_emul.h:85
spi_emul_io_t io
Definition spi_emul.h:86
Node in a linked list of emulators for SPI devices.
Definition spi_emul.h:37
const struct emul * target
Target emulator - REQUIRED for all bus emulators.
Definition spi_emul.h:41
sys_snode_t node
Definition spi_emul.h:38
struct spi_emul_api * mock_api
A mock API that if not NULL will take precedence over the actual API.
Definition spi_emul.h:50
uint16_t chipsel
Definition spi_emul.h:53
const struct spi_emul_api * api
Definition spi_emul.h:44