source: rtems/cpukit/itron/include/itronsys/types.h @ 6df1f64

4.104.114.84.95
Last change on this file since 6df1f64 was 6df1f64, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jan 28, 2005 at 11:07:14 AM

New header guards.

  • Property mode set to 100644
File size: 3.8 KB
Line 
1/**
2 * @file itronsys/types.h
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 _ITRONSYS_TYPES_H
17#define _ITRONSYS_TYPES_H
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/* XXX some of these may need to be moved */
24/*
25 *  XXX: These names are too short and conflict with numerous
26 *       off the shell programs including paranoia.
27 */
28
29typedef int8_t        B;       /* signed 8-bit integer */
30typedef int16_t       H;       /* signed 16-bit integer */
31typedef int32_t       W;       /* signed 32-bit integer */
32typedef uint8_t      UB;      /* unsigned 8-bit integer */
33typedef uint16_t     UH;      /* unsigned 16-bit integer */
34typedef uint32_t     UW;      /* unsigned 32-bit integer */
35
36typedef uint32_t     VW;      /* unpredictable data type (32-bit size) */
37typedef uint16_t     VH;      /* unpredictable data type (16-bit size) */
38typedef uint8_t      VB;      /* unpredictable data type (8-bit size) */
39
40typedef void        *VP;      /* pointer to an unpredictable data type */
41
42typedef void (*FP)();         /* program start address */
43
44/*
45 *  6.4 Data Types
46 *
47 *  The difference between VB, VH and VW and B, H and W is that only the
48 *  number of bits is known for the former, not the data type of the
49 *  contents.  The latter clearly represent integers.
50 */
51
52/*
53 *  Data Types Dependent on ITRON Specification
54 *
55 *  In order to clarify the meanings of certain parameters, the
56 *  following names are used for data types which appear frequently
57 *  and/or have special meanings.
58 */
59
60typedef int32_t     INT;    /* Signed integer (bit width of processor) */
61typedef uint32_t   UINT;   /* Unsigned integer (bit width of processor) */
62typedef boolean    BOOL;   /* Boolean value.  TRUE (1) or FALSE (0). */
63typedef int16_t     FN;     /* Function code. Signed integer. Maximum 2 bytes. */
64typedef int        ID;     /* Object ID number (???id) */
65                           /*   Value range depends on the system.  Usually */
66                           /*   a signed integer.  Certain ID values may */
67                           /*   represent objects on other nodes when the */
68                           /*   connection function is supported. */
69
70typedef uint32_t   BOOL_ID;/* Boolean value or ID number */
71
72typedef int32_t   HNO;      /* Handler number */
73typedef int32_t   RNO;      /* Rendezvous number */
74typedef int32_t   NODE;     /* Node Number.  Usually a signed integer. */
75typedef int32_t   ATR;      /* Object or handler attribute. */
76                           /*   An unsigned integer. */
77typedef int32_t   ER;       /* Error code.  A signed integer. */
78typedef uint32_t   PRI;    /* Task priority.  A signed integer. */
79typedef int32_t   TMO;      /* Timeout value.  A signed integer. */
80                           /*   TMO_POL = 0 indicates polling, */
81                           /*   while TMO_FEVR = -1 indicates wait forever. */
82
83/*
84 *   6.6 Common Constants and Data Structure Packet Formats
85 */
86
87#define NADR   (-1)   /* invalid address or pointer value */
88
89#ifndef TRUE
90#define TRUE     1    /* true */
91#endif
92
93#ifndef FALSE
94#define FALSE    0    /* false */
95#endif
96
97/*
98 *  ATR tskatr, intatr, cycatr, almatr, svcatr, excatr:
99 *
100 *  TA_ASM indicates that the task or handler is directly started
101 *         at the assembly language level.  The TA_ASM attribute has the
102 *         opposite meaning of TA_HLNG.
103 *
104 *  NOTE: Really in <itronsys/task.h>
105 */
106
107#if 0
108#define TA_ASM    0x00   /* program written in assembly language */
109#define TA_HLNG   0x01   /* program written in high-level language */
110#endif
111
112/*
113 *  TMO tmout:
114 */
115
116#define TMO_POL      0    /* polling */
117#define TMO_FEVR   (-1)   /* wait forever */
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif
124/* end of include file */
Note: See TracBrowser for help on using the repository browser.