basisdef.h
Go to the documentation of this file.
1 //======================================================================
30 //======================================================================
31 
32 #ifndef _SDHLIBRARY_BASISDEF_H
33 #define _SDHLIBRARY_BASISDEF_H
34 
35 //----------------------------------------------------------------------
36 // Project includes
37 //----------------------------------------------------------------------
38 
39 #include <assert.h>
40 #include "sdhlibrary_settings.h"
41 
42 
43 //----------------------------------------------------------------------
44 // Typedefs
45 //----------------------------------------------------------------------
46 
48 
49 #if SDH_USE_VCC
50 // MS visual C++ does not provide stdint.h
51 typedef __int8 Int8;
52 typedef unsigned __int8 UInt8;
53 typedef __int16 Int16;
54 typedef unsigned __int16 UInt16;
55 typedef __int32 Int32;
56 typedef unsigned __int32 UInt32;
57 #else
58 // using the typenames from stdint.h should work even on 64-Bit systems...
59 #include <stdint.h>
60 typedef int8_t Int8;
61 typedef uint8_t UInt8;
62 typedef int16_t Int16;
63 typedef uint16_t UInt16;
64 typedef int32_t Int32;
65 typedef uint32_t UInt32;
66 #endif
67 
68 //----------------------------------------------------------------------
69 // defines
70 //----------------------------------------------------------------------
71 
73 #define SDH_ASSERT_TYPESIZES() \
74  do { \
75  assert( sizeof( Int8 ) == 1 ); \
76  assert( sizeof( UInt8 ) == 1 ); \
77  assert( sizeof( Int16 ) == 2 ); \
78  assert( sizeof( UInt16 ) == 2 ); \
79  assert( sizeof( Int32 ) == 4 ); \
80  assert( sizeof( UInt32 ) == 4 ); \
81  } while (0)
82 
83 
85 
86 //======================================================================
87 #endif
uint8_t UInt8
unsigned integer, size 1 Byte (8 Bit)
Definition: basisdef.h:61
uint32_t UInt32
unsigned integer, size 4 Byte (32 Bit)
Definition: basisdef.h:65
#define NAMESPACE_SDH_START
int16_t Int16
signed integer, size 2 Byte (16 Bit)
Definition: basisdef.h:62
#define NAMESPACE_SDH_END
This file contains settings to make the SDHLibrary compile on differen systems:
NAMESPACE_SDH_START typedef int8_t Int8
signed integer, size 1 Byte (8 Bit)
Definition: basisdef.h:60
int32_t Int32
signed integer, size 4 Byte (32 Bit)
Definition: basisdef.h:64
uint16_t UInt16
unsigned integer, size 2 Byte (16 Bit)
Definition: basisdef.h:63


sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Sun Aug 18 2019 03:42:20