diff options
author | Ilya Stolyarov <i.stolyarov@thirdpin.ru> | 2018-10-11 16:12:13 +0300 |
---|---|---|
committer | Ilya Stolyarov <i.stolyarov@thirdpin.ru> | 2019-07-07 01:08:46 +0300 |
commit | f2f3d0abb98f0a609d26a32c6337732f4932afd4 (patch) | |
tree | 03cfca4418cb4833c7357bf2871c418be937909d | |
parent | f344eac0b9bfbfc21dc4a4caf818c952e2957141 (diff) |
FIX: [usb] usbd_dev->user_callback_ctr have 8 fields but iterate only 4
Signed-off-by: Ilya Stolyarov <i.stolyarov@thirdpin.ru>
-rw-r--r-- | lib/usb/usb_dwc_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/usb/usb_dwc_common.c b/lib/usb/usb_dwc_common.c index 162bfd7c..3a33020f 100644 --- a/lib/usb/usb_dwc_common.c +++ b/lib/usb/usb_dwc_common.c @@ -119,7 +119,7 @@ void dwc_endpoints_reset(usbd_device *usbd_dev) usbd_dev->fifo_mem_top = usbd_dev->fifo_mem_top_ep0; /* Disable any currently active endpoints */ - for (i = 1; i < 4; i++) { + for (i = 1; i < 8; i++) { if (REBASE(OTG_DOEPCTL(i)) & OTG_DOEPCTL0_EPENA) { REBASE(OTG_DOEPCTL(i)) |= OTG_DOEPCTL0_EPDIS; } @@ -339,7 +339,7 @@ void dwc_poll(usbd_device *usbd_dev) * There is no global interrupt flag for transmit complete. * The XFRC bit must be checked in each OTG_DIEPINT(x). */ - for (i = 0; i < 4; i++) { /* Iterate over endpoints. */ + for (i = 0; i < 8; i++) { /* Iterate over endpoints. */ if (REBASE(OTG_DIEPINT(i)) & OTG_DIEPINTX_XFRC) { /* Transfer complete. */ if (usbd_dev->user_callback_ctr[i] |