summaryrefslogtreecommitdiff
path: root/src/portable
diff options
context:
space:
mode:
authorWilliam D. Jones <[email protected]>2019-01-13 17:34:09 -0500
committerWilliam D. Jones <[email protected]>2019-01-13 18:36:18 -0500
commit657d3e2983558831cd5525b2c5aa3bef27f9468b (patch)
tree7cb083a83482747dd2b9e5e4ed22bd73626fb6b0 /src/portable
parent03cbd406cb16ff2da5b11775e0d34d7d53f5ea45 (diff)
stm32f4: Enable USB peripheral, fix typos in register writes.
Diffstat (limited to 'src/portable')
-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 b87ff6597..e6849085f 100644
--- a/src/portable/stm/stm32f4/dcd_stm32f4.c
+++ b/src/portable/stm/stm32f4/dcd_stm32f4.c
@@ -78,7 +78,9 @@ bool dcd_init (uint8_t rhport)
USB_OTG_FS->GINTMSK |= USB_OTG_GINTMSK_USBRST | USB_OTG_GINTMSK_ENUMDNEM | \
USB_OTG_GINTMSK_ESUSPM | USB_OTG_GINTMSK_USBSUSPM | \
USB_OTG_GINTMSK_SOFM;
- USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBUSBSEN; // Enable pullup.
+
+ // Enable pullup, enable peripheral.
+ USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBUSBSEN | USB_OTG_GCCFG_PWRDWN;
return true;
}