Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1734 | - | 1 | /** |
2 | ************************************************************************************************************* |
||
3 | * |
||
4 | * \file types.h |
||
5 | * This file contains all generic type definitions that are used independendly of the project. |
||
6 | * The type definitions of this file should be used instead of the standard C-types to simplify |
||
7 | * porting of a particular software project. |
||
8 | * |
||
9 | * \author Ralf Hochhausen |
||
10 | * \date 22.04.2006 |
||
11 | * \version 1.1 |
||
12 | * |
||
13 | * (c) 2006 by Ralf Hochhausen (e-mail: micro@ralf-hochhausen.de) |
||
14 | * |
||
15 | * This program is free software; you can redistribute it and/or |
||
16 | * modify it under the terms of the GNU General Public License |
||
17 | * as published by the Free Software Foundation; either version 2 |
||
18 | * of the License, or (at your option) any later version. |
||
19 | * |
||
20 | * This program is distributed in the hope that it will be useful, |
||
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
23 | * GNU General Public License for more details. |
||
24 | * |
||
25 | * You should have received a copy of the GNU General Public License |
||
26 | * along with this program; if not, write to the Free Software |
||
27 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||
28 | * |
||
29 | * \b History: |
||
30 | * |
||
31 | * 22.04.2006 Ralf Hochhausen\n |
||
32 | * Revision 1.1\n |
||
33 | * Included GPL header |
||
34 | * |
||
35 | ************************************************************************************************************* |
||
36 | */ |
||
37 | |||
38 | /** |
||
39 | * \defgroup TYPES Generic Type Definitions |
||
40 | * @{ |
||
41 | */ |
||
42 | |||
43 | #ifndef __TYPES_H |
||
44 | #define __TYPES_H |
||
45 | |||
46 | #define NULL (void*)0 /**< NULL-pointer definition */ |
||
47 | |||
48 | /** |
||
49 | * Boolean type enumeration |
||
50 | * |
||
51 | * \note |
||
52 | * Enumeration type is used here to simplify debugging of the software. Most debuggers will |
||
53 | * show the text "TRUE" or "FALSE" instead of "1" and "0". It should be noticed that |
||
54 | * enumeration types are normally 16bit wide => the compiler should be forced to use 8bit |
||
55 | * to safe RAM memory space if possible. |
||
56 | * |
||
57 | */ |
||
58 | typedef enum |
||
59 | { |
||
60 | FALSE, /**< FALSE -> 0 */ |
||
61 | TRUE /**< TRUE -> 1 */ |
||
62 | }BOOL; |
||
63 | |||
64 | /* Type definition of unsigned Datatypes */ |
||
65 | typedef unsigned char uchar8; /**< 8Bit unsigned Datatype */ |
||
66 | typedef unsigned int uint16; /**< 16Bit unsigned Datatype */ |
||
67 | typedef unsigned long ulong32; /**< 32Bit unsigned Datatype */ |
||
68 | |||
69 | /* Type definitions of signed Datatypes */ |
||
70 | typedef signed char char8; /**< 8Bit signed Datatype */ |
||
71 | typedef signed int int16; /**< 16Bit signed Datatype */ |
||
72 | typedef signed long long32; /**< 32Bit signed Datatype */ |
||
73 | |||
74 | /** |
||
75 | * @} |
||
76 | */ |
||
77 | |||
78 | #endif /* ifdef __TYPES_H */ |