1 | /* support.h |
---|
2 | * |
---|
3 | * This include file contains information about support functions for |
---|
4 | * the RTEMS API. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * All rights assigned to U.S. Government, 1994. |
---|
9 | * |
---|
10 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
11 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
12 | * notice must appear in all copies of this file and its derivatives. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __RTEMS_RTEMS_SUPPORT_h |
---|
18 | #define __RTEMS_RTEMS_SUPPORT_h |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <rtems/rtems/types.h> |
---|
25 | |
---|
26 | /* |
---|
27 | * rtems_build_name |
---|
28 | * |
---|
29 | * DESCRIPTION: |
---|
30 | * |
---|
31 | * This function returns an object name composed of the four characters |
---|
32 | * C1, C2, C3, and C4. |
---|
33 | * |
---|
34 | * NOTE: |
---|
35 | * |
---|
36 | * This must be implemented as a macro for use in Configuration Tables. |
---|
37 | * |
---|
38 | */ |
---|
39 | |
---|
40 | #define rtems_build_name( _C1, _C2, _C3, _C4 ) \ |
---|
41 | ( (_C1) << 24 | (_C2) << 16 | (_C3) << 8 | (_C4) ) |
---|
42 | |
---|
43 | /* |
---|
44 | * rtems_get_class |
---|
45 | * |
---|
46 | * DESCRIPTION: |
---|
47 | * |
---|
48 | * This function returns the class portion of the ID. |
---|
49 | * |
---|
50 | */ |
---|
51 | |
---|
52 | #define rtems_get_class( _id ) \ |
---|
53 | _Objects_Get_class( _id ) |
---|
54 | |
---|
55 | /* |
---|
56 | * rtems_get_node |
---|
57 | * |
---|
58 | * DESCRIPTION: |
---|
59 | * |
---|
60 | * This function returns the node portion of the ID. |
---|
61 | * |
---|
62 | */ |
---|
63 | |
---|
64 | #define rtems_get_node( _id ) \ |
---|
65 | _Objects_Get_node( _id ) |
---|
66 | |
---|
67 | /* |
---|
68 | * rtems_get_index |
---|
69 | * |
---|
70 | * DESCRIPTION: |
---|
71 | * |
---|
72 | * This function returns the index portion of the ID. |
---|
73 | * |
---|
74 | */ |
---|
75 | |
---|
76 | #define rtems_get_index( _id ) \ |
---|
77 | _Objects_Get_index( _id ) |
---|
78 | |
---|
79 | /* |
---|
80 | * Time related |
---|
81 | */ |
---|
82 | |
---|
83 | #define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) \ |
---|
84 | TOD_MILLISECONDS_TO_MICROSECONDS(_ms) |
---|
85 | #define RTEMS_MILLISECONDS_TO_TICKS(_ms) \ |
---|
86 | TOD_MILLISECONDS_TO_TICKS(_ms) |
---|
87 | |
---|
88 | #include <rtems/rtems/support.inl> |
---|
89 | |
---|
90 | #ifdef __cplusplus |
---|
91 | } |
---|
92 | #endif |
---|
93 | |
---|
94 | #endif |
---|
95 | /* end of include file */ |
---|