소스 검색

Merge pull request #14 from heyuanjie87/ForPullRequest

fixed the string descriptor send to host more than actual
qiuyiuestc 12 년 전
부모
커밋
b91271d490
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      components/drivers/usb/usbdevice/core/core.c

+ 1 - 1
components/drivers/usb/usbdevice/core/core.c

@@ -124,7 +124,7 @@ static rt_err_t _get_string_descriptor(struct udevice* device, ureq_t setup)
         }
     }
 
-    if(setup->length == 0xFF)
+    if(setup->length > len)
         len = str_desc.bLength;
     else
         len = setup->length;