Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
Go to the source code of this file.
Data Structures | |
struct | i2c_rtio |
Driver context for implementing i2c with rtio. More... | |
Macros | |
#define | I2C_RTIO_DEFINE(_name, _sq_sz, _cq_sz) |
Statically define an i2c_rtio context. | |
Functions | |
struct rtio_sqe * | i2c_rtio_copy (struct rtio *r, struct rtio_iodev *iodev, const struct i2c_msg *msgs, uint8_t num_msgs) |
Copy an array of i2c_msgs to rtio submissions and a transaction. | |
void | i2c_rtio_init (struct i2c_rtio *ctx, const struct device *dev) |
Initialize an i2c rtio context. | |
bool | i2c_rtio_complete (struct i2c_rtio *ctx, int status) |
Signal that the current (ctx->txn_curr) submission has been completed. | |
bool | i2c_rtio_submit (struct i2c_rtio *ctx, struct rtio_iodev_sqe *iodev_sqe) |
Submit, atomically, a submission to work on at some point. | |
int | i2c_rtio_configure (struct i2c_rtio *ctx, uint32_t i2c_config) |
Configure the I2C bus controller. | |
int | i2c_rtio_transfer (struct i2c_rtio *ctx, struct i2c_msg *msgs, uint8_t num_msgs, uint16_t addr) |
Transfer i2c messages in a blocking call. | |
int | i2c_rtio_recover (struct i2c_rtio *ctx) |
Perform an I2C bus recovery in a blocking call. | |
#define I2C_RTIO_DEFINE | ( | _name, | |
_sq_sz, | |||
_cq_sz | |||
) |
Statically define an i2c_rtio context.
_name | Symbolic name of the context |
_sq_sz | Submission queue entry pool size |
_cq_sz | Completion queue entry pool size |
Signal that the current (ctx->txn_curr) submission has been completed.
ctx | I2C RTIO driver context |
status | Completion status, negative values are errors |
true | Next submission is ready to start |
false | No more submissions to work on |
Configure the I2C bus controller.
Provides a compatible API for the existing i2c_configure API, and blocks the caller until the transfer completes.
See i2c_configure().
struct rtio_sqe * i2c_rtio_copy | ( | struct rtio * | r, |
struct rtio_iodev * | iodev, | ||
const struct i2c_msg * | msgs, | ||
uint8_t | num_msgs | ||
) |
Copy an array of i2c_msgs to rtio submissions and a transaction.
sqe | Last sqe setup in the copy |
NULL | Not enough memory to copy the transaction |
Initialize an i2c rtio context.
ctx | I2C RTIO driver context |
dev | I2C bus |
int i2c_rtio_recover | ( | struct i2c_rtio * | ctx | ) |
Perform an I2C bus recovery in a blocking call.
Provides a compatible API for the existing i2c_recover API, and blocks the caller until the process completes.
See i2c_recover().
bool i2c_rtio_submit | ( | struct i2c_rtio * | ctx, |
struct rtio_iodev_sqe * | iodev_sqe | ||
) |
Submit, atomically, a submission to work on at some point.
true | Next submission is ready to start |
false | No new submission to start or submissions are in progress already |
int i2c_rtio_transfer | ( | struct i2c_rtio * | ctx, |
struct i2c_msg * | msgs, | ||
uint8_t | num_msgs, | ||
uint16_t | addr | ||
) |
Transfer i2c messages in a blocking call.
Provides a compatible API for the existing i2c_transfer API, and blocks the caller until the transfer completes.
See i2c_transfer().