Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
SPI Emulation Interface. More...
Data Structures | |
struct | spi_emul |
struct | spi_emul_api |
Typedefs | |
typedef int(* | spi_emul_io_t) (struct spi_emul *emul, const struct spi_config *config, const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs) |
Functions | |
int | spi_emul_register (const struct device *dev, const char *name, struct spi_emul *emul) |
uint32_t | spi_emul_get_config (const struct device *dev) |
SPI Emulation Interface.
typedef int(* spi_emul_io_t) (struct spi_emul *emul, const struct spi_config *config, const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs) |
#include <include/drivers/spi_emul.h>
Passes SPI messages to the emulator. The emulator updates the data with what was read back.
emul | Emulator instance |
config | Pointer to a valid spi_config structure instance. Pointer-comparison may be used to detect changes from previous operations. |
tx_bufs | Buffer array where data to be sent originates from, or NULL if none. |
rx_bufs | Buffer array where data to be read will be written to, or NULL if none. |
0 | If successful. |
-EIO | General input / output error. |
#include <include/drivers/spi_emul.h>
Back door to allow an emulator to retrieve the host configuration.
dev | SPI device associated with the emulator |
#include <include/drivers/spi_emul.h>
Register an emulated device on the controller
dev | Device that will use the emulator |
name | User-friendly name for this emulator |
emul | SPI emulator to use |