12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #ifndef ZEPHYR_INCLUDE_DRIVERS_SPI_SPI_EMUL_H_
- #define ZEPHYR_INCLUDE_DRIVERS_SPI_SPI_EMUL_H_
- #include <zephyr/types.h>
- #include <device.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- struct spi_msg;
- struct spi_emul_api;
- struct spi_emul {
- sys_snode_t node;
-
- const struct spi_emul_api *api;
-
- uint16_t chipsel;
- };
- 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);
- int spi_emul_register(const struct device *dev, const char *name,
- struct spi_emul *emul);
- struct spi_emul_api {
- spi_emul_io_t io;
- };
- uint32_t spi_emul_get_config(const struct device *dev);
- #ifdef __cplusplus
- }
- #endif
- #endif
|