You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/08/11 05:19:20 UTC

[nuttx] 02/02: usbdev/composite: winusb devices are not automatically recognized by windows

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 7ba9236c54090c428b6b6b038d420b9ccc77bd3c
Author: sunkun3 <su...@xiaomi.com>
AuthorDate: Wed Jul 26 16:48:33 2023 +0800

    usbdev/composite: winusb devices are not automatically recognized by windows
    
    Description bMS_VendorCode is incorrectly configured. Change it to
    USB_REQ_GETMSFTOSDESCRIPTOR(0xee), which is the same as the request
    processing logic for GET_MS_DESCRIPTOR in the code
    
    Signed-off-by: sunkun3 <su...@xiaomi.com>
---
 drivers/usbdev/composite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usbdev/composite.c b/drivers/usbdev/composite.c
index 11a9c09795..bf3d3b4915 100644
--- a/drivers/usbdev/composite.c
+++ b/drivers/usbdev/composite.c
@@ -531,7 +531,7 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver,
                       static const uint8_t msft_response[16] =
                       {
                         'M', 0, 'S', 0, 'F', 0, 'T', 0, '1', 0, '0', 0,
-                        '0', 0, 0xff, 0
+                        '0', 0, USB_REQ_GETMSFTOSDESCRIPTOR, 0
                       };
 
                       buf->len = 18;