Skip to content
Snippets Groups Projects
Commit d3484e6b authored by Dean Camera's avatar Dean Camera
Browse files

Fixed GenericHID demo not starting USB and HID management tasks when not using...

Fixed GenericHID demo not starting USB and HID management tasks when not using interrupt driven modes (thanks to Carl Kjeldsen).
parent 51910b45
No related branches found
No related tags found
No related merge requests found
...@@ -103,6 +103,11 @@ EVENT_HANDLER(USB_Reset) ...@@ -103,6 +103,11 @@ EVENT_HANDLER(USB_Reset)
*/ */
EVENT_HANDLER(USB_Connect) EVENT_HANDLER(USB_Connect)
{ {
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
/* Start USB management task */
Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
#endif
/* Indicate USB enumerating */ /* Indicate USB enumerating */
UpdateStatus(Status_USBEnumerating); UpdateStatus(Status_USBEnumerating);
} }
...@@ -112,6 +117,15 @@ EVENT_HANDLER(USB_Connect) ...@@ -112,6 +117,15 @@ EVENT_HANDLER(USB_Connect)
*/ */
EVENT_HANDLER(USB_Disconnect) EVENT_HANDLER(USB_Disconnect)
{ {
/* Stop running HID reporting and USB management tasks */
#if !defined(INTERRUPT_DATA_ENDPOINT)
Scheduler_SetTaskMode(USB_HID_Report, TASK_STOP);
#endif
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
#endif
/* Indicate USB not ready */ /* Indicate USB not ready */
UpdateStatus(Status_USBNotReady); UpdateStatus(Status_USBNotReady);
} }
......
...@@ -145,7 +145,7 @@ EVENT_HANDLER(USB_Reset) ...@@ -145,7 +145,7 @@ EVENT_HANDLER(USB_Reset)
*/ */
EVENT_HANDLER(USB_Disconnect) EVENT_HANDLER(USB_Disconnect)
{ {
/* Stop running keyboard reporting and USB management tasks */ /* Stop running mouse reporting and USB management tasks */
#if !defined(INTERRUPT_DATA_ENDPOINT) #if !defined(INTERRUPT_DATA_ENDPOINT)
Scheduler_SetTaskMode(USB_Mouse_Report, TASK_STOP); Scheduler_SetTaskMode(USB_Mouse_Report, TASK_STOP);
#endif #endif
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* outdated avr-libc versions. * outdated avr-libc versions.
* - Added support to the CDCHost demo for devices with mutiple CDC interfaces which are not the correct ACM type preceeding the desired * - Added support to the CDCHost demo for devices with mutiple CDC interfaces which are not the correct ACM type preceeding the desired
* ACM CDC interface * ACM CDC interface
* - Fixed GenericHID demo not starting USB and HID management tasks when not using interrupt driven modes (thanks to Carl Kjeldsen)
* *
* \section Sec_ChangeLog090401 Version 090401 * \section Sec_ChangeLog090401 Version 090401
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment