summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-05-28 12:12:37 +0800
committerGitHub <[email protected]>2018-05-28 12:12:37 +0800
commitf29cc0dba460ff861682b20e7288732676a6c34b (patch)
treef06396675d71a5cd41156c5b9d64d204fe8c4b48 /components
parent2157523be0e0ea9107a8499b7e85663ab19a8e9e (diff)
parent178fce54bd7841836f68f83426344b2c60dd14e5 (diff)
Merge pull request #1474 from uestczyh222/master
[Components][USB]fix device ep write 1bytes on hs
Diffstat (limited to 'components')
-rw-r--r--components/drivers/usb/usbdevice/core/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/drivers/usb/usbdevice/core/core.c b/components/drivers/usb/usbdevice/core/core.c
index c8cd362bef..297e1ab48d 100644
--- a/components/drivers/usb/usbdevice/core/core.c
+++ b/components/drivers/usb/usbdevice/core/core.c
@@ -955,6 +955,7 @@ static rt_size_t rt_usbd_ep_write(udevice_t device, uep_t ep, void *buffer, rt_s
RT_ASSERT(device->dcd != RT_NULL);
RT_ASSERT(ep != RT_NULL);
+ rt_enter_critical();
maxpacket = EP_MAXPACKET(ep);
if(ep->request.remain_size >= maxpacket)
{
@@ -968,7 +969,7 @@ static rt_size_t rt_usbd_ep_write(udevice_t device, uep_t ep, void *buffer, rt_s
ep->request.remain_size);
ep->request.remain_size = 0;
}
-
+ rt_exit_critical();
return size;
}