rtwtypes.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. #ifndef RTWTYPES_H
  2. #define RTWTYPES_H
  3. /* Logical type definitions */
  4. #if (!defined(__cplusplus))
  5. #ifndef false
  6. #define false (0U)
  7. #endif
  8. #ifndef true
  9. #define true (1U)
  10. #endif
  11. #endif
  12. /*=======================================================================*
  13. * Target hardware information
  14. * Device type: Intel->x86-64 (Windows64)
  15. * Number of bits: char: 8 short: 16 int: 32
  16. * long: 32
  17. * native word size: 64
  18. * Byte ordering: LittleEndian
  19. * Signed integer division rounds to: Zero
  20. * Shift right on a signed integer as arithmetic shift: on
  21. *=======================================================================*/
  22. /*=======================================================================*
  23. * Fixed width word size data types: *
  24. * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
  25. * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
  26. * real32_T, real64_T - 32 and 64 bit floating point numbers *
  27. *=======================================================================*/
  28. typedef signed char int8_T;
  29. typedef unsigned char uint8_T;
  30. typedef short int16_T;
  31. typedef unsigned short uint16_T;
  32. typedef int int32_T;
  33. typedef unsigned int uint32_T;
  34. typedef float real32_T;
  35. typedef double real64_T;
  36. /*===========================================================================*
  37. * Generic type definitions: boolean_T, char_T, byte_T, int_T, uint_T, *
  38. * real_T, time_T, ulong_T. *
  39. *===========================================================================*/
  40. typedef double real_T;
  41. typedef double time_T;
  42. typedef unsigned char boolean_T;
  43. typedef int int_T;
  44. typedef unsigned int uint_T;
  45. typedef unsigned long ulong_T;
  46. typedef char char_T;
  47. typedef unsigned char uchar_T;
  48. typedef char_T byte_T;
  49. /*===========================================================================*
  50. * Complex number type definitions *
  51. *===========================================================================*/
  52. #define CREAL_T
  53. typedef struct {
  54. real32_T re;
  55. real32_T im;
  56. } creal32_T;
  57. typedef struct {
  58. real64_T re;
  59. real64_T im;
  60. } creal64_T;
  61. typedef struct {
  62. real_T re;
  63. real_T im;
  64. } creal_T;
  65. #define CINT8_T
  66. typedef struct {
  67. int8_T re;
  68. int8_T im;
  69. } cint8_T;
  70. #define CUINT8_T
  71. typedef struct {
  72. uint8_T re;
  73. uint8_T im;
  74. } cuint8_T;
  75. #define CINT16_T
  76. typedef struct {
  77. int16_T re;
  78. int16_T im;
  79. } cint16_T;
  80. #define CUINT16_T
  81. typedef struct {
  82. uint16_T re;
  83. uint16_T im;
  84. } cuint16_T;
  85. #define CINT32_T
  86. typedef struct {
  87. int32_T re;
  88. int32_T im;
  89. } cint32_T;
  90. #define CUINT32_T
  91. typedef struct {
  92. uint32_T re;
  93. uint32_T im;
  94. } cuint32_T;
  95. /*=======================================================================*
  96. * Min and Max: *
  97. * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
  98. * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
  99. *=======================================================================*/
  100. #define MAX_int8_T ((int8_T)(127))
  101. #define MIN_int8_T ((int8_T)(-128))
  102. #define MAX_uint8_T ((uint8_T)(255U))
  103. #define MAX_int16_T ((int16_T)(32767))
  104. #define MIN_int16_T ((int16_T)(-32768))
  105. #define MAX_uint16_T ((uint16_T)(65535U))
  106. #define MAX_int32_T ((int32_T)(2147483647))
  107. #define MIN_int32_T ((int32_T)(-2147483647-1))
  108. #define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
  109. /* Block D-Work pointer type */
  110. typedef void * pointer_T;
  111. #endif /* RTWTYPES_H */
  112. /*
  113. * File trailer for generated code.
  114. *
  115. * [EOF]
  116. */