summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam D. Jones <[email protected]>2019-02-04 20:30:47 -0500
committerWilliam D. Jones <[email protected]>2019-02-04 20:30:47 -0500
commit747815f03b256136daf6f531246927233c208980 (patch)
tree1293843905c67ef941deb7b7c5be7a58eca86124 /src
parentf5d9e7e560313539547165c5f939b28da4fd5499 (diff)
stm32f4: Ensure endpoints enabled properly, using correct FIFOs.
Diffstat (limited to 'src')
-rw-r--r--src/portable/stm/stm32f4/dcd_stm32f4.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/portable/stm/stm32f4/dcd_stm32f4.c b/src/portable/stm/stm32f4/dcd_stm32f4.c
index f92e75814..139a97c42 100644
--- a/src/portable/stm/stm32f4/dcd_stm32f4.c
+++ b/src/portable/stm/stm32f4/dcd_stm32f4.c
@@ -224,13 +224,15 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
if(dir == TUSB_DIR_OUT) {
out_ep[epnum].DOEPCTL |= USB_OTG_DOEPCTL_EPENA | \
+ (1 << USB_OTG_DOEPCTL_USBAEP_Pos) | \
(bulk_or_int ? USB_OTG_DOEPCTL_SD0PID_SEVNFRM : 0uL) | \
desc_edpt->bmAttributes.xfer << USB_OTG_DOEPCTL_EPTYP_Pos | \
desc_edpt->wMaxPacketSize.size << USB_OTG_DOEPCTL_MPSIZ_Pos;
} else {
in_ep[epnum].DIEPCTL |= USB_OTG_DIEPCTL_EPENA | \
+ (1 << USB_OTG_DIEPCTL_USBAEP_Pos) | \
(bulk_or_int ? USB_OTG_DIEPCTL_SD0PID_SEVNFRM : 0uL) | \
- epnum << USB_OTG_DIEPCTL_TXFNUM_Pos | \
+ (epnum - 1) << USB_OTG_DIEPCTL_TXFNUM_Pos | \
desc_edpt->bmAttributes.xfer << USB_OTG_DIEPCTL_EPTYP_Pos | \
desc_edpt->wMaxPacketSize.size << USB_OTG_DIEPCTL_MPSIZ_Pos;