|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
MSPI Transfer API. More...
Data Structures | |
| struct | mspi_ce_control |
| MSPI Chip Select control structure. More... | |
| struct | mspi_xfer_packet |
| MSPI peripheral xfer packet format. More... | |
| struct | mspi_xfer |
| MSPI peripheral xfer format This includes transfer related settings that may require configuring the hardware. More... | |
Functions | |
| int | mspi_transceive (const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_xfer *req) |
| Transfer request over MSPI. | |
| static int | mspi_transceive_data_only (const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_xfer_packet *packets, uint32_t num_packet, enum mspi_xfer_mode xfer_mode, bool async, uint32_t timeout) |
| Transfer data over MSPI without command or address phases. | |
MSPI Transfer API.
| int mspi_transceive | ( | const struct device * | controller, |
| const struct mspi_dev_id * | dev_id, | ||
| const struct mspi_xfer * | req ) |
#include <mspi.h>
Transfer request over MSPI.
This routines provides a generic interface to transfer a request synchronously/asynchronously.
The
| controller | Pointer to the device structure for the driver instance. |
| dev_id | Pointer to the device ID structure from a device. |
| req | Content of the request and request specific settings. |
| 0 | If successful. |
| -ENOTSUP | |
| -EIO | General input / output error, failed to send over the bus. |
|
inlinestatic |
#include <mspi.h>
Transfer data over MSPI without command or address phases.
Convenience wrapper over mspi_transceive() for transfers that consist of a data phase only. It builds the mspi_xfer from caller-owned packets and enforces the data-only contract (mspi_xfer::cmd_length and mspi_xfer::addr_length are 0). mspi_xfer_packet::cmd and mspi_xfer_packet::address are ignored by the driver.
This is the intended transfer call where the hardware cannot distinguish a command byte from a data byte and only mspi_xfer_packet::dir, mspi_xfer_packet::num_bytes and mspi_xfer_packet::data_buf are significant. It may equally be used by a controller for data-only transactions.
The packets remain caller owned and must stay valid until the transfer completes when async is true.
| controller | Pointer to the device structure for the driver instance. |
| dev_id | Pointer to the device ID structure from a device. |
| packets | Transfer packets. |
| num_packet | Number of transfer packets. |
| xfer_mode | Transfer mode (PIO/DMA). |
| async | Async or sync transfer. |
| timeout | Transfer timeout value(ms). |
| 0 | If successful. |
| -ENOTSUP | |
| -EIO | General input / output error, failed to send over the bus. |