Zephyr API Documentation 4.3.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: Copyright (c) 2026 Infineon Technologies AG,
4 * or an affiliate of Infineon Technologies AG.
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
13
14#ifndef ZEPHYR_INCLUDE_RTIO_IODEV_H_
15#define ZEPHYR_INCLUDE_RTIO_IODEV_H_
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
25
27struct rtio_iodev_sqe;
29
42 void (*submit)(struct rtio_iodev_sqe *iodev_sqe);
43};
44
48struct rtio_iodev {
49 /* Function pointer table */
50 const struct rtio_iodev_api *api;
51
52 /* Data associated with this iodev */
53 void *data;
54};
55
56/* Do not try and reformat the macros */
57/* clang-format off */
58
66#define RTIO_IODEV_DEFINE(name, iodev_api, iodev_data) \
67 STRUCT_SECTION_ITERABLE(rtio_iodev, name) = { \
68 .api = (iodev_api), \
69 .data = (iodev_data), \
70 }
71
72/* clang-format on */
73
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif /* ZEPHYR_INCLUDE_RTIO_IODEV_H_ */
API that an RTIO IO device should implement.
Definition iodev.h:33
void(* submit)(struct rtio_iodev_sqe *iodev_sqe)
Submit to the iodev an entry to work on.
Definition iodev.h:42
IO device submission queue entry.
Definition sqe.h:394
An IO device with a function table for submitting requests.
Definition iodev.h:48
const struct rtio_iodev_api * api
Definition iodev.h:50
void * data
Definition iodev.h:53