OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [rtems/] [include/] [rtems/] [rtems/] [support.h] - Blame information for rev 594

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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: support.h,v 1.2 2001-09-27 11:59:18 chris Exp $
14
 */
15
 
16
#ifndef __RTEMS_RTEMS_SUPPORT_h
17
#define __RTEMS_RTEMS_SUPPORT_h
18
 
19
#ifdef __cplusplus
20
extern "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
  ( (_C1) << 24 | (_C2) << 16 | (_C3) << 8 | (_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 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.