Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
iodev.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2022 Intel Corporation
3 * SPDX-FileCopyrightText: <text>Copyright (c) 2026 Infineon Technologies AG,
4 * or an affiliate of Infineon Technologies AG. All rights reserved.</text>
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
14
15#ifndef ZEPHYR_INCLUDE_RTIO_IODEV_H_
16#define ZEPHYR_INCLUDE_RTIO_IODEV_H_
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
26
28struct rtio_iodev_sqe;
30
43 void (*submit)(struct rtio_iodev_sqe *iodev_sqe);
44};
45
49struct rtio_iodev {
51 const struct rtio_iodev_api *api;
52
54 void *data;
55};
56
57/* Do not try and reformat the macros */
58/* clang-format off */
59
67#define RTIO_IODEV_DEFINE(name, iodev_api, iodev_data) \
68 STRUCT_SECTION_ITERABLE(rtio_iodev, name) = { \
69 .api = (iodev_api), \
70 .data = (iodev_data), \
71 }
72
73/* clang-format on */
74
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* ZEPHYR_INCLUDE_RTIO_IODEV_H_ */
API that an RTIO IO device should implement.
Definition iodev.h:34
void(* submit)(struct rtio_iodev_sqe *iodev_sqe)
Submit to the iodev an entry to work on.
Definition iodev.h:43
IO device submission queue entry.
Definition sqe.h:398
An IO device with a function table for submitting requests.
Definition iodev.h:49
const struct rtio_iodev_api * api
Function pointer table.
Definition iodev.h:51
void * data
Data associated with this iodev.
Definition iodev.h:54