From 3817d252dbbf0b3fc77b5b64fe1aa80859932f39 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Thu, 14 Feb 2013 22:05:37 +0100 Subject: F4 USB: Don't enable IN endpoints when configuring. --- usb/dwc_otg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usb/dwc_otg.h b/usb/dwc_otg.h index 636173b..dccd8e9 100644 --- a/usb/dwc_otg.h +++ b/usb/dwc_otg.h @@ -85,7 +85,7 @@ class USB_otg : public USB_generic { ep &= 0x7f; uint32_t epctl = ((type == EPType::Control ? 0 : type == EPType::Isochronous ? 1 : type == EPType::Bulk ? 2 : 3) << 18); - epctl |= (1 << 31) | (1 << 28) | (1 << 15) | (ep == 0 ? 64 : size); // EPENA, USBAEP, SD0PID + epctl |= (1 << 28) | (1 << 15) | (ep == 0 ? 64 : size); // USBAEP, SD0PID if(ep == 0) { otg.reg.GRXFSIZ = rxfifo_size >> 2; @@ -98,7 +98,7 @@ class USB_otg : public USB_generic { otg.dev_oep_reg[ep].DOEPTSIZ = (1 << 29) | (1 << 19) | size; otg.dev_iep_reg[ep].DIEPCTL = epctl | (1 << 27); // SNAK - otg.dev_oep_reg[ep].DOEPCTL = epctl | (1 << 26); // CNAK + otg.dev_oep_reg[ep].DOEPCTL = epctl | (1 << 31) | (1 << 26); // EPENA, CNAK return; } @@ -111,7 +111,7 @@ class USB_otg : public USB_generic { otg.dev_iep_reg[ep].DIEPCTL = epctl | (1 << 27) | (ep << 22); // SNAK } else { otg.dev_oep_reg[ep].DOEPTSIZ = (1 << 19) | size; - otg.dev_oep_reg[ep].DOEPCTL = epctl | (1 << 26); // CNAK + otg.dev_oep_reg[ep].DOEPCTL = epctl | (1 << 31) | (1 << 26); // EPENA, CNAK } } -- cgit v1.2.3