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
16
extern
"C"
{
17
#endif
18
24
typedef
void (*
rtio_work_submit_t
)(
struct
rtio_iodev_sqe
*iodev_sqe);
25
32
struct
rtio_work_req
{
34
struct
k_p4wq_work
work
;
35
39
struct
rtio_iodev_sqe
*
iodev_sqe
;
40
44
rtio_work_submit_t
handler
;
45
};
46
56
struct
rtio_work_req
*
rtio_work_req_alloc
(
void
);
57
65
void
rtio_work_req_submit
(
struct
rtio_work_req
*req,
66
struct
rtio_iodev_sqe
*
iodev_sqe
,
67
rtio_work_submit_t
handler
);
68
74
uint32_t
rtio_work_req_used_count_get
(
void
);
75
76
#ifdef __cplusplus
77
}
78
#endif
79
80
#endif
/* ZEPHYR_INCLUDE_RTIO_WORKQ_H_ */
device.h
p4wq.h
rtio.h
Real-Time IO device API for moving bytes with low effort.
stdint.h
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
k_p4wq_work
P4 Queue Work Item.
Definition
p4wq.h:29
rtio_iodev_sqe
Compute the mempool block index for a given pointer.
Definition
rtio.h:423
rtio_work_req
RTIO Work request.
Definition
work.h:32
rtio_work_req::work
struct k_p4wq_work work
Work item used to submit unit of work.
Definition
work.h:34
rtio_work_req::handler
rtio_work_submit_t handler
Callback handler where synchronous operation may be executed.
Definition
work.h:44
rtio_work_req::iodev_sqe
struct rtio_iodev_sqe * iodev_sqe
Handle to IODEV SQE containing the operation.
Definition
work.h:39
handler
static void handler(struct k_timer *timer)
Definition
main.c:19
rtio_work_req_used_count_get
uint32_t rtio_work_req_used_count_get(void)
Obtain number of currently used items from the pre-allocated pool.
rtio_work_req_submit
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.
rtio_work_req_alloc
struct rtio_work_req * rtio_work_req_alloc(void)
Allocate item to perform an RTIO work request.
rtio_work_submit_t
void(* rtio_work_submit_t)(struct rtio_iodev_sqe *iodev_sqe)
Callback API to execute work operation.
Definition
work.h:24
include
zephyr
rtio
work.h
Generated on Sun Sep 15 2024 17:01:30 for Zephyr Project API by
1.9.8