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

📄 usb_descr.c

📁 Usb Host/Periphel Control TD1120 codes
💻 C
📖 第 1 页 / 共 2 页
字号:
U8  fsDeviceQualifierDescriptor[10] =
   {
   10,                                 /* bLength Length of this descriptor */
   USB_DEVICE_QUALIFIER_DESCRIPTOR,    /* bDescType This is a DEVICE Qualifier descr */
   0,2,                                /* bcdUSB USB revision 2.0 */
   0xFF,                               /* bDeviceClass */
   0xFF,                               /* bDeviceSubClass */
   0xFF,                               /* bDeviceProtocol */
   8,                                  /* bMaxPacketSize0 */
   0x01,                               /* bNumConfigurations */
   0
   };

U8  fsOtherSpeedConfigDescriptor[60] =
   {
   9,                                  /* size of USB config descriptor */
   USB_OTHER_SPEED_CONFIG_DESCRIPTOR,  /* bDescriptorType, configuration */
   0x3C,                               /* wTotalLength */
   0x00,
   0x01,                               /* bNumInterfaces */
   1,                                  /* bConfigurationValue */
   0x00,                               /* iConfiguration */
   0xC0,                               /* bmAttributes, self powered */
   0x03,                               /* bMaxPower */
   
   9,                                  /* size of interface descriptor */
   4,                                  /* bDescriptorType, interface */
   0x00,                               /* bInterfaceNumber */
   0x00,                               /* bAlternateSetting */
   0x06,                               /* bNumEndpoints */
   0xFF,                               /* bInterfaceClass, MassDbulkonly */
   0xFF,                               /* bInterfaceSubClass, SCSI commands */
   0xFF,                               /* bInterfaceProtocol, Bulk Only */
   0x00,                               /* iInterface */
   
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x01,                               /* bEndpointAddress */
   USB_ISOCH_ENDPOINT,                 /* bmAttributes, iso */
   (HS_ISOCH_MPS & 0xFF), 
   ((HS_ISOCH_MPS >> 8) & 0xFF),
   HS_ISO_INTERVAL,                    /* bInterval, not used */
   
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x82,                               /* bEndpointAddress */
   USB_ISOCH_ENDPOINT,                 /* bmAttributes, iso */
   (HS_ISOCH_MPS & 0xFF), 
   ((HS_ISOCH_MPS >> 8) & 0xFF),
   HS_ISO_INTERVAL,                    /* bInterval, not used */
   
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x03,                               /* bEndpointAddress */
   USB_INT_ENDPOINT,                   /* bmAttributes, intr */
   (HS_INT_MPS & 0xFF), 
   ((HS_INT_MPS >> 8) & 0xFF),
   HS_INT_INTERVAL,                    /* bInterval, not used */
   
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x84,                               /* bEndpointAddress */
   USB_INT_ENDPOINT,                   /* bmAttributes, intr */
   (HS_INT_MPS & 0xFF), 
   ((HS_INT_MPS >> 8) & 0xFF),
   HS_INT_INTERVAL,                    /* bInterval, not used */
   
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x05,                               /* bEndpointAddress */
   0x02,                               /* bmAttributes, bulk */
   (HS_BULKOUT_MPS & 0xFF), 
   ((HS_BULKOUT_MPS >> 8) & 0xFF),
   0x00,                               /* bInterval, not used */
 
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x86,                               /* bEndpointAddress */
   0x02,                               /* bmAttributes, bulk */
   (HS_BULKIN_MPS & 0xFF), 
   ((HS_BULKIN_MPS >> 8) & 0xFF),
   0x00,                               /* bInterval, not used */
   };
   
