Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
rtio.h File Reference
#include <zephyr/kernel.h>
#include <zephyr/drivers/i3c.h>
#include <zephyr/rtio/rtio.h>

Go to the source code of this file.

Data Structures

struct  i3c_rtio
 Driver context for implementing i3c with rtio. More...
 

Macros

#define I3C_RTIO_DEFINE(_name, _sq_sz, _cq_sz)
 Statically define an i3c_rtio context.
 

Functions

struct rtio_sqei3c_rtio_copy (struct rtio *r, struct rtio_iodev *iodev, const struct i3c_msg *msgs, uint8_t num_msgs)
 Copy an array of i3c_msgs to rtio submissions and a transaction.
 
void i3c_rtio_init (struct i3c_rtio *ctx)
 Initialize an i3c rtio context.
 
bool i3c_rtio_complete (struct i3c_rtio *ctx, int status)
 Signal that the current (ctx->txn_curr) submission has been completed.
 
bool i3c_rtio_submit (struct i3c_rtio *ctx, struct rtio_iodev_sqe *iodev_sqe)
 Submit, atomically, a submission to work on at some point.
 
int i3c_rtio_configure (struct i3c_rtio *ctx, enum i3c_config_type type, void *config)
 Configure the I3C bus controller.
 
int i3c_rtio_transfer (struct i3c_rtio *ctx, struct i3c_msg *msgs, uint8_t num_msgs, struct i3c_device_desc *desc)
 Transfer i3c messages in a blocking call.
 
int i3c_rtio_recover (struct i3c_rtio *ctx)
 Perform an I3C bus recovery in a blocking call.
 
int i3c_rtio_ccc (struct i3c_rtio *ctx, struct i3c_ccc_payload *payload)
 Perform an I3C CCC in a blocking call.
 

Macro Definition Documentation

◆ I3C_RTIO_DEFINE

#define I3C_RTIO_DEFINE ( _name,
_sq_sz,
_cq_sz )
Value:
RTIO_DEFINE(CONCAT(_name, _r), _sq_sz, _cq_sz); \
static struct i3c_rtio _name = { \
.r = &CONCAT(_name, _r), \
};
#define RTIO_DEFINE(name, sq_sz, cq_sz)
Statically define and initialize an RTIO context.
Definition rtio.h:908
#define CONCAT(...)
Concatenate input arguments.
Definition util.h:311
Driver context for implementing i3c with rtio.
Definition rtio.h:22

Statically define an i3c_rtio context.

Parameters
_nameSymbolic name of the context
_sq_szSubmission queue entry pool size
_cq_szCompletion queue entry pool size

Function Documentation

◆ i3c_rtio_ccc()

int i3c_rtio_ccc ( struct i3c_rtio * ctx,
struct i3c_ccc_payload * payload )

Perform an I3C CCC in a blocking call.

Provides a compatible API for the existing i3c_do_ccc API, and blocks the caller until the process completes.

See i3c_do_ccc().

◆ i3c_rtio_complete()

bool i3c_rtio_complete ( struct i3c_rtio * ctx,
int status )

Signal that the current (ctx->txn_curr) submission has been completed.

Parameters
ctxI3C RTIO driver context
statusCompletion status, negative values are errors
Return values
trueNext submission is ready to start
falseNo more submissions to work on

◆ i3c_rtio_configure()

int i3c_rtio_configure ( struct i3c_rtio * ctx,
enum i3c_config_type type,
void * config )

Configure the I3C bus controller.

Provides a compatible API for the existing i3c_configure API, and blocks the caller until the transfer completes.

See i3c_configure().

◆ i3c_rtio_copy()

struct rtio_sqe * i3c_rtio_copy ( struct rtio * r,
struct rtio_iodev * iodev,
const struct i3c_msg * msgs,
uint8_t num_msgs )

Copy an array of i3c_msgs to rtio submissions and a transaction.

Return values
sqeLast sqe setup in the copy
NULLNot enough memory to copy the transaction

◆ i3c_rtio_init()

void i3c_rtio_init ( struct i3c_rtio * ctx)

Initialize an i3c rtio context.

Parameters
ctxI3C RTIO driver context

◆ i3c_rtio_recover()

int i3c_rtio_recover ( struct i3c_rtio * ctx)

Perform an I3C bus recovery in a blocking call.

Provides a compatible API for the existing i3c_recover API, and blocks the caller until the process completes.

See i3c_recover().

◆ i3c_rtio_submit()

bool i3c_rtio_submit ( struct i3c_rtio * ctx,
struct rtio_iodev_sqe * iodev_sqe )

Submit, atomically, a submission to work on at some point.

Return values
trueNext submission is ready to start
falseNo new submission to start or submissions are in progress already

◆ i3c_rtio_transfer()

int i3c_rtio_transfer ( struct i3c_rtio * ctx,
struct i3c_msg * msgs,
uint8_t num_msgs,
struct i3c_device_desc * desc )

Transfer i3c messages in a blocking call.

Provides a compatible API for the existing i3c_transfer API, and blocks the caller until the transfer completes.

See i3c_transfer().