加入USB反初始化函数

This commit is contained in:
不吃油炸鸡
2026-02-08 17:24:14 +08:00
parent 8b56463c02
commit e12c50b648
2 changed files with 8 additions and 0 deletions

View File

@@ -48,6 +48,12 @@ USBD_HandleTypeDef hUsbDeviceFS;
*/
/* USER CODE BEGIN 0 */
void USER_USB_DEVICE_DeInit(void)
{
USBD_Stop(&hUsbDeviceFS);
USBD_DeInit(&hUsbDeviceFS);
}
/* USER CODE END 0 */
/*

View File

@@ -82,6 +82,8 @@ void MX_USB_DEVICE_Init(void);
*/
/* USER CODE BEGIN FD */
void USER_USB_DEVICE_DeInit(void);
/* USER CODE END FD */
/**
* @}