1 | /* SPDX-License-Identifier: BSD-2-Clause */ |
---|
2 | |
---|
3 | /** |
---|
4 | * @file |
---|
5 | * |
---|
6 | * @ingroup RTEMSImplClassic |
---|
7 | * |
---|
8 | * @brief This header file provides types used by the Classic API. |
---|
9 | */ |
---|
10 | |
---|
11 | /* |
---|
12 | * Copyright (C) 2009, 2021 embedded brains GmbH & Co. KG |
---|
13 | * Copyright (C) 1988, 2017 On-Line Applications Research Corporation (OAR) |
---|
14 | * |
---|
15 | * Redistribution and use in source and binary forms, with or without |
---|
16 | * modification, are permitted provided that the following conditions |
---|
17 | * are met: |
---|
18 | * 1. Redistributions of source code must retain the above copyright |
---|
19 | * notice, this list of conditions and the following disclaimer. |
---|
20 | * 2. Redistributions in binary form must reproduce the above copyright |
---|
21 | * notice, this list of conditions and the following disclaimer in the |
---|
22 | * documentation and/or other materials provided with the distribution. |
---|
23 | * |
---|
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
27 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
---|
28 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
29 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
30 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
31 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
32 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
33 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
---|
34 | * POSSIBILITY OF SUCH DAMAGE. |
---|
35 | */ |
---|
36 | |
---|
37 | /* |
---|
38 | * This file is part of the RTEMS quality process and was automatically |
---|
39 | * generated. If you find something that needs to be fixed or |
---|
40 | * worded better please post a report or patch to an RTEMS mailing list |
---|
41 | * or raise a bug report: |
---|
42 | * |
---|
43 | * https://www.rtems.org/bugs.html |
---|
44 | * |
---|
45 | * For information on updating and regenerating please refer to the How-To |
---|
46 | * section in the Software Requirements Engineering chapter of the |
---|
47 | * RTEMS Software Engineering manual. The manual is provided as a part of |
---|
48 | * a release. For development sources please refer to the online |
---|
49 | * documentation at: |
---|
50 | * |
---|
51 | * https://docs.rtems.org |
---|
52 | */ |
---|
53 | |
---|
54 | /* Generated from spec:/rtems/type/if/header */ |
---|
55 | |
---|
56 | #ifndef _RTEMS_RTEMS_TYPES_H |
---|
57 | #define _RTEMS_RTEMS_TYPES_H |
---|
58 | |
---|
59 | #include <stdint.h> |
---|
60 | #include <sys/_timespec.h> |
---|
61 | #include <sys/_timeval.h> |
---|
62 | #include <sys/cpuset.h> |
---|
63 | #include <rtems/rtems/modes.h> |
---|
64 | #include <rtems/score/cpuopts.h> |
---|
65 | #include <rtems/score/object.h> |
---|
66 | #include <rtems/score/watchdogticks.h> |
---|
67 | |
---|
68 | #if defined(RTEMS_MULTIPROCESSING) |
---|
69 | #include <rtems/score/mpci.h> |
---|
70 | #include <rtems/score/mppkt.h> |
---|
71 | #endif |
---|
72 | |
---|
73 | #ifdef __cplusplus |
---|
74 | extern "C" { |
---|
75 | #endif |
---|
76 | |
---|
77 | /* Generated from spec:/rtems/type/if/group */ |
---|
78 | |
---|
79 | /** |
---|
80 | * @defgroup RTEMSAPIClassicTypes Basic Types |
---|
81 | * |
---|
82 | * @ingroup RTEMSAPIClassic |
---|
83 | * |
---|
84 | * @brief This group contains basic Classic API types. |
---|
85 | */ |
---|
86 | |
---|
87 | /* Generated from spec:/rtems/type/if/id */ |
---|
88 | |
---|
89 | /** |
---|
90 | * @ingroup RTEMSAPIClassicTypes |
---|
91 | * |
---|
92 | * @brief This type represents RTEMS object identifiers. |
---|
93 | */ |
---|
94 | typedef Objects_Id rtems_id; |
---|
95 | |
---|
96 | /* Generated from spec:/rtems/type/if/id-none */ |
---|
97 | |
---|
98 | /** |
---|
99 | * @ingroup RTEMSAPIClassicTypes |
---|
100 | * |
---|
101 | * @brief This constant represents an invalid RTEMS object identifier. |
---|
102 | * |
---|
103 | * No RTEMS object can have this identifier. |
---|
104 | */ |
---|
105 | #define RTEMS_ID_NONE OBJECTS_ID_NONE |
---|
106 | |
---|
107 | /* Generated from spec:/rtems/type/if/interval */ |
---|
108 | |
---|
109 | /** |
---|
110 | * @ingroup RTEMSAPIClassicTypes |
---|
111 | * |
---|
112 | * @brief This type represents clock tick intervals. |
---|
113 | */ |
---|
114 | typedef Watchdog_Interval rtems_interval; |
---|
115 | |
---|
116 | #if defined(RTEMS_MULTIPROCESSING) |
---|
117 | /* Generated from spec:/rtems/type/if/mp-packet-classes */ |
---|
118 | |
---|
119 | /** |
---|
120 | * @ingroup RTEMSAPIClassicTypes |
---|
121 | * |
---|
122 | * @brief This enumeration defines the MPCI packet classes. |
---|
123 | */ |
---|
124 | typedef MP_packet_Classes rtems_mp_packet_classes; |
---|
125 | #endif |
---|
126 | |
---|
127 | #if defined(RTEMS_MULTIPROCESSING) |
---|
128 | /* Generated from spec:/rtems/type/if/mpci-entry */ |
---|
129 | |
---|
130 | /** |
---|
131 | * @ingroup RTEMSAPIClassicTypes |
---|
132 | * |
---|
133 | * @brief MPCI handler routines shall have this return type. |
---|
134 | */ |
---|
135 | typedef MPCI_Entry rtems_mpci_entry; |
---|
136 | #endif |
---|
137 | |
---|
138 | #if defined(RTEMS_MULTIPROCESSING) |
---|
139 | /* Generated from spec:/rtems/type/if/mpci-get-packet-entry */ |
---|
140 | |
---|
141 | /** |
---|
142 | * @ingroup RTEMSAPIClassicTypes |
---|
143 | * |
---|
144 | * @brief MPCI get packet routines shall have this type. |
---|
145 | */ |
---|
146 | typedef MPCI_get_packet_entry rtems_mpci_get_packet_entry; |
---|
147 | #endif |
---|
148 | |
---|
149 | #if defined(RTEMS_MULTIPROCESSING) |
---|
150 | /* Generated from spec:/rtems/type/if/mpci-initialization-entry */ |
---|
151 | |
---|
152 | /** |
---|
153 | * @ingroup RTEMSAPIClassicTypes |
---|
154 | * |
---|
155 | * @brief MPCI initialization routines shall have this type. |
---|
156 | */ |
---|
157 | typedef MPCI_initialization_entry rtems_mpci_initialization_entry; |
---|
158 | #endif |
---|
159 | |
---|
160 | #if defined(RTEMS_MULTIPROCESSING) |
---|
161 | /* Generated from spec:/rtems/type/if/mpci-receive-packet-entry */ |
---|
162 | |
---|
163 | /** |
---|
164 | * @ingroup RTEMSAPIClassicTypes |
---|
165 | * |
---|
166 | * @brief MPCI receive packet routines shall have this type. |
---|
167 | */ |
---|
168 | typedef MPCI_receive_entry rtems_mpci_receive_packet_entry; |
---|
169 | #endif |
---|
170 | |
---|
171 | #if defined(RTEMS_MULTIPROCESSING) |
---|
172 | /* Generated from spec:/rtems/type/if/mpci-return-packet-entry */ |
---|
173 | |
---|
174 | /** |
---|
175 | * @ingroup RTEMSAPIClassicTypes |
---|
176 | * |
---|
177 | * @brief MPCI return packet routines shall have this type. |
---|
178 | */ |
---|
179 | typedef MPCI_return_packet_entry rtems_mpci_return_packet_entry; |
---|
180 | #endif |
---|
181 | |
---|
182 | #if defined(RTEMS_MULTIPROCESSING) |
---|
183 | /* Generated from spec:/rtems/type/if/mpci-send-packet-entry */ |
---|
184 | |
---|
185 | /** |
---|
186 | * @ingroup RTEMSAPIClassicTypes |
---|
187 | * |
---|
188 | * @brief MPCI send packet routines shall have this type. |
---|
189 | */ |
---|
190 | typedef MPCI_send_entry rtems_mpci_send_packet_entry; |
---|
191 | #endif |
---|
192 | |
---|
193 | #if defined(RTEMS_MULTIPROCESSING) |
---|
194 | /* Generated from spec:/rtems/type/if/mpci-table */ |
---|
195 | |
---|
196 | /** |
---|
197 | * @ingroup RTEMSAPIClassicTypes |
---|
198 | * |
---|
199 | * @brief This type represents the user-provided MPCI control. |
---|
200 | */ |
---|
201 | typedef MPCI_Control rtems_mpci_table; |
---|
202 | #endif |
---|
203 | |
---|
204 | #if defined(RTEMS_MULTIPROCESSING) |
---|
205 | /* Generated from spec:/rtems/type/if/multiprocessing-table */ |
---|
206 | |
---|
207 | /** |
---|
208 | * @ingroup RTEMSAPIClassicTypes |
---|
209 | * |
---|
210 | * @brief This type represents the user-provided MPCI configuration. |
---|
211 | */ |
---|
212 | typedef MPCI_Configuration rtems_multiprocessing_table; |
---|
213 | #endif |
---|
214 | |
---|
215 | /* Generated from spec:/rtems/type/if/name */ |
---|
216 | |
---|
217 | /** |
---|
218 | * @ingroup RTEMSAPIClassicTypes |
---|
219 | * |
---|
220 | * @brief This type represents Classic API object names. |
---|
221 | * |
---|
222 | * It is an unsigned 32-bit integer which can be treated as a numeric value or |
---|
223 | * initialized using rtems_build_name() to encode four ASCII characters. A |
---|
224 | * value of zero may have a special meaning in some directives. |
---|
225 | */ |
---|
226 | typedef uint32_t rtems_name; |
---|
227 | |
---|
228 | /* Generated from spec:/rtems/type/if/no-timeout */ |
---|
229 | |
---|
230 | /** |
---|
231 | * @ingroup RTEMSAPIClassicTypes |
---|
232 | * |
---|
233 | * @brief This clock tick interval constant indicates that the calling task is |
---|
234 | * willing to wait potentially forever on a resource. |
---|
235 | */ |
---|
236 | #define RTEMS_NO_TIMEOUT ( (rtems_interval) WATCHDOG_NO_TIMEOUT ) |
---|
237 | |
---|
238 | #if defined(RTEMS_MULTIPROCESSING) |
---|
239 | /* Generated from spec:/rtems/type/if/packet-prefix */ |
---|
240 | |
---|
241 | /** |
---|
242 | * @ingroup RTEMSAPIClassicTypes |
---|
243 | * |
---|
244 | * @brief This type represents the prefix found at the beginning of each MPCI |
---|
245 | * packet sent between nodes. |
---|
246 | */ |
---|
247 | typedef MP_packet_Prefix rtems_packet_prefix; |
---|
248 | #endif |
---|
249 | |
---|
250 | /* Generated from spec:/rtems/type/if/priority */ |
---|
251 | |
---|
252 | /** |
---|
253 | * @ingroup RTEMSAPIClassicTypes |
---|
254 | * |
---|
255 | * @brief This integer type represents task priorities of the Classic API. |
---|
256 | */ |
---|
257 | typedef uint32_t rtems_task_priority; |
---|
258 | |
---|
259 | /* Generated from spec:/rtems/type/if/time-of-day */ |
---|
260 | |
---|
261 | /** |
---|
262 | * @ingroup RTEMSAPIClassicTypes |
---|
263 | * |
---|
264 | * @brief This type represents Classic API calendar times. |
---|
265 | */ |
---|
266 | typedef struct { |
---|
267 | /** |
---|
268 | * @brief This member contains the year A.D. |
---|
269 | */ |
---|
270 | uint32_t year; |
---|
271 | |
---|
272 | /** |
---|
273 | * @brief This member contains the month of the year with values from 1 to 12. |
---|
274 | */ |
---|
275 | uint32_t month; |
---|
276 | |
---|
277 | /** |
---|
278 | * @brief This member contains the day of the month with values from 1 to 31. |
---|
279 | */ |
---|
280 | uint32_t day; |
---|
281 | |
---|
282 | /** |
---|
283 | * @brief This member contains the hour of the day with values from 0 to 23. |
---|
284 | */ |
---|
285 | uint32_t hour; |
---|
286 | |
---|
287 | /** |
---|
288 | * @brief This member contains the minute of the hour with values from 0 to 59. |
---|
289 | */ |
---|
290 | uint32_t minute; |
---|
291 | |
---|
292 | /** |
---|
293 | * @brief This member contains the second of the minute with values from 0 to |
---|
294 | * 59. |
---|
295 | */ |
---|
296 | uint32_t second; |
---|
297 | |
---|
298 | /** |
---|
299 | * @brief This member contains the clock tick of the second with values from 0 |
---|
300 | * to rtems_clock_get_ticks_per_second() minus one. |
---|
301 | */ |
---|
302 | uint32_t ticks; |
---|
303 | } rtems_time_of_day; |
---|
304 | |
---|
305 | #ifdef __cplusplus |
---|
306 | } |
---|
307 | #endif |
---|
308 | |
---|
309 | #endif /* _RTEMS_RTEMS_TYPES_H */ |
---|