更新USB反初始化相关内容

This commit is contained in:
不吃油炸鸡
2026-02-08 19:30:56 +08:00
parent 23b7f7d283
commit 45aaffdc08
7 changed files with 24885 additions and 24797 deletions

View File

@@ -52,6 +52,13 @@ void USER_USB_DEVICE_DeInit(void)
{
USBD_Stop(&hUsbDeviceFS);
USBD_DeInit(&hUsbDeviceFS);
__HAL_RCC_USB_OTG_FS_FORCE_RESET();
HAL_Delay(10);
__HAL_RCC_USB_OTG_FS_RELEASE_RESET();
__HAL_RCC_USB_OTG_FS_CLK_DISABLE();
HAL_PCD_MspDeInit(hUsbDeviceFS.pData);
// 手动配置USB引脚为GPIO输出强制拉低DP线以模拟拔出
USER_USBD_LL_Simulate_Disconnect();
}
/* USER CODE END 0 */