13#ifndef ZEPHYR_INCLUDE_RTIO_REGMAP_H_
14#define ZEPHYR_INCLUDE_RTIO_REGMAP_H_
133 if (write_addr == NULL || read_reg == NULL) {
161 if (complete_op == NULL) {
#define RTIO_IODEV_I2C_RESTART
Equivalent to the I2C_MSG_RESTART flag.
Definition sqe.h:200
#define RTIO_IODEV_I2C_STOP
Equivalent to the I2C_MSG_STOP flag.
Definition sqe.h:195
#define RTIO_IODEV_I3C_STOP
Equivalent to the I3C_MSG_STOP flag.
Definition sqe.h:221
#define RTIO_IODEV_I3C_RESTART
Equivalent to the I3C_MSG_RESTART flag.
Definition sqe.h:226
#define RTIO_SQE_TRANSACTION
The next request in the queue is part of a transaction.
Definition sqe.h:94
#define RTIO_SQE_CHAINED
The next request in the queue should wait on this one.
Definition sqe.h:82
#define RTIO_PRIO_NORM
Normal priority.
Definition sqe.h:56
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.
Definition sqe.h:528
void(* rtio_callback_t)(struct rtio *r, const struct rtio_sqe *sqe, int res, void *arg0)
Callback signature for RTIO_OP_CALLBACK.
Definition sqe.h:292
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.
Definition sqe.h:457
static struct rtio_sqe * rtio_sqe_acquire(struct rtio *r)
Acquire a single submission queue event if available.
Definition rtio.h:341
static void rtio_sqe_drop_all(struct rtio *r)
Drop all previously acquired sqe.
Definition rtio.h:407
static void rtio_iodev_sqe_err(struct rtio_iodev_sqe *iodev_sqe, int result)
Inform the executor of a submissions completion with error.
Definition rtio.h:680
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.
Definition sqe.h:579
int rtio_submit(struct rtio *r, uint32_t wait_count)
Submit I/O requests to the underlying executor.
#define ENOMEM
Not enough core.
Definition errno.h:51
static void rtio_read_regs_async(struct rtio *r, struct rtio_iodev *iodev, rtio_bus_type bus_type, struct rtio_regs *regs, struct rtio_iodev_sqe *iodev_sqe, const struct device *dev, rtio_callback_t complete_op_cb)
Create a chain of SQEs representing a bus transaction to read a reg.
Definition regmap.h:119
rtio_bus_type
bus type
Definition regmap.h:49
@ RTIO_BUS_I2C
I2C bus.
Definition regmap.h:50
@ RTIO_BUS_I3C
I3C bus.
Definition regmap.h:52
@ RTIO_BUS_SPI
SPI bus.
Definition regmap.h:51
static bool rtio_is_i3c(rtio_bus_type bus_type)
check if bus is I3C
Definition regmap.h:80
static bool rtio_is_spi(rtio_bus_type bus_type)
check if bus is SPI
Definition regmap.h:60
static bool rtio_is_i2c(rtio_bus_type bus_type)
check if bus is I2C
Definition regmap.h:70
Real-Time IO device API for moving bytes with low effort.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
IO device submission queue entry.
Definition sqe.h:398
An IO device with a function table for submitting requests.
Definition iodev.h:49
Description of a single memory chunk.
Definition regmap.h:31
uint8_t * bufp
Valid pointer to a data buffer.
Definition regmap.h:36
size_t len
Length of the buffer in bytes.
Definition regmap.h:39
uint8_t reg_addr
Register address.
Definition regmap.h:33
A structure to describe a list of not-consecutive memory chunks for RTIO operations.
Definition regmap.h:26
size_t rtio_regs_num
Number of registers in the list.
Definition regmap.h:28
struct rtio_regs::rtio_regs_list * rtio_regs_list
Array of rtio_regs_num memory chunks.
A submission queue event.
Definition sqe.h:305
const struct rtio_iodev * iodev
Device to operation on.
Definition sqe.h:314
uint32_t iodev_flags
Op iodev flags.
Definition sqe.h:312
uint16_t flags
Op Flags.
Definition sqe.h:310
An RTIO context containing what can be viewed as a pair of queues.
Definition rtio.h:71