60 lines
1.1 KiB
C
60 lines
1.1 KiB
C
#ifndef _COMM_TYPES_
|
||
#define _COMM_TYPES_
|
||
#define RAM_FUNC __ramfunc
|
||
|
||
typedef unsigned long int ulong;
|
||
typedef unsigned short int ushort;
|
||
typedef unsigned int uint;
|
||
typedef unsigned char u_int8_t;
|
||
typedef unsigned char uint8_t;
|
||
typedef unsigned short int u_int16_t;
|
||
typedef unsigned short int uint16_t;
|
||
typedef unsigned int u_int32_t;
|
||
typedef unsigned int uint32_t;
|
||
typedef unsigned long long u_int64_t;
|
||
typedef unsigned long long uint64_t;
|
||
typedef unsigned char BOOL;
|
||
typedef float float_t;
|
||
|
||
// This type MUST be 8 bit
|
||
typedef unsigned char BYTE;
|
||
|
||
// These types MUST be 16 bit
|
||
typedef short SHORT;
|
||
typedef unsigned short WORD;
|
||
typedef unsigned short WCHAR;
|
||
|
||
// These types MUST be 16 bit or 32 bit
|
||
typedef int INT;
|
||
typedef unsigned int UINT;
|
||
|
||
// These types MUST be 32 bit
|
||
typedef long LONG;
|
||
typedef unsigned long DWORD;
|
||
|
||
#ifdef FALSE
|
||
#undef FALSE
|
||
#endif
|
||
#define FALSE (0)
|
||
|
||
#ifdef TRUE
|
||
#undef TRUE
|
||
#endif
|
||
#define TRUE (1)
|
||
|
||
//#define SUCCESS (0)
|
||
|
||
#define ELEMENT_OF(x) (sizeof(x) / sizeof((x)[0]))
|
||
|
||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
typedef union{
|
||
int iValue;
|
||
float fValue;
|
||
u_int8_t cValue[4];
|
||
}U_DataType;
|
||
|
||
#endif /* _COMM_TYPES_ */
|
||
|
||
|
||
|