- Main Page
- Data Structures
- Files

- File List
- Globals

# types.h

Go to the documentation of this file.

    00001 /* ***********************************************************
    00002 * THIS PROGRAM IS PROVIDED "AS IS". TI MAKES NO WARRANTIES OR
    00003 * REPRESENTATIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
    00004 * INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
    00005 * FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
    00006 * COMPLETENESS OF RESPONSES, RESULTS AND LACK OF NEGLIGENCE.
    00007 * TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET ENJOYMENT, QUIET
    00008 * POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY
    00009 * INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE PROGRAM OR
    00010 * YOUR USE OF THE PROGRAM.
    00011 *
    00012 * IN NO EVENT SHALL TI BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
    00013 * CONSEQUENTIAL OR INDIRECT DAMAGES, HOWEVER CAUSED, ON ANY
    00014 * THEORY OF LIABILITY AND WHETHER OR NOT TI HAS BEEN ADVISED
    00015 * OF THE POSSIBILITY OF SUCH DAMAGES, ARISING IN ANY WAY OUT
    00016 * OF THIS AGREEMENT, THE PROGRAM, OR YOUR USE OF THE PROGRAM.
    00017 * EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF
    00018 * REMOVAL OR REINSTALLATION, COMPUTER TIME, LABOR COSTS, LOSS
    00019 * OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF
    00020 * USE OR INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S
    00021 * AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF
    00022 * YOUR USE OF THE PROGRAM EXCEED FIVE HUNDRED DOLLARS
    00023 * (U.S.$500).
    00024 *
    00025 * Unless otherwise stated, the Program written and copyrighted
    00026 * by Texas Instruments is distributed as "freeware".  You may,
    00027 * only under TI's copyright in the Program, use and modify the
    00028 * Program without any charge or restriction.  You may
    00029 * distribute to third parties, provided that you transfer a
    00030 * copy of this license to the third party and the third party
    00031 * agrees to these terms by its first use of the Program. You
    00032 * must reproduce the copyright notice and any other legend of
    00033 * ownership on each copy or partial copy, of the Program.
    00034 *
    00035 * You acknowledge and agree that the Program contains
    00036 * copyrighted material, trade secrets and other TI proprietary
    00037 * information and is protected by copyright laws,
    00038 * international copyright treaties, and trade secret laws, as
    00039 * well as other intellectual property laws.  To protect TI's
    00040 * rights in the Program, you agree not to decompile, reverse
    00041 * engineer, disassemble or otherwise translate any object code
    00042 * versions of the Program to a human-readable form.  You agree
    00043 * that in no event will you alter, remove or destroy any
    00044 * copyright notice included in the Program.  TI reserves all
    00045 * rights not specifically granted under this license. Except
    00046 * as specifically provided herein, nothing in this agreement
    00047 * shall be construed as conferring by implication, estoppel,
    00048 * or otherwise, upon you, any license or other right under any
    00049 * TI patents, copyrights or trade secrets.
    00050 *
    00051 * You may not use the Program in non-TI devices.
    00052 //
    00053 //This software has been submitted to export control regulations
    00054 //The ECCN is EAR99
    00055 * ********************************************************* */
    00056 //*****************************************************************************
    00069 // (c)2009 by Texas Instruments Incorporated, All Rights Reserved.
    00070 /*----------------------------------------------------------------------------+
    00071 |                                                                             |
    00072 |                              Texas Instruments                              |
    00073 |                                                                             |
    00074 |                          MSP430 USB-Example (CDC/HID Driver)                |
    00075 |                                                                             |
    00076 +-----------------------------------------------------------------------------+
    00077 |  Source: types.h, v1.18 2009/06/11                                          |
    00078 |  Author: RSTO                                                               |
    00079 |                                                                             |
    00080 |  WHO          WHEN         WHAT                                             |
    00081 |  ---          ----------   ------------------------------------------------ |
    00082 |  RSTO         2008/09/03   born                                             |
    00083 |  RSTO         2009/07/17   Define __data16 for CCE                          |
    00084 +----------------------------------------------------------------------------*/
    00085 #ifndef _TYPES_H_
    00086 #define _TYPES_H_
    00087
    00088 #ifdef __cplusplus
    00089 extern "C"
    00090 {
    00091 #endif
    00092
    00093 #ifdef __TI_COMPILER_VERSION__
    00094 #define __no_init
    00095 #define __data16
    00096 #define __ACCESS_20BIT_REG__  __SFR_FARPTR
    00097 #endif
    00098
    00099 /*----------------------------------------------------------------------------+
    00100 | Include files                                                               |
    00101 +----------------------------------------------------------------------------*/
    00102 /*----------------------------------------------------------------------------+
    00103 | Function Prototype                                                          |
    00104 +----------------------------------------------------------------------------*/
    00105 /*----------------------------------------------------------------------------+
    00106 | Type Definition & Macro                                                     |
    00107 +----------------------------------------------------------------------------*/
    00108 typedef char            CHAR;
    00109 typedef unsigned char   UCHAR;
    00110 typedef int             INT;
    00111 typedef unsigned int    UINT;
    00112 typedef short           SHORT;
    00113 typedef unsigned short  USHORT;
    00114 typedef long            LONG;
    00115 typedef unsigned long   ULONG;
    00116 typedef void            VOID;
    00117 typedef unsigned long   HANDLE;
    00118 typedef char *          PSTR;
    00119 typedef int             BOOL;
    00120 typedef double          DOUBLE;
    00121 typedef unsigned char   BYTE;
    00122 typedef unsigned char*  PBYTE;
    00123 typedef unsigned int    WORD;
    00124 typedef unsigned long   DWORD;
    00125 typedef unsigned long*  PDWORD;
    00126 #define VOID void
    00127
    00128 // DEVICE_REQUEST Structure
    00129 typedef struct _tDEVICE_REQUEST
    00130 {
    00131     BYTE    bmRequestType;              // See bit definitions below
    00132     BYTE    bRequest;                   // See value definitions below
    00133     WORD    wValue;                     // Meaning varies with request type
    00134     WORD    wIndex;                     // Meaning varies with request type
    00135     WORD    wLength;                    // Number of bytes of data to transfer
    00136 } tDEVICE_REQUEST, *ptDEVICE_REQUEST;
    00137
    00138 typedef struct _tDEVICE_REQUEST_COMPARE
    00139 {
    00140     BYTE    bmRequestType;              // See bit definitions below
    00141     BYTE    bRequest;                   // See value definitions below
    00142     BYTE    bValueL;                    // Meaning varies with request type
    00143     BYTE    bValueH;                    // Meaning varies with request type
    00144     BYTE    bIndexL;                    // Meaning varies with request type
    00145     BYTE    bIndexH;                    // Meaning varies with request type
    00146     BYTE    bLengthL;                   // Number of bytes of data to transfer (LSByte)
    00147     BYTE    bLengthH;                   // Number of bytes of data to transfer (MSByte)
    00148     BYTE    bCompareMask;               // MSB is bRequest, if set 1, bRequest should be matched
    00149     VOID    (*pUsbFunction)(VOID);      // function pointer
    00150 } tDEVICE_REQUEST_COMPARE, *ptDEVICE_REQUEST_COMPARE;
    00151
    00152 //----------------------------------------------------------------------------
    00153 typedef enum
    00154 {
    00155     STATUS_ACTION_NOTHING,
    00156     STATUS_ACTION_DATA_IN,
    00157     STATUS_ACTION_DATA_OUT
    00158 } tSTATUS_ACTION_LIST;
    00159
    00160 typedef enum
    00161 {
    00162     DISABLE,
    00163     ENABLE
    00164 } tSTATUS_EN_DISABLED;
    00165
    00166 typedef enum
    00167 {
    00168     FALSE,
    00169     TRUE
    00170 } tBOOL;
    00171
    00172 /*----------------------------------------------------------------------------+
    00173 | Constant Definition                                                         |
    00174 +----------------------------------------------------------------------------*/
    00175
    00176
    00177 /*----------------------------------------------------------------------------+
    00178 | End of header file                                                          |
    00179 +----------------------------------------------------------------------------*/
    00180 #ifdef __cplusplus
    00181 }
    00182 #endif
    00183 #endif /* _TYPES_H_ */
    00184 /*------------------------ Nothing Below This Line --------------------------*/