source: rtems/cpukit/rtems/include/rtems/rtems/support.h @ bbad6f0

4.104.114.84.95
Last change on this file since bbad6f0 was bbad6f0, checked in by Joel Sherrill <joel.sherrill@…>, on 12/02/02 at 19:15:58

2002-12-02 Joel Sherrill <joel@…>

  • include/rtems/rtems/support.h: Added casts to eliminate warnings on 16 bit targets like the h8300.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*  support.h
2 *
3 *  This include file contains information about support functions for
4 *  the RTEMS API.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#ifndef __RTEMS_RTEMS_SUPPORT_h
17#define __RTEMS_RTEMS_SUPPORT_h
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems/rtems/types.h>
24
25/*
26 *  rtems_build_name
27 *
28 *  DESCRIPTION:
29 *
30 *  This function returns an object name composed of the four characters
31 *  C1, C2, C3, and C4.
32 *
33 *  NOTE:
34 *
35 *  This must be implemented as a macro for use in Configuration Tables.
36 *
37 */
38 
39#define rtems_build_name( _C1, _C2, _C3, _C4 ) \
40  ( (unsigned32)(_C1) << 24 | (unsigned32)(_C2) << 16 | (unsigned32)(_C3) << 8 | (unsigned32)(_C4) )
41 
42/*
43 *  rtems_get_class
44 *
45 *  DESCRIPTION:
46 *
47 *  This function returns the class portion of the ID.
48 *
49 */
50 
51#define rtems_get_class( _id ) \
52  _Objects_Get_class( _id )
53 
54/*
55 *  rtems_get_node
56 *
57 *  DESCRIPTION:
58 *
59 *  This function returns the node portion of the ID.
60 *
61 */
62 
63#define rtems_get_node( _id ) \
64  _Objects_Get_node( _id )
65 
66/*
67 *  rtems_get_index
68 *
69 *  DESCRIPTION:
70 *
71 *  This function returns the index portion of the ID.
72 *
73 */
74 
75#define rtems_get_index( _id ) \
76  _Objects_Get_index( _id )
77
78/*
79 *  Time related
80 */
81
82#define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) \
83        TOD_MILLISECONDS_TO_MICROSECONDS(_ms)
84#define RTEMS_MILLISECONDS_TO_TICKS(_ms) \
85        TOD_MILLISECONDS_TO_TICKS(_ms)
86#define RTEMS_MICROSECONDS_TO_TICKS(_ms) \
87        TOD_MICROSECONDS_TO_TICKS(_ms)
88
89#ifndef __RTEMS_APPLICATION__
90#include <rtems/rtems/support.inl>
91#endif
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif
98/* end of include file */
Note: See TracBrowser for help on using the repository browser.