Changes

734 bytes added ,  18:52, 12 April 2015
→‎0x11 - UhsQueryInterfaces(): Also located USB spec device and config descriptors, copied their structs into here
Line 30: Line 30:  
     uint8_t if_protocol;      /* Interface protocol */  
 
     uint8_t if_protocol;      /* Interface protocol */  
 
} UhsInterfaceFilter;
 
} UhsInterfaceFilter;
 +
 +
/* USB device descriptor */
 +
typedef struct
 +
{
 +
    uint8_t bLength;
 +
    uint8_t bDescriptorType;
 +
    uint16_t bcdUsb;
 +
    uint8_t bDeviceClass;
 +
    uint8_t bDeviceSubclass;
 +
    uint8_t bDeviceProtocol;
 +
    uint8_t bMaxPacketSize;
 +
    uint16_t idVendor;
 +
    uint16_t idProduct;
 +
    uint16_t bcdDevice;
 +
    uint8_t iManufacturer;
 +
    uint8_t iProduct;
 +
    uint8_t iSerialNumber;
 +
    uint8_t bNumConfigurations;
 +
} UhsDeviceDescriptor;
 +
 +
/* USB configuration descriptor */
 +
typedef struct
 +
{
 +
    uint8_t bLength;
 +
    uint8_t bDescriptorType;
 +
    uint16_t wTotalLength;
 +
    uint8_t bNumInterfaces;
 +
    uint8_t bConfigurationValue;
 +
    uint8_t iConfiguration;
 +
    uint8_t bmAttributes;
 +
    uint8_t bMaxPower;
 +
} UhsConfigDescriptor;
    
/* USB interface descriptor */
 
/* USB interface descriptor */
Line 49: Line 81:  
{
 
{
 
     uint32_t if_handle;
 
     uint32_t if_handle;
     char unknown4[0x30 - 0x4];
+
     char unknown4[0x28 - 0x4];
     uint16_t vid, pid;
+
     UhsDeviceDescriptor dev_desc;
     char unknown34[0x43 - 0x34];
+
     UhsConfigDescriptor cfg_desc;
 
     UhsInterfaceDescriptor if_desc;
 
     UhsInterfaceDescriptor if_desc;
     char unknown49[0x16c - 0x4c];
+
     char unknown4c[0x16c - 0x4c];
 
} UhsInterfaceProfile;
 
} UhsInterfaceProfile;
 
</syntaxhighlight>
 
</syntaxhighlight>
203

edits