|
Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
|
RTIO Submission Queue Events and Related Functions. More...
#include <stdint.h>#include <string.h>#include <zephyr/kernel.h>#include <zephyr/sys/atomic.h>#include <zephyr/sys/mpsc_lockfree.h>#include <zephyr/sys/util.h>Go to the source code of this file.
Data Structures | |
| struct | rtio_sqe |
| A submission queue event. More... | |
| struct | rtio_iodev_sqe |
| IO device submission queue entry. More... | |
Macros | |
| #define | RTIO_PRIO_LOW 0U |
| Low priority. | |
| #define | RTIO_PRIO_NORM 127U |
| Normal priority. | |
| #define | RTIO_PRIO_HIGH 255U |
| High priority. | |
| #define | RTIO_SQE_CHAINED BIT(0) |
| The next request in the queue should wait on this one. | |
| #define | RTIO_SQE_TRANSACTION BIT(1) |
| The next request in the queue is part of a transaction. | |
| #define | RTIO_SQE_MEMPOOL_BUFFER BIT(2) |
| The buffer should be allocated by the RTIO mempool. | |
| #define | RTIO_SQE_CANCELED BIT(3) |
| The SQE should not execute if possible. | |
| #define | RTIO_SQE_MULTISHOT BIT(4) |
| The SQE should continue producing CQEs until canceled. | |
| #define | RTIO_SQE_NO_RESPONSE BIT(5) |
| The SQE does not produce a CQE. | |
| #define | RTIO_OP_NOP 0 |
| An operation that does nothing and will complete immediately. | |
| #define | RTIO_OP_RX (RTIO_OP_NOP+1) |
| An operation that receives (reads). | |
| #define | RTIO_OP_TX (RTIO_OP_RX+1) |
| An operation that transmits (writes). | |
| #define | RTIO_OP_TINY_TX (RTIO_OP_TX+1) |
| An operation that transmits tiny writes by copying the data to write. | |
| #define | RTIO_OP_CALLBACK (RTIO_OP_TINY_TX+1) |
| An operation that calls a given function (callback). | |
| #define | RTIO_OP_TXRX (RTIO_OP_CALLBACK+1) |
| An operation that transceives (reads and writes simultaneously). | |
| #define | RTIO_OP_DELAY (RTIO_OP_TXRX+1) |
| An operation that takes a specified amount of time (asynchronously) before completing. | |
| #define | RTIO_OP_I2C_RECOVER (RTIO_OP_DELAY+1) |
| An operation to recover I2C buses. | |
| #define | RTIO_OP_I2C_CONFIGURE (RTIO_OP_I2C_RECOVER+1) |
| An operation to configure I2C buses. | |
| #define | RTIO_OP_I3C_RECOVER (RTIO_OP_I2C_CONFIGURE+1) |
| An operation to recover I3C buses. | |
| #define | RTIO_OP_I3C_CONFIGURE (RTIO_OP_I3C_RECOVER+1) |
| An operation to configure I3C buses. | |
| #define | RTIO_OP_I3C_CCC (RTIO_OP_I3C_CONFIGURE+1) |
| An operation to sends I3C CCC. | |
| #define | RTIO_OP_AWAIT (RTIO_OP_I3C_CCC+1) |
| An operation to await a signal while blocking the iodev (if one is provided). | |
| #define | RTIO_IODEV_I2C_STOP BIT(1) |
| Equivalent to the I2C_MSG_STOP flag. | |
| #define | RTIO_IODEV_I2C_RESTART BIT(2) |
| Equivalent to the I2C_MSG_RESTART flag. | |
| #define | RTIO_IODEV_I2C_10_BITS BIT(3) |
| Equivalent to the I2C_MSG_ADDR_10_BITS. | |
| #define | RTIO_IODEV_I3C_STOP BIT(1) |
| Equivalent to the I3C_MSG_STOP flag. | |
| #define | RTIO_IODEV_I3C_RESTART BIT(2) |
| Equivalent to the I3C_MSG_RESTART flag. | |
| #define | RTIO_IODEV_I3C_HDR BIT(3) |
| Equivalent to the I3C_MSG_HDR. | |
| #define | RTIO_IODEV_I3C_NBCH BIT(4) |
| Equivalent to the I3C_MSG_NBCH. | |
| #define | RTIO_IODEV_I3C_HDR_MODE_MASK GENMASK(15, 8) |
| I3C HDR Mode Mask. | |
| #define | RTIO_IODEV_I3C_HDR_MODE_SET(flags) |
| I3C HDR Mode Mask. | |
| #define | RTIO_IODEV_I3C_HDR_MODE_GET(flags) |
| I3C HDR Mode Mask. | |
| #define | RTIO_IODEV_I3C_HDR_CMD_CODE_MASK GENMASK(22, 16) |
| I3C HDR 7b Command Code. | |
| #define | RTIO_IODEV_I3C_HDR_CMD_CODE_SET(flags) |
| I3C HDR 7b Command Code. | |
| #define | RTIO_IODEV_I3C_HDR_CMD_CODE_GET(flags) |
| I3C HDR 7b Command Code. | |
| #define | rtio_sqe_prep_delay(sqe, timeout, userdata) |
| Prepare a delay operation submission which completes after the given timeout. | |
Typedefs | |
| typedef void(* | rtio_callback_t) (struct rtio *r, const struct rtio_sqe *sqe, int res, void *arg0) |
| Callback signature for RTIO_OP_CALLBACK. | |
| typedef void(* | rtio_signaled_t) (struct rtio_iodev_sqe *iodev_sqe, void *userdata) |
| Callback signature for RTIO_OP_AWAIT signaled. | |
Functions | |
| static void | rtio_sqe_prep_nop (struct rtio_sqe *sqe, const struct rtio_iodev *iodev, void *userdata) |
| Prepare a nop (no op) submission. | |
| static void | rtio_sqe_prep_read (struct rtio_sqe *sqe, const struct rtio_iodev *iodev, int8_t prio, uint8_t *buf, uint32_t len, void *userdata) |
| Prepare a read op submission. | |
| static void | rtio_sqe_prep_read_with_pool (struct rtio_sqe *sqe, const struct rtio_iodev *iodev, int8_t prio, void *userdata) |
| Prepare a read op submission with context's mempool. | |
| static void | rtio_sqe_prep_read_multishot (struct rtio_sqe *sqe, const struct rtio_iodev *iodev, int8_t prio, void *userdata) |
| static void | rtio_sqe_prep_write (struct rtio_sqe *sqe, const struct rtio_iodev *iodev, int8_t prio, const uint8_t *buf, uint32_t len, void *userdata) |
| Prepare a write op submission. | |
| static void | rtio_sqe_prep_tiny_write (struct rtio_sqe *sqe, const struct rtio_iodev *iodev, int8_t prio, const uint8_t *tiny_write_data, uint8_t tiny_write_len, void *userdata) |
| Prepare a tiny write op submission. | |
| static void | rtio_sqe_prep_callback (struct rtio_sqe *sqe, rtio_callback_t callback, void *arg0, void *userdata) |
| Prepare a callback op submission. | |
| static void | rtio_sqe_prep_callback_no_cqe (struct rtio_sqe *sqe, rtio_callback_t callback, void *arg0, void *userdata) |
| Prepare a callback op submission that does not create a CQE. | |
| static void | rtio_sqe_prep_transceive (struct rtio_sqe *sqe, const struct rtio_iodev *iodev, int8_t prio, const uint8_t *tx_buf, uint8_t *rx_buf, uint32_t buf_len, void *userdata) |
| Prepare a transceive op submission. | |
| static void | rtio_sqe_prep_await (struct rtio_sqe *sqe, const struct rtio_iodev *iodev, int8_t prio, void *userdata) |
| Prepare an await op submission. | |
| static void | rtio_sqe_prep_await_iodev (struct rtio_sqe *sqe, const struct rtio_iodev *iodev, int8_t prio, void *userdata) |
| Prepare an await op submission which blocks an rtio_iodev until completion. | |
| static void | rtio_sqe_prep_await_executor (struct rtio_sqe *sqe, int8_t prio, void *userdata) |
| Prepare an await op submission which completes the sqe after being signaled. | |
| static struct rtio_iodev_sqe * | rtio_txn_next (const struct rtio_iodev_sqe *iodev_sqe) |
| Get the next sqe in the transaction. | |
| static struct rtio_iodev_sqe * | rtio_chain_next (const struct rtio_iodev_sqe *iodev_sqe) |
| Get the next sqe in the chain. | |
| static struct rtio_iodev_sqe * | rtio_iodev_sqe_next (const struct rtio_iodev_sqe *iodev_sqe) |
| Get the next sqe in the chain or transaction. | |
| static void | rtio_iodev_sqe_await_signal (struct rtio_iodev_sqe *iodev_sqe, rtio_signaled_t callback, void *userdata) |
| Await an AWAIT SQE signal from RTIO IODEV. | |
RTIO Submission Queue Events and Related Functions.