U8  hsOtherSpeedConfigDescriptor[60] =
   {
   9,                                  /* size of USB config descriptor */
   USB_OTHER_SPEED_CONFIG_DESCRIPTOR,  /* bDescriptorType, configuration */
   0x3C,                               /* wTotalLength */
   0x00,
   0x01,                               /* bNumInterfaces */
   1,                                  /* bConfigurationValue */
   0x00,                               /* iConfiguration */
   0xC0,                               /* bmAttributes, self powered */
   0x03,                               /* bMaxPower */
   
   9,                                  /* size of interface descriptor */
   4,                                  /* bDescriptorType, interface */
   0x00,                               /* bInterfaceNumber */
   0x00,                               /* bAlternateSetting */
   0x06,                               /* bNumEndpoints */
   0xFF,                               /* bInterfaceClass, MassDbulkonly */
   0xFF,                               /* bInterfaceSubClass, SCSI commands */
   0xFF,                               /* bInterfaceProtocol, Bulk Only */
   0x00,                               /* iInterface */
   
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x01,                               /* bEndpointAddress */
   USB_ISOCH_ENDPOINT,                 /* bmAttributes, iso */
   (FS_ISOCH_MPS & 0xFF), 
   ((FS_ISOCH_MPS >> 8) & 0xFF),
   FS_ISO_INTERVAL,                    /* bInterval, not used */
   
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x82,                               /* bEndpointAddress */
   USB_ISOCH_ENDPOINT,                 /* bmAttributes, iso */
   (FS_ISOCH_MPS & 0xFF), 
   ((FS_ISOCH_MPS >> 8) & 0xFF),
   FS_ISO_INTERVAL,                    /* bInterval, not used */
   
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x03,                               /* bEndpointAddress */
   USB_INT_ENDPOINT,                   /* bmAttributes, intr */
   (FS_INT_MPS & 0xFF), 
   ((FS_INT_MPS >> 8) & 0xFF),
   FS_INT_INTERVAL,                    /* bInterval, not used */
   
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x84,                               /* bEndpointAddress */
   USB_INT_ENDPOINT,                   /* bmAttributes, intr */
   (FS_INT_MPS & 0xFF), 
   ((FS_INT_MPS >> 8) & 0xFF),
   FS_INT_INTERVAL,                    /* bInterval, not used */
   
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x05,                               /* bEndpointAddress */
   0x02,                               /* bmAttributes, bulk */
   (FS_BULKOUT_MPS & 0xFF), 
   ((FS_BULKOUT_MPS >> 8) & 0xFF),
   0x00,                               /* bInterval, not used */
 
   7,                                  /* Size of USB ENDPOINT DESCRIPTOR */
   5,                                  /* bDescriptorType, endpoint */
   0x86,                               /* bEndpointAddress */
   0x02,                               /* bmAttributes, bulk */
   (FS_BULKIN_MPS & 0xFF), 
   ((FS_BULKIN_MPS >> 8) & 0xFF),
   0x00,                               /* bInterval, not used */
   };

U8 StringDescriptor0[4] =
   {
   4,                      /* bLength */
   USB_STRING_DESCRIPTOR,  /* bDescriptorType, string */
   0x09,                   /* LangID codes, English */
   0x00
   };
   
U8 StringDescriptor1[8] =
   {
   8,                      /* bLength */
   USB_STRING_DESCRIPTOR,  /* bDescriptorType, string */
   'T',
   0x00,
   'D',
   0x00,
   'I',
   0x00
   };
   
U8 StringDescriptor2[40] =
   {
   40,                     /* bLength */
   USB_STRING_DESCRIPTOR,  /* bDescriptorType, string */
   'E',
   0x00,
   'c',
   0x00,
   'h',
   0x00,
   'o',
   0x00,
   ' ',
   0x00,
   'E',
   0x00,
   'x',
   0x00,
   'a',
   0x00,
   'm',
   0x00,
   'p',
   0x00,
   'l',
   0x00,
   'e',
   0x00,
   ' ',
   0x00,
   'D',
   0x00,
   'e',
   0x00,
   'v',
   0x00,
   'i',
   0x00,
   'c',
   0x00,
   'e',
   0x00
   };
   
U8 StringDescriptor3[12] =
   {
   12,                     /* bLength */
   USB_STRING_DESCRIPTOR,  /* bDescriptorType, string */
   'v',
   0x00,
   '1',
   0x00,
   '.',
   0x00,
   '0',
   0x00,
   '0',
   0x00
   };



   

⌨️ 快捷键说明

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