From 044b4e58a2e8a1488792f0984bfd287bb57bb482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=90=83=E6=B2=B9=E7=82=B8=E9=B8=A1?= <1425962791@qq.com> Date: Sun, 15 Mar 2026 11:19:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5USB=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=B7=B2=E9=85=8D=E7=BD=AE=E7=9A=84=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- software/Power_Pico/USB_DEVICE/App/usb_device.c | 5 +++++ software/Power_Pico/USB_DEVICE/App/usb_device.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/software/Power_Pico/USB_DEVICE/App/usb_device.c b/software/Power_Pico/USB_DEVICE/App/usb_device.c index 95aea19..bd7b788 100644 --- a/software/Power_Pico/USB_DEVICE/App/usb_device.c +++ b/software/Power_Pico/USB_DEVICE/App/usb_device.c @@ -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 */ /** diff --git a/software/Power_Pico/USB_DEVICE/App/usb_device.h b/software/Power_Pico/USB_DEVICE/App/usb_device.h index 503bd49..88337d5 100644 --- a/software/Power_Pico/USB_DEVICE/App/usb_device.h +++ b/software/Power_Pico/USB_DEVICE/App/usb_device.h @@ -57,6 +57,10 @@ /* Private function prototypes -----------------------------------------------*/ /* USER CODE BEGIN PFP */ +#include + +bool USER_USB_is_Configured(void); + /* USER CODE END PFP */ /*