summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorMiraculousConch <[email protected]>2017-11-28 16:13:16 +0800
committerMiraculousConch <[email protected]>2017-11-28 16:13:16 +0800
commita8fc894c19c4025d2a71ed0a72ed10725ff1b219 (patch)
tree6a3b59bf160e6648a4811a2db40cb7d0f85444b9 /components
parent128c184554bf7c0955f8de97a59e39c8a6f6198f (diff)
[Components][Drivers][USB]fix OS proerty desc bug
Diffstat (limited to 'components')
-rw-r--r--components/drivers/include/drivers/usb_device.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/include/drivers/usb_device.h b/components/drivers/include/drivers/usb_device.h
index 8f2c1d1116..48f407cc3d 100644
--- a/components/drivers/include/drivers/usb_device.h
+++ b/components/drivers/include/drivers/usb_device.h
@@ -435,7 +435,7 @@ rt_inline void usbd_os_proerty_descriptor_send(ufunction_t func, ureq_t setup, u
{
rt_memcpy((void *)pdata,(void *)&usb_os_proerty[index],10);
pdata += 10;
- for(i = 0;i < usb_os_proerty[index].wPropertyNameLength;i++)
+ for(i = 0;i < usb_os_proerty[index].wPropertyNameLength/2;i++)
{
*pdata = usb_os_proerty[index].bPropertyName[i];
pdata++;
@@ -444,7 +444,7 @@ rt_inline void usbd_os_proerty_descriptor_send(ufunction_t func, ureq_t setup, u
}
*((rt_uint32_t *)pdata) = usb_os_proerty[index].dwPropertyDataLength;
pdata += 4;
- for(i = 0;i < usb_os_proerty[index].dwPropertyDataLength;i++)
+ for(i = 0;i < usb_os_proerty[index].dwPropertyDataLength/2;i++)
{
*pdata = usb_os_proerty[index].bPropertyData[i];
pdata++;