diff options
| author | uestczyh222 <[email protected]> | 2018-01-22 12:58:59 +0800 |
|---|---|---|
| committer | uestczyh222 <[email protected]> | 2018-01-22 12:58:59 +0800 |
| commit | 4ca2337176d79b4c6fbb2ea9c569fc2ec5134e6e (patch) | |
| tree | 4d6dda6c7964fdd50ce4d103e691a7a28eb9d854 /components/drivers | |
| parent | 973a5fb885cb7edc55d5aed6ce2445cb457d7f6c (diff) | |
[Components][Drivers][USB Device]fix ep assign bug
Diffstat (limited to 'components/drivers')
| -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]; |
