uint8_t JoyStatus_LCL = Joystick_GetStatus();\r
static bool ActionSent = false;\r
\r
+ /* Device must be connected and configured for the task to run */\r
+ if (!(USB_IsConnected) || !(USB_ConfigurationNumber))\r
+ return;\r
+\r
char* JoystickStrings[] =\r
{\r
"Joystick Up\r\n",\r
*/\r
void CDC2_Task(void)\r
{\r
+ /* Device must be connected and configured for the task to run */\r
+ if (!(USB_IsConnected) || !(USB_ConfigurationNumber))\r
+ return;\r
+\r
/* Select the Serial Rx Endpoint */\r
Endpoint_SelectEndpoint(CDC2_RX_EPNUM);\r
\r