File: C:\local_work_area\demos\autopilot\yaw_damper_ert_rtw/rtwtypes.h

    1   /*    
    2    * File: rtwtypes.h
    3    *
    4    * Definitions required by Real-Time Workshop generated code.
    5    *  
    6    * Real-Time Workshop version: 6.4
    7    * Generated on: 2006-06-16 07:22:28
    8    */
    9   
   10   #ifndef __RTWTYPES_H__
   11   #define __RTWTYPES_H__
   12   #ifndef __TMWTYPES__
   13   #define __TMWTYPES__
   14   
   15   #include <limits.h>
   16   
   17   /*=======================================================================*  
   18    * Target hardware information                                           
   19    *   Device type: 32-bit Embedded Processor
   20    *   Number of bits:     char:   8    short:   16    int:  32
   21    *                       long:  32      native word size:  32
   22    *   Byte ordering: BigEndian
   23    *   Signed integer division rounds to: Zero
   24    *   Shift right on a signed integer as arithmetic shift: on
   25    *=======================================================================*/
   26   
   27   /* This ID is used to detect inclusion of an incompatible rtwtypes.h */
   28   #define RTWTYPES_ID_C08S16I32L32N32F1
   29   
   30   /*=======================================================================*  
   31    * Fixed width word size data types:                                     *  
   32    *   int8_T, int16_T, int32_T     - signed 8, 16, or 32 bit integers     *  
   33    *   uint8_T, uint16_T, uint32_T  - unsigned 8, 16, or 32 bit integers   *  
   34    *   real32_T, real64_T           - 32 and 64 bit floating point numbers *  
   35    *=======================================================================*/
   36   
   37   typedef signed char int8_T;
   38   typedef unsigned char uint8_T;
   39   typedef short int16_T;
   40   typedef unsigned short uint16_T;
   41   typedef int int32_T;
   42   typedef unsigned int uint32_T;
   43   typedef float real32_T;
   44   typedef double real64_T;
   45   
   46   /*===========================================================================*  
   47    * Generic type definitions: real_T, time_T, boolean_T, char_T, int_T,       *  
   48    *                           uint_T and byte_T.                              *  
   49    *===========================================================================*/
   50   
   51   typedef double real_T;
   52   typedef double time_T;
   53   typedef unsigned char boolean_T;
   54   typedef int int_T;
   55   typedef unsigned int uint_T;
   56   typedef char char_T;
   57   typedef char_T byte_T;
   58   
   59   /*=======================================================================*  
   60    * Min and Max:                                                          *  
   61    *   int8_T, int16_T, int32_T     - signed 8, 16, or 32 bit integers     *  
   62    *   uint8_T, uint16_T, uint32_T  - unsigned 8, 16, or 32 bit integers   *  
   63    *=======================================================================*/
   64   
   65   #define MAX_int8_T                      ((int8_T)(127))
   66   #define MIN_int8_T                      ((int8_T)(-128))
   67   #define MAX_uint8_T                     ((uint8_T)(255))
   68   #define MIN_uint8_T                     ((uint8_T)(0))
   69   #define MAX_int16_T                     ((int16_T)(32767))
   70   #define MIN_int16_T                     ((int16_T)(-32768))
   71   #define MAX_uint16_T                    ((uint16_T)(65535))
   72   #define MIN_uint16_T                    ((uint16_T)(0))
   73   #define MAX_int32_T                     ((int32_T)(2147483647))
   74   #define MIN_int32_T                     ((int32_T)(-2147483647-1))
   75   #define MAX_uint32_T                    ((uint32_T)(0xFFFFFFFFU))
   76   #define MIN_uint32_T                    ((uint32_T)(0))
   77   
   78   /* Logical type definitions */
   79   #if !defined(__cplusplus) && !defined(__true_false_are_keywords)
   80   # ifndef false
   81   # define false (0)
   82   # endif
   83   # ifndef true
   84   # define true (1)
   85   # endif
   86   #endif
   87   
   88   #ifndef TRUE
   89   # define TRUE (1)
   90   #endif
   91   #ifndef FALSE
   92   # define FALSE (0)
   93   #endif
   94   
   95   /*   
   96    * Real-Time Workshop assumes the code is compiled on a target using a 2's compliment representation
   97    * for signed integer values.    
   98    */
   99   #if ((SCHAR_MIN + 1) != -SCHAR_MAX)
  100   #error "This code must be compiled using a 2's complement representation for signed integer values"
  101   #endif
  102   
  103   /*  
  104    * Maximum length of a MATLAB identifier (function/variable/model)  
  105    * including the null-termination character. Referenced by 
  106    * rt_logging.c and rt_matrx.c. 
  107    */
  108   #define TMW_NAME_LENGTH_MAX             64
  109   #else                                   /* __TMWTYPES__ */
  110   #define TMWTYPES_PREVIOUSLY_INCLUDED
  111   #endif                                  /* __TMWTYPES__ */
  112   
  113   /* Block D-Work pointer type */
  114   typedef void * pointer_T;
  115   
  116   /* Simulink specific types */
  117   
  118   #ifndef __SIMSTRUC_TYPES_H__
  119   #define __SIMSTRUC_TYPES_H__
  120   
  121   /* States of an enabled subsystem */
  122   typedef enum {
  123     SUBSYS_DISABLED = 0,
  124     SUBSYS_ENABLED = 2,
  125     SUBSYS_BECOMING_DISABLED = 4,
  126     SUBSYS_BECOMING_ENABLED = 8,
  127     SUBSYS_TRIGGERED = 16
  128     } CondStates;
  129   
  130   /* Trigger directions: falling, either, and rising */
  131   typedef enum {
  132     FALLING_ZERO_CROSSING = -1,
  133     ANY_ZERO_CROSSING = 0,
  134     RISING_ZERO_CROSSING = 1
  135     } ZCDirection;
  136   
  137   /* Previous state of a trigger signal */
  138   typedef enum {
  139     NEG_ZCSIG = -1,
  140     ZERO_ZCSIG = 0,
  141     POS_ZCSIG = 1,
  142     ZERO_RISING_EV_ZCSIG = 100,           /* zero and had a rising event  */
  143     ZERO_FALLING_EV_ZCSIG = 101,          /* zero and had a falling event */
  144     UNINITIALIZED_ZCSIG = INT_MAX
  145     } ZCSigState;
  146   
  147   /* Current state of a trigger signal */
  148   typedef enum {
  149     FALLING_ZCEVENT = -1,
  150     NO_ZCEVENT = 0,
  151     RISING_ZCEVENT = 1
  152     } ZCEventType;
  153   
  154   /* Enumeration of built-in data types */
  155   typedef enum {
  156     SS_DOUBLE = 0,                        /* real_T    */
  157     SS_SINGLE = 1,                        /* real32_T  */
  158     SS_INT8 = 2,                          /* int8_T    */
  159     SS_UINT8 = 3,                         /* uint8_T   */
  160     SS_INT16 = 4,                         /* int16_T   */
  161     SS_UINT16 = 5,                        /* uint16_T  */
  162     SS_INT32 = 6,                         /* int32_T   */
  163     SS_UINT32 = 7,                        /* uint32_T  */
  164     SS_BOOLEAN = 8                        /* boolean_T */
  165     } BuiltInDTypeId;
  166   
  167   #define SS_NUM_BUILT_IN_DTYPE           ((int_T)SS_BOOLEAN+1)
  168   
  169   typedef int_T DTypeId;
  170   
  171   #endif                                  /* __SIMSTRUC_TYPES_H__ */
  172   #endif                                  /* __RTWTYPES_H__ */