summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-07-19 10:59:35 +0700
committerhathach <[email protected]>2019-07-19 10:59:35 +0700
commited6fa460e9a885bb84a6f1588763ea5fb3f4df49 (patch)
treed1af499019a05c7a59e60de2d1d5de28c4c6cdd5 /src
parentc784062aef7601969c87058ffb3368b25651a447 (diff)
stm32 minor change
Diffstat (limited to 'src')
-rw-r--r--src/portable/st/stm32f4/dcd_stm32f4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/portable/st/stm32f4/dcd_stm32f4.c b/src/portable/st/stm32f4/dcd_stm32f4.c
index 3cb502be9..b5d0452b5 100644
--- a/src/portable/st/stm32f4/dcd_stm32f4.c
+++ b/src/portable/st/stm32f4/dcd_stm32f4.c
@@ -160,7 +160,11 @@ void dcd_init (uint8_t rhport)
USB_OTG_GINTMSK_USBSUSPM */;
// Enable pullup, enable peripheral.
+#ifdef USB_OTG_GCCFG_VBDEN
+ USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBDEN | USB_OTG_GCCFG_PWRDWN;
+#else
USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBUSBSEN | USB_OTG_GCCFG_PWRDWN;
+#endif
}
void dcd_int_enable (uint8_t rhport)