HID BOOTLOADER USB信息
本文地址:http://tongxinmao.com/Article/Detail/id/109
=========================== USB Port1 ===========================
Connection Status : 0x01 (Device is connected)
Port Chain : 1-11-1
======================== USB Device ========================
+++++++++++++++++ Device Information ++++++++++++++++++
Device Description : USB 输入设备
Device Path : \\.\usb#vid_04d8&pid_003c#6&331b2e64&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Device ID : USB\VID_04D8&PID_003C\6&331B2E64&0&1
Hardware IDs : USB\VID_04D8&PID_003C&REV_0002 USB\VID_04D8&PID_003C
Driver KeyName : {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0046 (GUID_DEVCLASS_HIDCLASS)
Driver : C:\Windows\system32\DRIVERS\hidusb.sys (Version: 6.1.7601.17514 Date: 2010-11-21)
Driver Inf : C:\Windows\inf\input.inf
Legacy BusType : PNPBus
Class : HIDClass
Class GUID : {745a17a0-74d3-11d0-b6fe-00a0c90f57da} (GUID_DEVCLASS_HIDCLASS)
Interface GUID : {a5dcbf10-6530-11d2-901f-00c04fb951ed} (GUID_DEVINTERFACE_USB_DEVICE)
Service : HidUsb
Enumerator : USB
Location Info : Port_#0001.Hub_#0003
Location IDs : PCIROOT(0)#PCI(1400)#USBROOT(0)#USB(11)#USB(1)
Container ID : {58a928dc-aefb-11e6-9adf-f4bb02974258}
Manufacturer Info : (标准系统设备)
Capabilities : 0x84 (Removable, SurpriseRemovalOK)
Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER)
Problem Code : 0
Power State : D0 (supported: D0, D2, D3, wake from D0, wake from D2)
---------------- Connection Information ---------------
Connection Index : 0x01 (1)
Connection Status : 0x01 (DeviceConnected)
Current Config Value : 0x01
Device Address : 0x0C (12)
Is Hub : 0x00 (no)
Number Of Open Pipes : 0x02 (2)
Device Bus Speed : 0x01 (Full-Speed)
Pipe0ScheduleOffset : 0x00 (0)
Pipe1ScheduleOffset : 0x00 (0)
Data (HexDump) : 01 00 00 00 12 01 00 02 00 00 00 08 D8 04 3C 00 ..............<.
02 00 01 02 00 01 01 01 00 0C 00 02 00 00 00 01 ................
00 00 00 07 05 81 03 40 00 01 00 00 00 00 07 05 .......@........
01 03 40 00 01 00 00 00 00 ..@......
------------------ Device Descriptor ------------------
bLength : 0x12 (18 bytes)
bDescriptorType : 0x01 (Device Descriptor)
bcdUSB : 0x200 (USB Version 2.00)
bDeviceClass : 0x00 (defined by the interface descriptors)
bDeviceSubClass : 0x00
bDeviceProtocol : 0x00
bMaxPacketSize0 : 0x08 (8 bytes)
idVendor : 0x04D8 (Microchip Technology Inc.)
idProduct : 0x003C
bcdDevice : 0x0002
iManufacturer : 0x01 (String Descriptor 1)
Language 0x0409 : "Microchip Technology Inc."
iProduct : 0x02 (String Descriptor 2)
Language 0x0409 : "HID USB Bootloader"
iSerialNumber : 0x00 (No String Descriptor)
bNumConfigurations : 0x01
Data (HexDump) : 12 01 00 02 00 00 00 08 D8 04 3C 00 02 00 01 02 ..........<.....
00 01 ..
------------------ String Descriptors -----------------
------ String Descriptor 0 ------
bLength : 0x04 (4 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language ID[0] : 0x0409 (English - United States)
Data (HexDump) : 04 03 09 04 ....
------ String Descriptor 1 ------
bLength : 0x34 (52 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "Microchip Technology Inc."
Data (HexDump) : 34 03 4D 00 69 00 63 00 72 00 6F 00 63 00 68 00 4.M.i.c.r.o.c.h.
69 00 70 00 20 00 54 00 65 00 63 00 68 00 6E 00 i.p. .T.e.c.h.n.
6F 00 6C 00 6F 00 67 00 79 00 20 00 49 00 6E 00 o.l.o.g.y. .I.n.
63 00 2E 00 c...
------ String Descriptor 2 ------
bLength : 0x26 (38 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "HID USB Bootloader"
Data (HexDump) : 26 03 48 00 49 00 44 00 20 00 55 00 53 00 42 00 &.H.I.D. .U.S.B.
20 00 42 00 6F 00 6F 00 74 00 6C 00 6F 00 61 00 .B.o.o.t.l.o.a.
64 00 65 00 72 00 d.e.r.
---------------- Configuration Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x02 (Configuration Descriptor)
wTotalLength : 0x0029 (41 bytes)
bNumInterfaces : 0x01
bConfigurationValue : 0x01
iConfiguration : 0x00 (No String Descriptor)
bmAttributes : 0xC0
D7: Reserved, set 1 : 0x01
D6: Self Powered : 0x01 (yes)
D5: Remote Wakeup : 0x00 (no)
D4..0: Reserved, set 0 : 0x00
MaxPower : 0x32 (100 mA)
Data (HexDump) : 09 02 29 00 01 01 00 C0 32 09 04 00 00 02 03 00 ..).....2.......
00 00 09 21 11 01 00 01 22 1D 00 07 05 81 03 40 ...!...."......@
00 01 07 05 01 03 40 00 01 ......@..
---------------- Interface Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x04 (Interface Descriptor)
bInterfaceNumber : 0x00
bAlternateSetting : 0x00
bNumEndpoints : 0x02 (2 Endpoints)
bInterfaceClass : 0x03 (HID - Human Interface Device)
bInterfaceSubClass : 0x00 (None)
bInterfaceProtocol : 0x00 (None)
iInterface : 0x00 (No String Descriptor)
Data (HexDump) : 09 04 00 00 02 03 00 00 00 .........
------------------- HID Descriptor --------------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x21 (HID Descriptor)
bcdHID : 0x0111 (HID Version 1.11)
bCountryCode : 0x00 (00 = not localized)
bNumDescriptors : 0x01
Data (HexDump) : 09 21 11 01 00 01 22 1D 00 .!...."..
Descriptor 1:
bDescriptorType : 0x22 (Class=Report)
wDescriptorLength : 0x001D (29 bytes)
Error reading descriptor : ERROR_GEN_FAILURE
----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x81 (Direction=IN EndpointID=1)
bmAttributes : 0x03 (TransferType=Interrupt)
wMaxPacketSize : 0x0040 (64 bytes)
bInterval : 0x01 (1 ms)
Data (HexDump) : 07 05 81 03 40 00 01 ....@..
----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x01 (Direction=OUT EndpointID=1)
bmAttributes : 0x03 (TransferType=Interrupt)
wMaxPacketSize : 0x0040 (64 bytes)
bInterval : 0x01 (1 ms)
Data (HexDump) : 07 05 01 03 40 00 01 ....@..
/* HID */
#define HID_INTF_ID 0x00
#define HID_UEP UEP1
#define HID_BD_OUT ep1Bo
#define HID_INT_OUT_EP_SIZE 64
#define HID_BD_IN ep1Bi
#define HID_INT_IN_EP_SIZE 64
#define HID_NUM_OF_DSC 1 //Just the Report descriptor (no physical descriptor present)
#define HID_RPT01_SIZE 29
/* Device Descriptor */
rom USB_DEV_DSC device_dsc=
{
sizeof(USB_DEV_DSC), // Size of this descriptor in bytes
DSC_DEV, // DEVICE descriptor type
0x0200, // USB Spec Release Number in BCD format
0x00, // Class Code
0x00, // Subclass code
0x00, // Protocol code
EP0_BUFF_SIZE, // Max packet size for EP0, see usbcfg.h
0x04D8, // Vendor ID: Microchip
0x003C, // Product ID: HID Bootloader
0x0002, // Device release number in BCD format
0x01, // Manufacturer string index
0x02, // Product string index
0x00, // Device serial number string index
0x01 // Number of possible configurations
};
/* Configuration 1 Descriptor */
CFG01={
/* Configuration Descriptor */
sizeof(USB_CFG_DSC), // Size of this descriptor in bytes
DSC_CFG, // CONFIGURATION descriptor type
sizeof(cfg01), // Total length of data for this cfg
1, // Number of interfaces in this cfg
1, // Index value of this configuration
0, // Configuration string index
_DEFAULT|_SELF, // Attributes, see usbdefs_std_dsc.h
50, // Max power consumption (2X mA)
/* Interface Descriptor */
sizeof(USB_INTF_DSC), // Size of this descriptor in bytes
DSC_INTF, // INTERFACE descriptor type
0, // Interface Number
0, // Alternate Setting Number
2, // Number of endpoints in this intf
HID_INTF, // Class code
0, // Subclass code, no subclass
0, // Protocol code, no protocol
0, // Interface string index
/* HID Class-Specific Descriptor */
sizeof(USB_HID_DSC), // Size of this descriptor in bytes
DSC_HID, // HID descriptor type
0x0111, // HID Spec Release Number in BCD format
0x00, // Country Code (0x00 for Not supported)
HID_NUM_OF_DSC, // Number of class descriptors, see usbcfg.h
DSC_RPT, // Report descriptor type
sizeof(hid_rpt01), // Size of the report descriptor
/* Endpoint Descriptor */
sizeof(USB_EP_DSC),DSC_EP,_EP01_IN,_INT,HID_INT_IN_EP_SIZE,0x01,
sizeof(USB_EP_DSC),DSC_EP,_EP01_OUT,_INT,HID_INT_OUT_EP_SIZE,0x01
};
rom struct{byte bLength;byte bDscType;word string[1];}sd000={
sizeof(sd000),DSC_STR,0x0409};
rom struct{byte bLength;byte bDscType;word string[25];}sd001={
sizeof(sd001),DSC_STR,
'M','i','c','r','o','c','h','i','p',' ',
'T','e','c','h','n','o','l','o','g','y',' ','I','n','c','.'};
rom struct{byte bLength;byte bDscType;word string[18];}sd002={
sizeof(sd002),DSC_STR,
'H','I','D',' ','U','S','B',' ','B','o','o',
't','l','o','a','d','e','r'};
rom struct{byte report[HID_RPT01_SIZE];}hid_rpt01={
// First byte is the "Item". First byte's two LSbs are the number of data bytes that
// follow, but encoded (0=0, 1=1, 2=2, 3=4 bytes).
// bSize should match number of bytes that follow, or REPORT descriptor parser won't work. The bytes
// that follow in each item line are data bytes
{
0x06, 0x00, 0xFF, // Usage Page = 0xFF00 (Vendor Defined Page 1)
0x09, 0x01, // Usage (Vendor Usage 1)
0xA1, 0x01, // Collection (Application)
0x19, 0x01, // Usage Minimum
0x29, 0x40, // Usage Maximum //64 input usages total (0x01 to 0x40)
0x15, 0x00, // Logical Minimum (data bytes in the report may have minimum value = 0x00)
0x26, 0xFF, 0x00, // Logical Maximum (data bytes in the report may have maximum value = 0x00FF = unsigned 255)
0x75, 0x08, // Report Size: 8-bit field size
0x95, 0x40, // Report Count: Make sixty-four 8-bit fields (the next time the parser hits an "Input", "Output", or "Feature" item)
0x81, 0x00, // Input (Data, Array, Abs): Instantiates input packet fields based on the above report size, count, logical min/max, and usage.
0x19, 0x01, // Usage Minimum
0x29, 0x40, // Usage Maximum //64 output usages total (0x01 to 0x40)
0x91, 0x00, // Output (Data, Array, Abs): Instantiates output packet fields. Uses same report size and count as "Input" fields, since nothing new/different was specified to the parser since the "Input" item.
0xC0} // End Collection
};
rom const unsigned char *rom USB_CD_Ptr[]=
{
(rom const unsigned char *rom)&cfg01,
(rom const unsigned char *rom)&cfg01
};
rom const unsigned char *rom USB_SD_Ptr[]=
{
(rom const unsigned char *rom)&sd000,
(rom const unsigned char *rom)&sd001,
(rom const unsigned char *rom)&sd002
};
上一篇:MPRO USB转串口 CDC USB信息
下一篇:MPRO编程器USB信息