rtwtypes.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef RTWTYPES_H
  2. #define RTWTYPES_H
  3. #if (!defined(__cplusplus))
  4. #ifndef false
  5. #define false (0U)
  6. #endif
  7. #ifndef true
  8. #define true (1U)
  9. #endif
  10. #endif
  11. typedef signed char int8_T;
  12. typedef unsigned char uint8_T;
  13. typedef short int16_T;
  14. typedef unsigned short uint16_T;
  15. typedef int int32_T;
  16. typedef unsigned int uint32_T;
  17. typedef float real32_T;
  18. typedef double real64_T;
  19. typedef double real_T;
  20. typedef double time_T;
  21. typedef unsigned char boolean_T;
  22. typedef int int_T;
  23. typedef unsigned int uint_T;
  24. typedef unsigned long ulong_T;
  25. typedef char char_T;
  26. typedef unsigned char uchar_T;
  27. typedef char_T byte_T;
  28. #define CREAL_T
  29. typedef struct {
  30. real32_T re;
  31. real32_T im;
  32. } creal32_T;
  33. typedef struct {
  34. real64_T re;
  35. real64_T im;
  36. } creal64_T;
  37. typedef struct {
  38. real_T re;
  39. real_T im;
  40. } creal_T;
  41. #define CINT8_T
  42. typedef struct {
  43. int8_T re;
  44. int8_T im;
  45. } cint8_T;
  46. #define CUINT8_T
  47. typedef struct {
  48. uint8_T re;
  49. uint8_T im;
  50. } cuint8_T;
  51. #define CINT16_T
  52. typedef struct {
  53. int16_T re;
  54. int16_T im;
  55. } cint16_T;
  56. #define CUINT16_T
  57. typedef struct {
  58. uint16_T re;
  59. uint16_T im;
  60. } cuint16_T;
  61. #define CINT32_T
  62. typedef struct {
  63. int32_T re;
  64. int32_T im;
  65. } cint32_T;
  66. #define CUINT32_T
  67. typedef struct {
  68. uint32_T re;
  69. uint32_T im;
  70. } cuint32_T;
  71. #define MAX_int8_T ((int8_T)(127))
  72. #define MIN_int8_T ((int8_T)(-128))
  73. #define MAX_uint8_T ((uint8_T)(255U))
  74. #define MAX_int16_T ((int16_T)(32767))
  75. #define MIN_int16_T ((int16_T)(-32768))
  76. #define MAX_uint16_T ((uint16_T)(65535U))
  77. #define MAX_int32_T ((int32_T)(2147483647))
  78. #define MIN_int32_T ((int32_T)(-2147483647-1))
  79. #define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
  80. typedef void * pointer_T;
  81. #endif