Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/usb/usb_dwc_common.c')
-rw-r--r--lib/usb/usb_dwc_common.c4
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..ae80db40 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 < ENDPOINT_COUNT; 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 < ENDPOINT_COUNT; i++) { /* Iterate over endpoints. */
if (REBASE(OTG_DIEPINT(i)) & OTG_DIEPINTX_XFRC) {
/* Transfer complete. */
if (usbd_dev->user_callback_ctr[i]