usb: Implemented support for sending the Microsoft OS-specific descriptor component of a platform capability descriptor

This commit is contained in:
dragonmux
2022-08-11 07:52:43 +01:00
committed by Piotr Esden-Tempski
parent c1247110d8
commit b7ddb7c7c0
3 changed files with 26 additions and 1 deletions

View File

@@ -87,6 +87,8 @@ typedef struct __attribute__((packed)) usb_bos_uuid {
uint8_t e[6];
} usb_bos_uuid;
#define USB_BOS_UUID_SIZE sizeof(usb_bos_uuid)
typedef struct usb_device_capability_descriptor {
uint8_t bLength;
uint8_t bDescriptorType;
@@ -125,6 +127,8 @@ typedef struct __attribute__((packed)) usb_platform_device_capability_descriptor
usb_bos_uuid PlatformCapabilityUUID;
/* Descriptor ends here. The following are used internally: */
/* This is a type-erased struct of the platform-specific capability data */
const void *CapabilityData;
} usb_platform_device_capability_descriptor;
#define USB_DCT_PLATFORM_SIZE 20U

View File

@@ -76,6 +76,17 @@ enum microsoft_registry_types {
{0x65U, 0x9dU, 0x9eU, 0x64U, 0x8aU, 0x9fU}, \
}
#define MICROSOFT_WINDOWS_VERSION_WINBLUE 0x06030000
typedef struct microsoft_os_descriptor_set_information {
uint32_t dwWindowsVersion;
uint16_t wMSOSDescriptorSetTotalLength;
uint8_t bMS_VendorCode;
uint8_t bAltEnumCode;
} microsoft_os_descriptor_set_information;
#define MICROSOFT_OS_DESCRIPTOR_SET_INFORMATION_SIZE sizeof(microsoft_os_descriptor_set_information)
#endif
/**@}*/