You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/10/26 12:33:11 UTC

[GitHub] [mynewt-core] sjanc commented on a change in pull request #2688: tinyusb: Add WINUSB descriptor support

sjanc commented on a change in pull request #2688:
URL: https://github.com/apache/mynewt-core/pull/2688#discussion_r736484048



##########
File path: hw/usb/tinyusb/std_descriptors/src/std_descriptors.c
##########
@@ -245,6 +245,53 @@ const char *string_desc_arr[] = {
 
 static uint16_t desc_string[MYNEWT_VAL(USBD_STRING_DESCRIPTOR_MAX_LENGTH) + 1];
 
+#if MYNEWT_VAL(USBD_WINDOWS_COMP_ID)
+
+#define MICROSOFT_OS_STRING_DESCRIPTOR  0xEE
+#define COMPATIBILITY_FEATURE_REQUEST   0xFE
+
+static const uint8_t microsoft_os_string_descriptor[] = {
+    0x12,                           /* BYTE     Descriptor length (18 bytes) */
+    0x03,                           /* BYTE     Descriptor type (3 = String) */
+    0x4D, 0x00, 0x53, 0x00,         /* 7 WORDS Unicode String (LE)  Signature: "MSFT100" */
+    0x46, 0x00, 0x54, 0x00,
+    0x31, 0x00, 0x30, 0x00,
+    0x30, 0x00,
+    COMPATIBILITY_FEATURE_REQUEST,  /* BYTE Vendor Code */
+    0x00                            /* BYTE Padding */
+};
+
+struct {
+    uint32_t len;
+    uint16_t version;
+    uint16_t four;
+    uint8_t number_of_sections;
+    uint8_t reserved1[7];
+    uint8_t itf;
+    uint8_t reserved2;
+    uint8_t compatible_id[8];
+    uint8_t sub_compatible_id[8];
+    uint8_t reserved3[6];
+} windows_compat_id = {

Review comment:
       does it have to be global symbol?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org