#define INCLUDE_FROM_USBTASK_C\r
#include "USBTask.h"\r
\r
-volatile bool USB_IsSuspended;\r
-volatile bool USB_IsConnected;\r
volatile bool USB_IsInitialized;\r
USB_Request_Header_t USB_ControlRequest;\r
\r
volatile uint8_t USB_HostState;\r
#endif\r
\r
+#if defined(USB_CAN_BE_DEVICE)\r
+volatile uint8_t USB_DeviceState;\r
+#endif\r
+\r
void USB_USBTask(void)\r
{\r
#if defined(USB_HOST_ONLY)\r
#if defined(USB_CAN_BE_DEVICE)\r
static void USB_DeviceTask(void)\r
{\r
- if (USB_IsConnected)\r
+ if (USB_DeviceState != DEVICE_STATE_Unattached)\r
{\r
uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();\r
\r