Merge pull request #234 from hathach/stm32f4-blackpill

move VBUS sense out of dcd_synosys to bsp
This commit is contained in:
Ha Thach
2019-12-12 10:00:17 +07:00
committed by GitHub
10 changed files with 136 additions and 71 deletions

View File

@@ -189,6 +189,9 @@ void board_init(void)
/* Enable USB FS Clocks */
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
// Enable VBUS sense (B device) via pin PA9
USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBDEN;
}
//--------------------------------------------------------------------+