RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cyg_type.h
1#ifndef CYGONCE_INFRA_CYG_TYPE_H
2#define CYGONCE_INFRA_CYG_TYPE_H
3
4//==========================================================================
5//
6// cyg_type.h
7//
8// Standard types, and some useful coding macros.
9//
10//==========================================================================
11// ####ECOSGPLCOPYRIGHTBEGIN####
12// -------------------------------------------
13// This file is part of eCos, the Embedded Configurable Operating System.
14// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2009 Free Software Foundation, Inc.
15//
16// eCos is free software; you can redistribute it and/or modify it under
17// the terms of the GNU General Public License as published by the Free
18// Software Foundation; either version 2 or (at your option) any later
19// version.
20//
21// eCos is distributed in the hope that it will be useful, but WITHOUT
22// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24// for more details.
25//
26// You should have received a copy of the GNU General Public License
27// along with eCos; if not, write to the Free Software Foundation, Inc.,
28// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29//
30// As a special exception, if other files instantiate templates or use
31// macros or inline functions from this file, or you compile this file
32// and link it with other works to produce a work based on this file,
33// this file does not by itself cause the resulting work to be covered by
34// the GNU General Public License. However the source code for this file
35// must still be made available in accordance with section (3) of the GNU
36// General Public License v2.
37//
38// This exception does not invalidate any other reasons why a work based
39// on this file might be covered by the GNU General Public License.
40// -------------------------------------------
41// ####ECOSGPLCOPYRIGHTEND####
42//==========================================================================
43//#####DESCRIPTIONBEGIN####
44//
45// Author(s): nickg from an original by hmt
46// Contributors: nickg
47// Date: 1997-09-08
48// Purpose: share unambiguously sized types.
49// Description: we typedef [cyg_][u]int8,16,32 &c for general use.
50// Usage: #include "cyg/infra/cyg_type.h"
51// ...
52// cyg_int32 my_32bit_integer;
53//
54//####DESCRIPTIONEND####
55//
56
57#include <stddef.h> // Definition of NULL from the compiler
58#include <stdint.h>
59
60typedef uint16_t cyg_uint16;
61
62typedef uint32_t cyg_uint32;
63
64// -------------------------------------------------------------------------
65// Allow creation of procedure-like macros that are a single statement,
66// and must be followed by a semi-colon
67
68#define CYG_MACRO_START do {
69#define CYG_MACRO_END } while (0)
70
71#define CYG_EMPTY_STATEMENT CYG_MACRO_START CYG_MACRO_END
72
73#define CYG_UNUSED_PARAM( _type_, _name_ ) CYG_MACRO_START \
74 _type_ __tmp1 = (_name_); \
75 _type_ __tmp2 = __tmp1; \
76 __tmp1 = __tmp2; \
77CYG_MACRO_END
78
79// -------------------------------------------------------------------------
80#endif // CYGONCE_INFRA_CYG_TYPE_H multiple inclusion protection
81// EOF cyg_type.h