*/\r
EVENT_HANDLER(USB_Connect)\r
{\r
+ #if !defined(INTERRUPT_CONTROL_ENDPOINT)\r
+ /* Start USB management task */\r
+ Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);\r
+ #endif\r
+\r
/* Indicate USB enumerating */\r
UpdateStatus(Status_USBEnumerating);\r
}\r
*/\r
EVENT_HANDLER(USB_Disconnect)\r
{\r
+ /* Stop running HID reporting and USB management tasks */\r
+ #if !defined(INTERRUPT_DATA_ENDPOINT)\r
+ Scheduler_SetTaskMode(USB_HID_Report, TASK_STOP);\r
+ #endif\r
+\r
+ #if !defined(INTERRUPT_CONTROL_ENDPOINT)\r
+ Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);\r
+ #endif\r
+\r
/* Indicate USB not ready */\r
UpdateStatus(Status_USBNotReady);\r
}\r