Go to the source code of this file.
|
int | spi_rtio_copy (struct rtio *r, struct rtio_iodev *iodev, const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs, struct rtio_sqe **last_sqe) |
| Copy the tx_bufs and rx_bufs into a set of RTIO requests.
|
|
void | spi_rtio_init (struct spi_rtio *ctx, const struct device *dev) |
| Initialize a SPI RTIO context.
|
|
bool | spi_rtio_complete (struct spi_rtio *ctx, int status) |
| Signal that the current (ctx->txn_curr) submission has been completed.
|
|
bool | spi_rtio_submit (struct spi_rtio *ctx, struct rtio_iodev_sqe *iodev_sqe) |
| Submit, atomically, a submission to work on at some point.
|
|
int | spi_rtio_transceive (struct spi_rtio *ctx, const struct spi_config *config, const struct spi_buf_set *tx_bufs, const struct spi_buf_set *rx_bufs) |
| Perform a SPI Transfer (transceive) in a blocking call.
|
|
void | spi_rtio_iodev_default_submit (const struct device *dev, struct rtio_iodev_sqe *iodev_sqe) |
| Fallback SPI RTIO submit implementation.
|
|
◆ SPI_RTIO_DEFINE
#define SPI_RTIO_DEFINE |
( |
| _name, |
|
|
| _sq_sz, |
|
|
| _cq_sz ) |
Value:
};
#define RTIO_DEFINE(name, sq_sz, cq_sz)
Statically define and initialize an RTIO context.
Definition rtio.h:836
#define CONCAT(...)
Concatenate input arguments.
Definition util.h:318
Driver context for implementing SPI with RTIO.
Definition rtio.h:21
Statically define a spi_rtio context.
- Parameters
-
_name | Symbolic name of the context |
_sq_sz | Submission queue entry pool size |
_cq_sz | Completion queue entry pool size |
◆ spi_rtio_complete()
bool spi_rtio_complete |
( |
struct spi_rtio * | ctx, |
|
|
int | status ) |
Signal that the current (ctx->txn_curr) submission has been completed.
- Parameters
-
ctx | SPI RTIO driver context |
status | Completion status, negative values are errors |
- Return values
-
true | Next submission is ready to start |
false | No more submissions to work on |
◆ spi_rtio_copy()
Copy the tx_bufs and rx_bufs into a set of RTIO requests.
- Parameters
-
[in] | r | rtio context |
[in] | iodev | iodev to transceive with |
[in] | tx_bufs | transmit buffer set |
[in] | rx_bufs | receive buffer set |
[out] | last_sqe | last sqe submitted, NULL if not enough memory |
- Return values
-
Number | of submission queue entries |
-ENOMEM | out of memory |
◆ spi_rtio_init()
void spi_rtio_init |
( |
struct spi_rtio * | ctx, |
|
|
const struct device * | dev ) |
Initialize a SPI RTIO context.
- Parameters
-
ctx | SPI RTIO driver context |
dev | SPI bus |
◆ spi_rtio_iodev_default_submit()
Fallback SPI RTIO submit implementation.
Default RTIO SPI implementation for drivers who do no yet have native support. For details, see spi_iodev_submit.
◆ spi_rtio_submit()
Submit, atomically, a submission to work on at some point.
- Return values
-
true | Next submission is ready to start |
false | No new submission to start or submissions are in progress already |
◆ spi_rtio_transceive()
Perform a SPI Transfer (transceive) in a blocking call.
Provides a compatible API for the existing spi_transceive API by blocking the caller until the operation is complete. For details see spi_transceive.