diff options
| author | Bernard Xiong <[email protected]> | 2018-01-22 15:43:10 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-01-22 15:43:10 +0800 |
| commit | 828804e26de4e538c647215390b080ee91854a36 (patch) | |
| tree | 4abc2613986301fb9cb19185199d77aa6fa03e42 /components/drivers/usb/usbdevice | |
| parent | 537943ed6fae2d71e793c340b195f8be8a3e6cac (diff) | |
| parent | 8b1eedf73efdcbd0f67a5127ad52178c48789899 (diff) | |
Merge pull request #1184 from uestczyh222/master
[Components][Drivers][USB Device]fix ep assign bug
Diffstat (limited to 'components/drivers/usb/usbdevice')
| -rw-r--r-- | components/drivers/usb/usbdevice/core/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/usb/usbdevice/core/core.c b/components/drivers/usb/usbdevice/core/core.c index 1b7f03b006..57111b6f4a 100644 --- a/components/drivers/usb/usbdevice/core/core.c +++ b/components/drivers/usb/usbdevice/core/core.c @@ -1845,7 +1845,7 @@ static rt_err_t rt_usbd_ep_assign(udevice_t device, uep_t ep) while(device->dcd->ep_pool[i].addr != 0xFF) { if(device->dcd->ep_pool[i].status == ID_UNASSIGNED && - ep->ep_desc->bmAttributes == device->dcd->ep_pool[i].type) + ep->ep_desc->bmAttributes == device->dcd->ep_pool[i].type && (EP_ADDRESS(ep) & 0x80) == device->dcd->ep_pool[i].dir) { EP_ADDRESS(ep) |= device->dcd->ep_pool[i].addr; ep->id = &device->dcd->ep_pool[i]; |
