uGOOSE  1.0
GOOSE for Embedded Devices. Sample project for Renesas R-IN32-EC
ugibso_types.h
Go to the documentation of this file.
1 /******************************************************************************/
33 #ifndef uGIBSO_TYPES_H
34 #define uGIBSO_TYPES_H
35 
36 #include "ugibso_config.h"
37 
38 /**********************************************************************************
39 * GLOBAL DEFINES
40 **********************************************************************************/
41 
42 /* Min Max Value defines - use these definitions to avoid PC Lint errors */
43 #define UINT8_MAX_VALUE (0xFFu)
44 #define UINT8_MIN_VALUE (0x00u)
45 #define SINT8_MAX_VALUE (127)
46 #define SINT8_MIN_VALUE (-SINT8_MAX_VALUE -1)
47 #define UINT16_MAX_VALUE (0xFFFFu)
48 #define UINT16_MIN_VALUE (0x0000u)
49 #define SINT16_MAX_VALUE (32767)
50 #define SINT16_MIN_VALUE (-SINT16_MAX_VALUE -1)
51 #define UINT32_MAX_VALUE (0xFFFFFFFFuL)
52 #define UINT32_MIN_VALUE (0x00000000uL)
53 #define SINT32_MAX_VALUE (2147483647L)
54 #define SINT32_MIN_VALUE (-SINT32_MAX_VALUE -1)
56 /* Defines to use in place of SizeOf() */
57 #define SIZE_8U (1u)
58 #define SIZE_8UL (1ul)
59 #define SIZE_16U (2u)
60 #define SIZE_16UL (2ul)
61 #define SIZE_32U (4u)
62 #define SIZE_32UL (4ul)
63 #define SIZE_64U (8u)
64 #define SIZE_64UL (8ul)
67 #define pNULL ((void *)0)
68 
69 /* Boolean defines */
70 #define FALSE (0)
71 #define TRUE (1)
73 /**********************************************************************************
74 * GLOBAL MACROS
75 **********************************************************************************/
76 
77 /**********************************************************************************
78 * GLOBAL DATA TYPES
79 **********************************************************************************/
80 
81 #if defined SIXTEEN_BIT_PROCESSOR
82  /* 16 bit processor integer definitions */
83  /**** Standard data types for general use in comms and storage. Fixed size across all compilers and CPUs. *****/
84  /* Type Size Sign Use */
85  typedef signed char BOOL8;
86  typedef char CHAR;
87  typedef signed int WCHAR;
88  typedef unsigned char UINT8;
89  typedef signed char SINT8;
90  typedef unsigned int UINT16;
91  typedef signed int SINT16;
92  typedef unsigned long UINT32;
93  typedef signed long SINT32;
94  typedef unsigned long long UINT64;
95  typedef signed long long SINT64;
96  typedef float FLOAT32;
97  typedef double FLOAT64;
99 #elif defined THIRTY_TWO_BIT_PROCESSOR
100  /* 32 bit processor integer definitions */
101  /**** Standard data types for general use in comms and storage. Fixed size across all compilers and CPUs. *****/
102  /* Type Size Sign Use */
103  typedef signed char BOOL8;
104  typedef char CHAR;
105  typedef signed short WCHAR;
106  typedef unsigned char UINT8;
107  typedef signed char SINT8;
108  typedef unsigned short UINT16;
109  typedef signed short SINT16;
110  typedef unsigned int UINT32;
111  typedef signed int SINT32;
112  typedef unsigned long long UINT64;
113  typedef signed long long SINT64;
114  typedef float FLOAT32;
115  typedef double FLOAT64;
116 #else
117  #error Processor type not defined (Number of bits). Unable to define base types.
118 #endif
119 
121 typedef void (*PFUNC)(void);
122 
123 
124 #endif /* uGIBSO_TYPES_H */
signed int SINT32
Definition: ugibso_types.h:111
signed short SINT16
Definition: ugibso_types.h:109
void(* PFUNC)(void)
Definition: ugibso_types.h:121
unsigned short UINT16
Definition: ugibso_types.h:108
unsigned int UINT32
Definition: ugibso_types.h:110
signed long long SINT64
Definition: ugibso_types.h:113
double FLOAT64
Definition: ugibso_types.h:115
signed short WCHAR
Definition: ugibso_types.h:105
signed char SINT8
Definition: ugibso_types.h:107
signed char BOOL8
Definition: ugibso_types.h:103
char CHAR
Definition: ugibso_types.h:104
float FLOAT32
Definition: ugibso_types.h:114
unsigned long long UINT64
Definition: ugibso_types.h:112
unsigned char UINT8
Definition: ugibso_types.h:106