diff options
| author | hathach <[email protected]> | 2019-07-22 19:23:48 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-07-22 19:23:48 +0700 |
| commit | 8fad8fb5c2d4b586431c1893f912ad2ebedc9b33 (patch) | |
| tree | 57950c378a0984a7f4e9f47671eb702e375779ca /src | |
| parent | 33de35504abf27801286b1f3760862d3909e2ae6 (diff) | |
| parent | b041b23ba3b6d3e8127ab19899219eeaf4b15fbb (diff) | |
Merge branch 'master' into develop
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/st/stm32f4/dcd_stm32f4.c | 4 |
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) |
