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 */ /*