]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator/ConfigurationFiles/redtypes.h
Update version numbers in preparation for new release.
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_Reliance_Edge_and_CLI_Windows_Simulator / ConfigurationFiles / redtypes.h
1 /*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----\r
2 \r
3                    Copyright (c) 2014-2015 Datalight, Inc.\r
4                        All Rights Reserved Worldwide.\r
5 \r
6     This program is free software; you can redistribute it and/or modify\r
7     it under the terms of the GNU General Public License as published by\r
8     the Free Software Foundation; use version 2 of the License.\r
9 \r
10     This program is distributed in the hope that it will be useful,\r
11     but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty\r
12     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13     GNU General Public License for more details.\r
14 \r
15     You should have received a copy of the GNU General Public License along\r
16     with this program; if not, write to the Free Software Foundation, Inc.,\r
17     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
18 */\r
19 /*  Businesses and individuals that for commercial or other reasons cannot\r
20     comply with the terms of the GPLv2 license may obtain a commercial license\r
21     before incorporating Reliance Edge into proprietary software for\r
22     distribution in any form.  Visit http://www.datalight.com/reliance-edge for\r
23     more information.\r
24 */\r
25 /** @file\r
26     @brief Defines basic types used by Reliance Edge.\r
27 \r
28     The following types *must* be defined by this header, either directly (using\r
29     typedef) or indirectly (by including other headers, such as the C99 headers\r
30     stdint.h and stdbool.h):\r
31 \r
32     - bool: Boolean type, capable of storing true (1) or false (0)\r
33     - uint8_t: Unsigned 8-bit integer\r
34     - int8_t: Signed 8-bit integer\r
35     - uint16_t: Unsigned 16-bit integer\r
36     - int16_t: Signed 16-bit integer\r
37     - uint32_t: Unsigned 32-bit integer\r
38     - int32_t: Signed 32-bit integer\r
39     - uint64_t: Unsigned 64-bit integer\r
40     - int64_t: Signed 64-bit integer\r
41     - uintptr_t: Unsigned integer capable of storing a pointer, preferably the\r
42       same size as pointers themselves.\r
43 \r
44     These types deliberately use the same names as the standard C99 types, so\r
45     that if the C99 headers stdint.h and stdbool.h are available, they may be\r
46     included here.\r
47 \r
48     If the user application defines similar types, those may be reused.  For\r
49     example, suppose there is an application header apptypes.h which defines\r
50     types with a similar purpose but different names.  That header could be\r
51     reused to define the types Reliance Edge needs:\r
52 \r
53     ~~~{.c}\r
54     #include <apptypes.h>\r
55 \r
56     typedef BOOL bool;\r
57     typedef BYTE uint8_t;\r
58     typedef INT8 int8_t;\r
59     // And so on...\r
60     ~~~\r
61 \r
62     If there are neither C99 headers nor suitable types in application headers,\r
63     this header should be populated with typedefs that define the required types\r
64     in terms of the standard C types.  This requires knowledge of the size of\r
65     the C types on the target hardware (e.g., how big is an "int" or a pointer).\r
66     Below is an example which assumes the target has 8-bit chars, 16-bit shorts,\r
67     32-bit ints, 32-bit pointers, and 64-bit long longs:\r
68 \r
69     ~~~{.c}\r
70     typedef int bool;\r
71     typedef unsigned char uint8_t;\r
72     typedef signed char int8_t;\r
73     typedef unsigned short uint16_t;\r
74     typedef short int16_t;\r
75     typedef unsigned int uint32_t;\r
76     typedef int int32_t;\r
77     typedef unsigned long long uint64_t;\r
78     typedef long long int64_t;\r
79     typedef uint32_t uintptr_t;\r
80     ~~~\r
81 */\r
82 #ifndef REDTYPES_H\r
83 #define REDTYPES_H\r
84 \r
85 \r
86 typedef int bool;                   /**< @brief Boolean type; either true or false. */\r
87 \r
88 typedef unsigned __int8 uint8_t;    /**< @brief Unsigned 8-bit integer. */\r
89 typedef          __int8 int8_t;     /**< @brief Signed 8-bit integer. */\r
90 \r
91 typedef unsigned __int16 uint16_t;  /**< @brief Unsigned 16-bit integer. */\r
92 typedef          __int16 int16_t;   /**< @brief Signed 16-bit integer. */\r
93 \r
94 typedef unsigned __int32 uint32_t;  /**< @brief Unsigned 32-bit integer. */\r
95 typedef          __int32 int32_t;   /**< @brief Signed 32-bit integer. */\r
96 \r
97 typedef unsigned __int64 uint64_t;  /**< @brief Unsigned 64-bit integer. */\r
98 typedef          __int64 int64_t;   /**< @brief Signed 64-bit integer. */\r
99 \r
100 /** @brief Unsigned integer capable of storing a pointer.\r
101 */\r
102 #ifdef _WIN64\r
103 typedef uint64_t uintptr_t;\r
104 #else\r
105 typedef uint32_t uintptr_t;\r
106 #endif\r
107 \r
108 \r
109 #endif\r
110 \r