File: C:\Users\SLUG\Documents\MATLAB\SLUG_Autopilot\Stable\controlMCUSlugsMKII_dspic\sources\rtwtypes.h1 /* 2 * File: rtwtypes.h 3 * 4 * Real-Time Workshop code generated for Simulink model controlMCUSlugsMKII. 5 * 6 * Model version : 1.714 7 * Real-Time Workshop file version : 7.5 (R2010a) 25-Jan-2010 8 * Real-Time Workshop file generated on : Tue Nov 23 13:12:51 2010 9 * TLC version : 7.5 (Jan 19 2010) 10 * C source code generated on : Tue Nov 23 13:12:52 2010 11 *-------------------------------------------------------------- 12 * Embedded Coder for Microchip dsPIC family. | 13 * Generate .c and .h files from your Matlab/simulink model | 14 * and compile the diagram to .hex and .coff file that can be | 15 * downloaded directly into the microcontroller | 16 * | 17 * Licence Accorded to Blake Mills | 18 * University of Colorado-Boulder | 19 * | 20 * Written by Lubin KERHUEL - http://www.kerhuel.eu | 21 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 22 * Version 3.3a 22-Nov-2010 | 23 * For Matlab 7.10 R2010a | 24 *-------------------------------------------------------------- 25 */ 26 27 #ifndef RTW_HEADER_rtwtypes_h_ 28 #define RTW_HEADER_rtwtypes_h_ 29 #ifndef __RTWTYPES_H__ 30 #define __RTWTYPES_H__ 31 #ifndef TRUE 32 # define TRUE (1U) 33 #endif 34 35 #ifndef FALSE 36 # define FALSE (0U) 37 #endif 38 39 #ifndef __TMWTYPES__ 40 #define __TMWTYPES__ 41 #include <limits.h> 42 43 /*=======================================================================* 44 * Target hardware information 45 * Device type: 16-bit Generic 46 * Number of bits: char: 8 short: 16 int: 16 47 * long: 32 native word size: 16 48 * Byte ordering: LittleEndian 49 * Signed integer division rounds to: Undefined 50 * Shift right on a signed integer as arithmetic shift: on 51 *=======================================================================*/ 52 53 /*=======================================================================* 54 * Fixed width word size data types: * 55 * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers * 56 * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers * 57 * real32_T, real64_T - 32 and 64 bit floating point numbers * 58 *=======================================================================*/ 59 typedef signed char int8_T; 60 typedef unsigned char uint8_T; 61 typedef int int16_T; 62 typedef unsigned int uint16_T; 63 typedef long int32_T; 64 typedef unsigned long uint32_T; 65 typedef float real32_T; 66 typedef double real64_T; 67 68 /*===========================================================================* 69 * Generic type definitions: real_T, time_T, boolean_T, int_T, uint_T, * 70 * ulong_T, char_T and byte_T. * 71 *===========================================================================*/ 72 typedef double real_T; 73 typedef double time_T; 74 typedef unsigned char boolean_T; 75 typedef int int_T; 76 typedef unsigned int uint_T; 77 typedef unsigned long ulong_T; 78 typedef char char_T; 79 typedef unsigned char uchar_T; 80 typedef char_T byte_T; 81 82 /*===========================================================================* 83 * Complex number type definitions * 84 *===========================================================================*/ 85 #define CREAL_T 86 87 typedef struct { 88 real32_T re; 89 real32_T im; 90 } creal32_T; 91 92 typedef struct { 93 real64_T re; 94 real64_T im; 95 } creal64_T; 96 97 typedef struct { 98 real_T re; 99 real_T im; 100 } creal_T; 101 102 typedef struct { 103 int8_T re; 104 int8_T im; 105 } cint8_T; 106 107 typedef struct { 108 uint8_T re; 109 uint8_T im; 110 } cuint8_T; 111 112 typedef struct { 113 int16_T re; 114 int16_T im; 115 } cint16_T; 116 117 typedef struct { 118 uint16_T re; 119 uint16_T im; 120 } cuint16_T; 121 122 typedef struct { 123 int32_T re; 124 int32_T im; 125 } cint32_T; 126 127 typedef struct { 128 uint32_T re; 129 uint32_T im; 130 } cuint32_T; 131 132 /*=======================================================================* 133 * Min and Max: * 134 * int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers * 135 * uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers * 136 *=======================================================================*/ 137 #define MAX_int8_T ((int8_T)(127)) 138 #define MIN_int8_T ((int8_T)(-128)) 139 #define MAX_uint8_T ((uint8_T)(255U)) 140 #define MIN_uint8_T ((uint8_T)(0U)) 141 #define MAX_int16_T ((int16_T)(32767)) 142 #define MIN_int16_T ((int16_T)(-32768)) 143 #define MAX_uint16_T ((uint16_T)(65535U)) 144 #define MIN_uint16_T ((uint16_T)(0U)) 145 #define MAX_int32_T ((int32_T)(2147483647)) 146 #define MIN_int32_T ((int32_T)(-2147483647-1)) 147 #define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU)) 148 #define MIN_uint32_T ((uint32_T)(0U)) 149 150 /* Logical type definitions */ 151 #if (!defined(__cplusplus)) && (!defined(__true_false_are_keywords)) 152 # ifndef false 153 # define false (0U) 154 # endif 155 156 # ifndef true 157 # define true (1U) 158 # endif 159 #endif 160 161 /* 162 * Real-Time Workshop assumes the code is compiled on a target using a 2's compliment representation 163 * for signed integer values. 164 */ 165 #if ((SCHAR_MIN + 1) != -SCHAR_MAX) 166 #error "This code must be compiled using a 2's complement representation for signed integer values" 167 #endif 168 169 /* This ID is used to detect inclusion of an incompatible rtwtypes.h */ 170 #define RTWTYPES_ID_C08S16I16L32N16F1 171 #else /* __TMWTYPES__ */ 172 #define TMWTYPES_PREVIOUSLY_INCLUDED 173 #endif /* __TMWTYPES__ */ 174 175 /* Block D-Work pointer type */ 176 typedef void * pointer_T; 177 178 /* Simulink specific types */ 179 #ifndef __SIMSTRUC_TYPES_H__ 180 #define __SIMSTRUC_TYPES_H__ 181 182 /* Trigger directions: falling, either, and rising */ 183 typedef enum { 184 FALLING_ZERO_CROSSING = -1, 185 ANY_ZERO_CROSSING = 0, 186 RISING_ZERO_CROSSING = 1 187 } ZCDirection; 188 189 /* Previous state of a trigger signal */ 190 typedef uint8_T ZCSigState; 191 192 /* Initial value of a trigger zero crossing signal */ 193 #define UNINITIALIZED_ZCSIG 0x03U 194 #define NEG_ZCSIG 0x02U 195 #define POS_ZCSIG 0x01U 196 #define ZERO_ZCSIG 0x00U 197 198 /* Current state of a trigger signal */ 199 typedef enum { 200 FALLING_ZCEVENT = -1, 201 NO_ZCEVENT = 0, 202 RISING_ZCEVENT = 1 203 } ZCEventType; 204 205 #endif /* __SIMSTRUC_TYPES_H__ */ 206 #endif /* __RTWTYPES_H__ */ 207 #endif /* RTW_HEADER_rtwtypes_h_ */ 208 209 /* File trailer for Real-Time Workshop generated code. 210 * 211 * [EOF] 212 */ 213 |