mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-23 19:25:09 +08:00
添加上电重新枚举usb
This commit is contained in:
@@ -96,6 +96,12 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
|
|||||||
HAL_NVIC_EnableIRQ(OTG_FS_IRQn);
|
HAL_NVIC_EnableIRQ(OTG_FS_IRQn);
|
||||||
/* USER CODE BEGIN USB_OTG_FS_MspInit 1 */
|
/* USER CODE BEGIN USB_OTG_FS_MspInit 1 */
|
||||||
|
|
||||||
|
// 上电后重新枚举usb设备
|
||||||
|
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);
|
||||||
|
DWT_Delay(0.1);
|
||||||
|
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_SET);
|
||||||
|
DWT_Delay(0.1);
|
||||||
|
|
||||||
/* USER CODE END USB_OTG_FS_MspInit 1 */
|
/* USER CODE END USB_OTG_FS_MspInit 1 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user