Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
work.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Croxel Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_RTIO_WORKQ_H_
8#define ZEPHYR_INCLUDE_RTIO_WORKQ_H_
9
10#include <stdint.h>
11#include <zephyr/device.h>
12#include <zephyr/rtio/rtio.h>
13#include <zephyr/sys/p4wq.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
24typedef void (*rtio_work_submit_t)(struct rtio_iodev_sqe *iodev_sqe);
25
46
57
68
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif /* ZEPHYR_INCLUDE_RTIO_WORKQ_H_ */
Real-Time IO device API for moving bytes with low effort.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
P4 Queue Work Item.
Definition p4wq.h:29
Compute the mempool block index for a given pointer.
Definition rtio.h:423
RTIO Work request.
Definition work.h:32
struct k_p4wq_work work
Work item used to submit unit of work.
Definition work.h:34
rtio_work_submit_t handler
Callback handler where synchronous operation may be executed.
Definition work.h:44
struct rtio_iodev_sqe * iodev_sqe
Handle to IODEV SQE containing the operation.
Definition work.h:39
static void handler(struct k_timer *timer)
Definition main.c:19
uint32_t rtio_work_req_used_count_get(void)
Obtain number of currently used items from the pre-allocated pool.
void rtio_work_req_submit(struct rtio_work_req *req, struct rtio_iodev_sqe *iodev_sqe, rtio_work_submit_t handler)
Submit RTIO work request.
struct rtio_work_req * rtio_work_req_alloc(void)
Allocate item to perform an RTIO work request.
void(* rtio_work_submit_t)(struct rtio_iodev_sqe *iodev_sqe)
Callback API to execute work operation.
Definition work.h:24