source: rtems/cpukit/include/rtems/rtems/types.h

Last change on this file was bcef89f2, checked in by Sebastian Huber <sebastian.huber@…>, on 05/19/23 at 06:18:25

Update company name

The embedded brains GmbH & Co. KG is the legal successor of embedded
brains GmbH.

  • Property mode set to 100644
File size: 8.1 KB
RevLine 
[9b4458e7]1/* SPDX-License-Identifier: BSD-2-Clause */
2
[4b487363]3/**
[e4f2fe1]4 * @file
[067a96a]5 *
[3247b16]6 * @ingroup RTEMSImplClassic
7 *
[9b4458e7]8 * @brief This header file provides types used by the Classic API.
9 */
10
11/*
[bcef89f2]12 * Copyright (C) 2009, 2021 embedded brains GmbH & Co. KG
[d6a649d5]13 * Copyright (C) 1988, 2017 On-Line Applications Research Corporation (OAR)
[9b4458e7]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.
[e4f2fe1]23 *
[9b4458e7]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.
[4b487363]35 */
36
[9b4458e7]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 *
[a6689fb1]43 * https://www.rtems.org/bugs.html
[3235ad9]44 *
[a6689fb1]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:
[9b4458e7]50 *
[a6689fb1]51 * https://docs.rtems.org
[3235ad9]52 */
53
[9b4458e7]54/* Generated from spec:/rtems/type/if/header */
55
[092f142a]56#ifndef _RTEMS_RTEMS_TYPES_H
57#define _RTEMS_RTEMS_TYPES_H
[3235ad9]58
[9b4458e7]59#include <stdint.h>
[78bbe59]60#include <sys/_timespec.h>
[98c01a5]61#include <sys/_timeval.h>
[9b4458e7]62#include <sys/cpuset.h>
63#include <rtems/rtems/modes.h>
[85d482f]64#include <rtems/score/cpuopts.h>
[5e9b32b]65#include <rtems/score/object.h>
[ccc6695]66#include <rtems/score/watchdogticks.h>
[9b4458e7]67
[97e2729d]68#if defined(RTEMS_MULTIPROCESSING)
[9b4458e7]69  #include <rtems/score/mpci.h>
[35106bd]70  #include <rtems/score/mppkt.h>
[97e2729d]71#endif
[3235ad9]72
[a9cb0b0]73#ifdef __cplusplus
74extern "C" {
75#endif
76
[9b4458e7]77/* Generated from spec:/rtems/type/if/group */
[e4f2fe1]78
79/**
[9b4458e7]80 * @defgroup RTEMSAPIClassicTypes Basic Types
[e4f2fe1]81 *
[9b4458e7]82 * @ingroup RTEMSAPIClassic
83 *
84 * @brief This group contains basic Classic API types.
[e4f2fe1]85 */
[0868844e]86
[9b4458e7]87/* Generated from spec:/rtems/type/if/id */
[3235ad9]88
[8c8fd64]89/**
[9b4458e7]90 * @ingroup RTEMSAPIClassicTypes
[e4f2fe1]91 *
[9b4458e7]92 * @brief This type represents RTEMS object identifiers.
[8c8fd64]93 */
[9b4458e7]94typedef Objects_Id rtems_id;
95
96/* Generated from spec:/rtems/type/if/id-none */
[0868844e]97
[8c8fd64]98/**
[9b4458e7]99 * @ingroup RTEMSAPIClassicTypes
[e4f2fe1]100 *
[9b4458e7]101 * @brief This constant represents an invalid RTEMS object identifier.
[141e16d]102 *
[9b4458e7]103 * No RTEMS object can have this identifier.
[8c8fd64]104 */
[9b4458e7]105#define RTEMS_ID_NONE OBJECTS_ID_NONE
[3235ad9]106
[9b4458e7]107/* Generated from spec:/rtems/type/if/interval */
[812da54]108
[c161216d]109/**
[9b4458e7]110 * @ingroup RTEMSAPIClassicTypes
[c161216d]111 *
[9b4458e7]112 * @brief This type represents clock tick intervals.
[c161216d]113 */
[9b4458e7]114typedef Watchdog_Interval rtems_interval;
115
116#if defined(RTEMS_MULTIPROCESSING)
117  /* Generated from spec:/rtems/type/if/mp-packet-classes */
[c161216d]118
[e4f2fe1]119  /**
[9b4458e7]120   * @ingroup RTEMSAPIClassicTypes
121   *
122   * @brief This enumeration defines the MPCI packet classes.
[e4f2fe1]123   */
[9b4458e7]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
[e4f2fe1]130  /**
[9b4458e7]131   * @ingroup RTEMSAPIClassicTypes
132   *
133   * @brief MPCI handler routines shall have this return type.
[e4f2fe1]134   */
[9b4458e7]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
[e4f2fe1]152  /**
[9b4458e7]153   * @ingroup RTEMSAPIClassicTypes
154   *
155   * @brief MPCI initialization routines shall have this type.
[e4f2fe1]156   */
[9b4458e7]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
[e4f2fe1]163  /**
[9b4458e7]164   * @ingroup RTEMSAPIClassicTypes
165   *
166   * @brief MPCI receive packet routines shall have this type.
[e4f2fe1]167   */
[9b4458e7]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
[e4f2fe1]174  /**
[9b4458e7]175   * @ingroup RTEMSAPIClassicTypes
176   *
177   * @brief MPCI return packet routines shall have this type.
[e4f2fe1]178   */
[9b4458e7]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
[e4f2fe1]185  /**
[9b4458e7]186   * @ingroup RTEMSAPIClassicTypes
187   *
188   * @brief MPCI send packet routines shall have this type.
[e4f2fe1]189   */
[9b4458e7]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
[e4f2fe1]196  /**
[9b4458e7]197   * @ingroup RTEMSAPIClassicTypes
198   *
199   * @brief This type represents the user-provided MPCI control.
[e4f2fe1]200   */
[9b4458e7]201  typedef MPCI_Control rtems_mpci_table;
202#endif
[7f6a24ab]203
[97e2729d]204#if defined(RTEMS_MULTIPROCESSING)
[9b4458e7]205  /* Generated from spec:/rtems/type/if/multiprocessing-table */
[8c8fd64]206
[9b4458e7]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
[3a4ae6c]214
[9b4458e7]215/* Generated from spec:/rtems/type/if/name */
[8c8fd64]216
217/**
[9b4458e7]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.
[8c8fd64]225 */
[9b4458e7]226typedef uint32_t rtems_name;
[8c8fd64]227
[9b4458e7]228/* Generated from spec:/rtems/type/if/no-timeout */
[8c8fd64]229
230/**
[9b4458e7]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.
[8c8fd64]235 */
[9b4458e7]236#define RTEMS_NO_TIMEOUT ( (rtems_interval) WATCHDOG_NO_TIMEOUT )
[8c8fd64]237
[9b4458e7]238#if defined(RTEMS_MULTIPROCESSING)
239  /* Generated from spec:/rtems/type/if/packet-prefix */
[3a4ae6c]240
[9b4458e7]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
[8c8fd64]249
[d6a649d5]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 */
257typedef uint32_t rtems_task_priority;
258
[9b4458e7]259/* Generated from spec:/rtems/type/if/time-of-day */
[3a4ae6c]260
[24f8915]261/**
[9b4458e7]262 * @ingroup RTEMSAPIClassicTypes
263 *
264 * @brief This type represents Classic API calendar times.
[24f8915]265 */
[9b4458e7]266typedef struct {
267  /**
268   * @brief This member contains the year A.D.
269   */
270  uint32_t year;
[24f8915]271
[9b4458e7]272  /**
273   * @brief This member contains the month of the year with values from 1 to 12.
274   */
275  uint32_t month;
[3a4ae6c]276
[9b4458e7]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;
[e4f2fe1]304
[3235ad9]305#ifdef __cplusplus
306}
307#endif
308
[9b4458e7]309#endif /* _RTEMS_RTEMS_TYPES_H */
Note: See TracBrowser for help on using the repository browser.