diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-04-09 00:00:59 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-04-09 00:00:59 +0000 |
commit | d3484e6bdd0f92203829770518443045a78ce74b (patch) | |
tree | dcfa512f2e76a9f3eacdd5d34b2ce29ccf2433fb | |
parent | 51910b450533fb7c335ee3d970d758fc25b05547 (diff) | |
download | lufa-d3484e6bdd0f92203829770518443045a78ce74b.tar.gz lufa-d3484e6bdd0f92203829770518443045a78ce74b.tar.bz2 lufa-d3484e6bdd0f92203829770518443045a78ce74b.zip |
Fixed GenericHID demo not starting USB and HID management tasks when not using interrupt driven modes (thanks to Carl Kjeldsen).
-rw-r--r-- | Demos/Device/GenericHID/GenericHID.c | 14 | ||||
-rw-r--r-- | Demos/Device/Mouse/Mouse.c | 2 | ||||
-rw-r--r-- | LUFA/ChangeLog.txt | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/Demos/Device/GenericHID/GenericHID.c b/Demos/Device/GenericHID/GenericHID.c index 2d9869982..3b5f97267 100644 --- a/Demos/Device/GenericHID/GenericHID.c +++ b/Demos/Device/GenericHID/GenericHID.c @@ -103,6 +103,11 @@ EVENT_HANDLER(USB_Reset) */
EVENT_HANDLER(USB_Connect)
{
+ #if !defined(INTERRUPT_CONTROL_ENDPOINT)
+ /* Start USB management task */
+ Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);
+ #endif
+
/* Indicate USB enumerating */
UpdateStatus(Status_USBEnumerating);
}
@@ -112,6 +117,15 @@ EVENT_HANDLER(USB_Connect) */
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 */
UpdateStatus(Status_USBNotReady);
}
diff --git a/Demos/Device/Mouse/Mouse.c b/Demos/Device/Mouse/Mouse.c index c429768c9..076ac5bbd 100644 --- a/Demos/Device/Mouse/Mouse.c +++ b/Demos/Device/Mouse/Mouse.c @@ -145,7 +145,7 @@ EVENT_HANDLER(USB_Reset) */
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)
Scheduler_SetTaskMode(USB_Mouse_Report, TASK_STOP);
#endif
diff --git a/LUFA/ChangeLog.txt b/LUFA/ChangeLog.txt index 04b0e9757..64182b02d 100644 --- a/LUFA/ChangeLog.txt +++ b/LUFA/ChangeLog.txt @@ -26,6 +26,7 @@ * 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
* 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
*
|