加入USB是否已配置的函数

This commit is contained in:
不吃油炸鸡
2026-03-15 11:19:01 +08:00
parent ce84f5c757
commit 044b4e58a2
2 changed files with 9 additions and 0 deletions

View File

@@ -68,6 +68,11 @@ void USER_USB_DEVICE_DeInit(void)
*/
/* USER CODE BEGIN 1 */
bool USER_USB_is_Configured(void)
{
return (hUsbDeviceFS.dev_state == USBD_STATE_CONFIGURED);
}
/* USER CODE END 1 */
/**

View File

@@ -57,6 +57,10 @@
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP */
#include <stdbool.h>
bool USER_USB_is_Configured(void);
/* USER CODE END PFP */
/*