⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usb_parameter.lst

📁 源码 : KIEL C 单片机 : C8051F320 功能 : U盘 (64M) 关键字 : C8051F320,U盘,NANDFLASH,FAT,SCH 描述 : 源码完全可运行
💻 LST
字号:
C51 COMPILER V7.00  USB_PARAMETER                                                          03/24/2005 20:28:24 PAGE 1   


C51 COMPILER V7.00, COMPILATION OF MODULE USB_PARAMETER
OBJECT MODULE PLACED IN Usb_Parameter.OBJ
COMPILER INVOKED BY: C:\keil\C51\BIN\c51.exe Usb_Parameter.h DB OE

stmt level    source

   1          #ifndef _USB_PARAMETER_H_
   2          #define _USB_PARAMETER_H_
   3          //标准描述符的类型
   4          #define  DSC_DEVICE                     0x01        // Device Descriptor
   5          #define  DSC_CONFIG         0x02        // Configuration Descriptor
   6          #define  DSC_STRING         0x03        // String Descriptor
   7          #define  DSC_INTERFACE      0x04        // Interface Descriptor
   8          #define  DSC_ENDPOINT       0x05        // Endpoint Descriptor
   9          
  10          //HID 设备描述符类型
  11          #define DSC_HID                         0x21            // HID Class Descriptor
  12          #define DSC_HID_REPORT          0x22            // HID Report Descriptor
  13          //端点的大小
  14          #define  EP0_PACKET_SIZE    0x40
  15          #define  EP1_PACKET_SIZE    0x80      
  16          #define  EP2_PACKET_SIZE    0x80  
  17          
  18          //设备的状态
  19          #define  DEV_ATTACHED       0x00        // Device is in Attached State
  20          #define  DEV_POWERED        0x01        // Device is in Powered State
  21          #define  DEV_DEFAULT        0x02        // Device is in Default State
  22          #define  DEV_ADDRESS        0x03        // Device is in Addressed State
  23          #define  DEV_CONFIGURED     0x04        // Device is in Configured State
  24          #define  DEV_SUSPENDED      0x05        // Device is in Suspended State
  25          
  26          //端点的状态
  27          #define  EP_IDLE            0x00        // This signifies Endpoint Idle State
  28          #define  EP_TX              0x01        // Endpoint Transmit State
  29          #define  EP_RX              0x02        // Endpoint Receive State
  30          #define  EP_HALT            0x03        // Endpoint Halt State (return stalls)
  31          #define  EP_STALL           0x04        // Endpoint Stall (send procedural stall next status phase)
  32          #define  EP_ADDRESS         0x05        // Endpoint Address (change FADDR during next status phase)
  33          
  34          //BULK_ONLY端点的状态
  35          #define BULK_IDLE                       0x00
  36          #define BULK_TX                         0x01
  37          #define BULK_RX                         0x02
  38          #define BULK_DATA_END           0x03
  39          /////////////////////////////////////////////////////////////////////////////////////////////////////
  40          // 设置阶段的命令数据包
  41          // Define bmRequestType bitmaps
  42          #define  IN_DEVICE               0x00        // Request made to device, direction is IN 
  43          #define  OUT_DEVICE              0x80        // Request made to device, direction is OUT
  44          #define  IN_INTERFACE            0x01        // Request made to interface, direction is IN
  45          #define  OUT_INTERFACE           0x81        // Request made to interface, direction is OUT
  46          #define  IN_ENDPOINT             0x02        // Request made to endpoint, direction is IN
  47          #define  OUT_ENDPOINT            0x82        // Request made to endpoint, direction is OUT
  48          
  49          // Define wIndex bitmaps
  50          #define  IN_EP1                  0x81        // Index values used by Set and Clear feature
  51          #define  OUT_EP1                 0x01        // commands for Endpoint_Halt
  52          #define  IN_EP2                  0x82
  53          #define  OUT_EP2                 0x02
  54          
  55          // Define wValue bitmaps for Standard Feature Selectors
C51 COMPILER V7.00  USB_PARAMETER                                                          03/24/2005 20:28:24 PAGE 2   

  56          #define  DEVICE_REMOTE_WAKEUP    0x01        // Remote wakeup feature(not used)
  57          #define  ENDPOINT_HALT           0x00        // Endpoint_Halt feature selector
  58          
  59          /////////////////////////////////////////////////////////////////////////////////////////////////////
  60          //全局变量
  61          unsigned int   DataSize;                        // 需要发送的数据大小
  62          unsigned int   DataSent;                        // 已经发送的数据大小
  63          unsigned char  *DataPtr;                        // 发送数据的指针
  64          unsigned char  ONES_PACKET[2] = {0x01, 0x00};        // These are response packets used for
  65          unsigned char  ZERO_PACKET[2] = {0x00, 0x00};        // communication with host
  66          
  67          unsigned char  Ep_Status[3]={EP_IDLE,EP_STALL,EP_STALL};   //端点的状态
  68          unsigned char  USB_State=DEV_ATTACHED;                     //设备的状态
  69          
  70          /*
  71          unsigned char Bulk_Status = BULK_IDLE;
  72          
  73          xdata unsigned char OUT_PACKET[512];    //输出数据缓冲区
  74          xdata unsigned char IN_PACKET[128];             //输入数据缓冲区
  75          
  76          xdata unsigned long LBA=0;
  77          xdata unsigned Transfer_Length;         //要传送的扇区数
  78          xdata unsigned int Block=0;                     //块地址
  79          xdata unsigned char Page=0;                     //块内页地址
  80          xdata unsigned int Packet_Flag=0;*/
  81          
  82          #endif


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   ----    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     15    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -