Zephyr API 3.6.99
|
MSPI Emulation Interface . More...
Data Structures | |
struct | emul_mspi_device_api |
Definition of the MSPI device emulator API. More... | |
struct | mspi_emul |
Node in a linked list of emulators for MSPI devices. More... | |
struct | emul_mspi_driver_api |
Definition of the MSPI controller emulator API. More... | |
Typedefs | |
typedef struct mspi_emul *(* | mspi_emul_find_emul) (const struct device *dev, uint16_t dev_idx) |
Find an emulator present on a MSPI bus. | |
typedef int(* | mspi_emul_trigger_event) (const struct device *dev, enum mspi_bus_event evt_type) |
Triggers an event on the emulator of MSPI controller side which causes calling specific callbacks. | |
typedef int(* | emul_mspi_dev_api_transceive) (const struct emul *target, const struct mspi_xfer_packet *packets, uint32_t num_packet, bool async, uint32_t timeout) |
Loopback MSPI transceive request to the device emulator as no real hardware attached. | |
Functions | |
int | mspi_emul_register (const struct device *dev, struct mspi_emul *emul) |
Register an emulated device on the controller. | |
MSPI Emulation Interface .
typedef int(* emul_mspi_dev_api_transceive) (const struct emul *target, const struct mspi_xfer_packet *packets, uint32_t num_packet, bool async, uint32_t timeout) |
#include <zephyr/drivers/mspi_emul.h>
Loopback MSPI transceive request to the device emulator as no real hardware attached.
target | The device Emulator instance |
packets | Pointer to the buffers of command, addr, data and etc. |
num_packet | The number of packets in packets. |
async | Indicate whether this is a asynchronous request. |
timeout | Maximum Time allowed for this request |
0 | If successful. |
-EIO | General input / output error. |
#include <zephyr/drivers/mspi_emul.h>
Find an emulator present on a MSPI bus.
At present the function is used only to find an emulator of the host device. It may be useful in systems with the SPI flash chips.
dev | MSPI emulation controller device |
dev_idx | Device index from device tree. |
typedef int(* mspi_emul_trigger_event) (const struct device *dev, enum mspi_bus_event evt_type) |
#include <zephyr/drivers/mspi_emul.h>
Triggers an event on the emulator of MSPI controller side which causes calling specific callbacks.
dev | MSPI emulation controller device |
evt_type | Event type to be triggered |
0 | If successful. |
-EIO | General input / output error. |
#include <zephyr/drivers/mspi_emul.h>
Register an emulated device on the controller.
dev | MSPI emulation controller device |
emul | MSPI device emulator to be registered |