@@ -23,7 +23,7 @@ static uint8_t itf_num;
2323// Support for Microsoft OS 2.0 descriptor
2424#define BOS_TOTAL_LEN (TUD_BOS_DESC_LEN + TUD_BOS_MICROSOFT_OS_DESC_LEN)
2525
26- #define MS_OS_20_DESC_LEN 166
26+ #define MS_OS_20_DESC_LEN (RPI_RESET_MS_OS_20_DESC_LEN + 0x0A)
2727
2828uint8_t const desc_bos [] =
2929{
@@ -46,27 +46,7 @@ static const uint8_t desc_ms_os_20[] =
4646 // Set header: length, type, windows version, total length
4747 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 ),
4848
49- // Function Subset header: length, type, first interface, reserved, subset length
50- U16_TO_U8S_LE (0x0008 ), U16_TO_U8S_LE (MS_OS_20_SUBSET_HEADER_FUNCTION ), PICO_STDIO_USB_RESET_INTERFACE_MS_OS_20_DESCRIPTOR_ITF , 0 , U16_TO_U8S_LE (MS_OS_20_DESC_LEN - 0x000A ),
51-
52- // MS OS 2.0 Compatible ID descriptor: length, type, compatible ID, sub compatible ID
53- U16_TO_U8S_LE (0x0014 ), U16_TO_U8S_LE (MS_OS_20_FEATURE_COMPATBLE_ID ), 'W' , 'I' , 'N' , 'U' , 'S' , 'B' , 0x00 , 0x00 ,
54- 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , // sub-compatible
55-
56- // MS OS 2.0 Registry property descriptor: length, type
57- U16_TO_U8S_LE (0x0080 ), U16_TO_U8S_LE (MS_OS_20_FEATURE_REG_PROPERTY ),
58- U16_TO_U8S_LE (0x0001 ), U16_TO_U8S_LE (0x0028 ), // wPropertyDataType, wPropertyNameLength and PropertyName "DeviceInterfaceGUID" in UTF-16
59- 'D' , 0x00 , 'e' , 0x00 , 'v' , 0x00 , 'i' , 0x00 , 'c' , 0x00 , 'e' , 0x00 , 'I' , 0x00 , 'n' , 0x00 , 't' , 0x00 , 'e' , 0x00 ,
60- 'r' , 0x00 , 'f' , 0x00 , 'a' , 0x00 , 'c' , 0x00 , 'e' , 0x00 , 'G' , 0x00 , 'U' , 0x00 , 'I' , 0x00 , 'D' , 0x00 , 0x00 , 0x00 ,
61- U16_TO_U8S_LE (0x004E ), // wPropertyDataLength
62- // Vendor-defined Property Data: {bc7398c1-73cd-4cb7-98b8-913a8fca7bf6}
63- '{' , 0 , 'b' , 0 , 'c' , 0 , '7' , 0 , '3' , 0 , '9' , 0 ,
64- '8' , 0 , 'c' , 0 , '1' , 0 , '-' , 0 , '7' , 0 , '3' , 0 ,
65- 'c' , 0 , 'd' , 0 , '-' , 0 , '4' , 0 , 'c' , 0 , 'b' , 0 ,
66- '7' , 0 , '-' , 0 , '9' , 0 , '8' , 0 , 'b' , 0 , '8' , 0 ,
67- '-' , 0 , '9' , 0 , '1' , 0 , '3' , 0 , 'a' , 0 , '8' , 0 ,
68- 'f' , 0 , 'c' , 0 , 'a' , 0 , '7' , 0 , 'b' , 0 , 'f' , 0 ,
69- '6' , 0 , '}' , 0 , 0 , 0
49+ RPI_RESET_MS_OS_20_DESCRIPTOR (PICO_STDIO_USB_RESET_INTERFACE_MS_OS_20_DESCRIPTOR_ITF )
7050};
7151
7252TU_VERIFY_STATIC (sizeof (desc_ms_os_20 ) == MS_OS_20_DESC_LEN , "Incorrect size" );
0 commit comments