Extra comments.

This commit is contained in:
George Norton 2023-05-31 17:35:48 +01:00
parent 904a8afd9a
commit 8b1caee808
1 changed files with 32 additions and 25 deletions

View File

@ -28,17 +28,24 @@ typedef enum {
MS_OS_20_FEATURE_VENDOR_REVISION = 0x08
} microsoft_os_20_type_t;
static __aligned(4) uint8_t ms_platform_capability_bos_descriptor[PICO_USBDEV_MAX_DESCRIPTOR_SIZE] = {
// BOS Descriptor
// length, descriptor type, total length, number of device caps
0x5, 0xF, 0x21, 0x0, 0x1,
// Platform device capability descriptor
// length, descriptor type, device capability type, reserved
0x1C, 0x10, 0x5, 0x00,
// PlatformCapabilityUUID: D8DD60DF-4589-4CC7-9CD2-659D9E648A9F - Microsoft OS 2.0 descriptor capability
0xDF, 0x60, 0xDD, 0xD8, 0x89, 0x45, 0xC7, 0x4C, 0x9C, 0xD2, 0x65, 0x9D, 0x9E, 0x64, 0x8A, 0x9F,
// Windows version (8.1+)
0x0, 0x0, 0x3, 0x6,
U16_TO_U8S_LE(MS_OS_20_DESC_LEN), // TODO: len
0x1,
0x0 };
// Length of desc_ms_os_20
U16_TO_U8S_LE(MS_OS_20_DESC_LEN),
// Vendor code, alt enum code
0x1, 0x0
};
uint8_t desc_ms_os_20[256] = {
uint8_t desc_ms_os_20[PICO_USBDEV_MAX_DESCRIPTOR_SIZE] = {
// Set header: length, type, windows version, total length
U16_TO_U8S_LE(0x000A), U16_TO_U8S_LE(MS_OS_20_SET_HEADER_DESCRIPTOR), U32_TO_U8S_LE(0x06030000), U16_TO_U8S_LE(MS_OS_20_DESC_LEN),