1 | /** |
---|
2 | * @file rtems/itron/port.inl |
---|
3 | */ |
---|
4 | |
---|
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.rtems.com/license/LICENSE. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef __ITRON_PORT_inl_ |
---|
17 | #define __ITRON_PORT_inl_ |
---|
18 | |
---|
19 | #ifdef __cplusplus |
---|
20 | extern "C" { |
---|
21 | #endif |
---|
22 | |
---|
23 | /* |
---|
24 | * _ITRON_Port_Allocate |
---|
25 | */ |
---|
26 | |
---|
27 | #define _ITRON_Port_Allocate( _porid ) \ |
---|
28 | (ITRON_Port_Control *)_ITRON_Objects_Allocate_by_index( \ |
---|
29 | &_ITRON_Port_Information, \ |
---|
30 | (_porid), \ |
---|
31 | sizeof(ITRON_Port_Control) \ |
---|
32 | ) |
---|
33 | |
---|
34 | /* |
---|
35 | * _ITRON_Port_Clarify_allocation_id_error |
---|
36 | */ |
---|
37 | |
---|
38 | #define _ITRON_Port_Clarify_allocation_id_error( _id ) \ |
---|
39 | _ITRON_Objects_Clarify_allocation_id_error( \ |
---|
40 | &_ITRON_Port_Information, (_id) ) |
---|
41 | |
---|
42 | /* |
---|
43 | * _ITRON_Port_Clarify_get_id_error |
---|
44 | */ |
---|
45 | |
---|
46 | #define _ITRON_Port_Clarify_get_id_error( _id ) \ |
---|
47 | _ITRON_Objects_Clarify_get_id_error( &_ITRON_Port_Information, (_id) ) |
---|
48 | |
---|
49 | /* |
---|
50 | * _ITRON_Port_Free |
---|
51 | */ |
---|
52 | |
---|
53 | #define _ITRON_Port_Free( _the_port ) \ |
---|
54 | _ITRON_Objects_Free( &_ITRON_Port_Information, &(_the_port)->Object ) |
---|
55 | |
---|
56 | /*PAGE |
---|
57 | * |
---|
58 | * _ITRON_Port_Get |
---|
59 | */ |
---|
60 | |
---|
61 | #define _ITRON_Port_Get( _id, _location ) \ |
---|
62 | (ITRON_Port_Control *) \ |
---|
63 | _ITRON_Objects_Get( &_ITRON_Port_Information, (_id), (_location) ) |
---|
64 | |
---|
65 | /*PAGE |
---|
66 | * |
---|
67 | * _ITRON_Port_Is_null |
---|
68 | */ |
---|
69 | |
---|
70 | #define _ITRON_Port_Is_null( _the_port ) \ |
---|
71 | ( (_the_port) == NULL ) |
---|
72 | |
---|
73 | #ifdef __cplusplus |
---|
74 | } |
---|
75 | #endif |
---|
76 | |
---|
77 | #endif |
---|
78 | /* end of include file */ |
---|
79 | |
---|