- C51 COMPILER V7.02b USB_STRUCTS_H 08/06/2007 14:02:46 PAGE 1
- C51 COMPILER V7.02b, COMPILATION OF MODULE USB_STRUCTS_H
- OBJECT MODULE PLACED IN USB_Structs_H.OBJ
- COMPILER INVOKED BY: C:KeilC51BINc51.exe USB_Structs_H.h DB OE
- stmt level source
- 1 //-----------------------------------------------------------------------------
- 2 // USB_Structs.h
- 3 //-----------------------------------------------------------------------------
- 4 //-----------------------------------------------------------------------------
- 5 // Copyright 2007 Vson Technology, Inc.
- 6 // http://www.usbmcu.com
- 7 //
- 8 // Program Description:
- 9 //
- 10 //
- 11 //
- 12 //
- 13 //
- 14 // MCU: C8051F347
- 15 // Tool chain: Keil C51 7.50 / Keil EVAL C51
- 16 // Silicon Laboratories IDE version 2.6
- 17 // Command Line:
- 18 // Project Name: TR1000
- 19 //
- 20 //
- 21 // Release 1.0
- 22 // -All changes by Brian Cai
- 23 // -24 JUL 2007
- 24 //
- 25 //
- 26
- 27 #include "USB_Config_H.h"
- 28 #include "USB_Descriptors_H.h"
- 29
- 30
- 31
- 32 #ifndef _USB_STRUCTS_H_
- 33 #define _USB_STRUCTS_H_
- 34
- 35
- 36 //-----------------------------------------------------------------------------
- 37 // Global Constants
- 38 //-----------------------------------------------------------------------------
- 39 /*
- 40 #ifndef _BYTE_DEF_
- 41 #define _BYTE_DEF_
- 42 typedef unsigned char BYTE;
- 43 #endif /* _BYTE_DEF_ */
- 44 /*
- 45 #ifndef _UINT_DEF_
- 46 #define _UINT_DEF_
- 47 typedef unsigned int UINT;
- 48 #endif /*_UINT_DEF_*/
- 49
- 50 #ifndef _WORD_DEF_
- 51 #define _WORD_DEF_
- 52
- 53 typedef union {unsigned int i; unsigned char c[2];} WORD;
- 54 #endif /* _WORD_DEF_ */
- 55
- C51 COMPILER V7.02b USB_STRUCTS_H 08/06/2007 14:02:46 PAGE 2
- 56 typedef struct IF_STATUS {
- 57 BYTE bNumAlts; // Number of alternate choices for this
- *** ERROR C141 IN LINE 57 OF USB_STRUCTS_H.H: syntax error near 'BYTE'
- *** ERROR C129 IN LINE 57 OF USB_STRUCTS_H.H: missing ';' before 'bNumAlts'
- 58 // interface
- 59 BYTE bCurrentAlt; // Current alternate setting for this interface
- 60 // zero means this interface does not exist
- 61 // or the device is not configured
- 62 BYTE bIfNumber; // Interface number for this interface
- 63 // descriptor
- 64 } IF_STATUS;
- 65 typedef IF_STATUS * PIF_STATUS;
- 66
- 67
- 68 // Configuration status - only valid in configured state
- 69 // This data structure assumes a maximum of 2 interfaces for any given
- 70 // configuration, and a maximum of 4 interface descriptors (including
- 71 // all alternate settings).
- 72 typedef struct DEVICE_STATUS {
- 73 BYTE bCurrentConfig; // Index number for the selected config
- 74 BYTE bDevState; // Current device state
- 75 BYTE bRemoteWakeupSupport; // Does this device support remote wakeup?
- 76 BYTE bRemoteWakeupStatus; // Device remote wakeup enabled/disabled
- 77 BYTE bSelfPoweredStatus; // Device self- or bus-powered
- 78 BYTE bNumInterf; // Number of interfaces for this configuration
- 79 BYTE bTotalInterfDsc; // Total number of interface descriptors for
- 80 // this configuration (includes alt.
- 81 // descriptors)
- 82 BYTE* pConfig; // Points to selected configuration desc
- 83 IF_STATUS IfStatus[MAX_IF];// Array of interface status structures
- 84 } DEVICE_STATUS;
- 85 typedef DEVICE_STATUS * PDEVICE_STATUS;
- 86
- 87 // Control endpoint command (from host)
- 88 typedef struct EP0_COMMAND {
- 89 BYTE bmRequestType; // Request type
- 90 BYTE bRequest; // Specific request
- 91 WORD wValue; // Misc field
- 92 WORD wIndex; // Misc index
- 93 WORD wLength; // Length of the data segment for this request
- 94 } EP0_COMMAND;
- 95
- 96 // Endpoint status (used for IN, OUT, and Endpoint0)
- 97 typedef struct EP_STATUS {
- 98 BYTE bEp; // Endpoint number (address)
- 99 UINT uNumBytes; // Number of bytes available to transmit
- 100 UINT uMaxP; // Maximum packet size
- 101 BYTE bEpState; // Endpoint state
- 102 void *pData; // Pointer to data to transmit
- 103 WORD wData; // Storage for small data packets
- 104 } EP_STATUS;
- 105 typedef EP_STATUS * PEP_STATUS;
- 106
- 107 // Descriptor structure
- 108 // This structure contains all usb descriptors for the device.
- 109 // The descriptors are held in array format, and are accessed with the offsets
- 110 // defined in the header file "usb_desc.h". The constants used in the
- 111 // array declarations are also defined in header file "usb_desc.h".
- 112 typedef struct DESCRIPTORS {
- 113 BYTE bStdDevDsc[STD_DSC_SIZE];
- 114 BYTE bCfg1[CFG_DSC_SIZE + IF_DSC_SIZE*CFG1_IF_DSC + EP_DSC_SIZE*CFG1_EP_DSC];
- 115 } DESCRIPTORS;
- C51 COMPILER V7.02b USB_STRUCTS_H 08/06/2007 14:02:46 PAGE 3
- 116
- 117
- 118
- 119 #endif // USB_STRUCTS_H
- 120
- 121 //-----------------------------------------------------------------------------
- 122 // End Of File
- 123 //-----------------------------------------------------------------------------
- C51 COMPILATION COMPLETE. 0 WARNING(S), 2 ERROR(S)