[3235ad9] | 1 | /* support.h |
---|
| 2 | * |
---|
| 3 | * This include file contains information about support functions for |
---|
| 4 | * the RTEMS API. |
---|
| 5 | * |
---|
[03f2154e] | 6 | * COPYRIGHT (c) 1989-1997. |
---|
[3235ad9] | 7 | * On-Line Applications Research Corporation (OAR). |
---|
[03f2154e] | 8 | * Copyright assigned to U.S. Government, 1994. |
---|
[3235ad9] | 9 | * |
---|
[03f2154e] | 10 | * The license and distribution terms for this file may in |
---|
| 11 | * the file LICENSE in this distribution or at |
---|
| 12 | * http://www.OARcorp.com/rtems/license.html. |
---|
[3235ad9] | 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 | |
---|
[3a4ae6c] | 24 | #include <rtems/rtems/types.h> |
---|
[3235ad9] | 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 | |
---|
[3a4ae6c] | 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) |
---|
[e0de6ef] | 87 | #define RTEMS_MICROSECONDS_TO_TICKS(_ms) \ |
---|
| 88 | TOD_MICROSECONDS_TO_TICKS(_ms) |
---|
[3a4ae6c] | 89 | |
---|
[8f9e9bdc] | 90 | #ifndef __RTEMS_APPLICATION__ |
---|
[3a4ae6c] | 91 | #include <rtems/rtems/support.inl> |
---|
[8f9e9bdc] | 92 | #endif |
---|
[3235ad9] | 93 | |
---|
| 94 | #ifdef __cplusplus |
---|
| 95 | } |
---|
| 96 | #endif |
---|
| 97 | |
---|
| 98 | #endif |
---|
| 99 | /* end of include file */ |
---|