typedef.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #ifndef _TYPEDEF_H
  2. #define _TYPEDEF_H
  3. typedef unsigned char u8, uint8_t, BYTE, uchar;
  4. typedef signed char s8, int8_t;
  5. typedef unsigned short u16, uint16_t, WORD, ushort;
  6. typedef signed short s16, int16_t;
  7. typedef unsigned int uint, UINT, ssize_t, size_t;
  8. typedef unsigned long u32, uint32_t, DWORD, ulong;
  9. typedef signed long s32, int32_t;
  10. typedef unsigned long long u64, uint64_t, ulonglong;
  11. typedef signed long long s64, int64_t;
  12. typedef volatile unsigned long *psfr_t;
  13. #ifndef VOID
  14. #define VOID void
  15. #endif
  16. #ifndef CONST
  17. #define CONST const
  18. #endif
  19. #ifndef BOOL
  20. typedef unsigned char BOOL;
  21. #endif
  22. #ifndef BOOLEAN
  23. typedef unsigned char BOOLEAN;
  24. #endif
  25. #ifndef CHAR
  26. typedef char CHAR;
  27. #endif
  28. #ifndef INT8
  29. typedef char INT8;
  30. #endif
  31. #ifndef INT16
  32. typedef short INT16;
  33. #endif
  34. #ifndef INT32
  35. typedef long INT32;
  36. #endif
  37. #ifndef UINT8
  38. typedef unsigned char UINT8;
  39. #endif
  40. #ifndef UINT16
  41. typedef unsigned short UINT16;
  42. #endif
  43. #ifndef UINT32
  44. typedef unsigned long UINT32;
  45. #endif
  46. #ifndef UINT8V
  47. typedef unsigned char volatile UINT8V;
  48. #endif
  49. #ifndef UINT16V
  50. typedef unsigned short volatile UINT16V;
  51. #endif
  52. #ifndef UINT32V
  53. typedef unsigned long volatile UINT32V;
  54. #endif
  55. #ifndef UINT8C
  56. typedef const unsigned char UINT8C;
  57. #endif
  58. #ifndef UINT16C
  59. typedef const unsigned short UINT16C;
  60. #endif
  61. #ifndef UINT32C
  62. typedef const unsigned long UINT32C;
  63. #endif
  64. #ifndef PVOID
  65. typedef void *PVOID;
  66. #endif
  67. #ifndef PCHAR
  68. typedef char *PCHAR;
  69. #endif
  70. #ifndef PCHAR
  71. typedef const char *PCCHAR;
  72. #endif
  73. #ifndef PINT8
  74. typedef char *PINT8;
  75. #endif
  76. #ifndef PINT16
  77. typedef short *PINT16;
  78. #endif
  79. #ifndef PINT32
  80. typedef long *PINT32;
  81. #endif
  82. #ifndef PUINT8
  83. typedef unsigned char *PUINT8;
  84. #endif
  85. #ifndef PUINT16
  86. typedef unsigned short *PUINT16;
  87. #endif
  88. #ifndef PUINT32
  89. typedef unsigned long *PUINT32;
  90. #endif
  91. #ifndef PUINT8V
  92. typedef volatile unsigned char *PUINT8V;
  93. #endif
  94. #ifndef PUINT16V
  95. typedef volatile unsigned short *PUINT16V;
  96. #endif
  97. #ifndef PUINT32V
  98. typedef volatile unsigned long *PUINT32V;
  99. #endif
  100. #define TRUE 1
  101. #define FALSE 0
  102. #endif // _TYPEDEF_H