diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-03-19 14:16:12 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-03-19 14:16:12 +0000 |
commit | 88051e78a281f5776538558aec113ff2b66e056c (patch) | |
tree | cfdd65c067c9c660b7e3d3f6edcefe25596f5f6f /Demos/Keyboard/Keyboard.c | |
parent | 48400df13c7f9f4f0fd8e7f841d49f9502557cb1 (diff) | |
download | lufa-88051e78a281f5776538558aec113ff2b66e056c.tar.gz lufa-88051e78a281f5776538558aec113ff2b66e056c.tar.bz2 lufa-88051e78a281f5776538558aec113ff2b66e056c.zip |
Combined Mouse, MouseViaInt and MouseFullInt demos into a single unified demo.
Corrections to Keyboard demo.
Removed AVRISP_Programmer project due to code quality concerns.
Diffstat (limited to 'Demos/Keyboard/Keyboard.c')
-rw-r--r-- | Demos/Keyboard/Keyboard.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Demos/Keyboard/Keyboard.c b/Demos/Keyboard/Keyboard.c index 3884eeb16..f506070c0 100644 --- a/Demos/Keyboard/Keyboard.c +++ b/Demos/Keyboard/Keyboard.c @@ -140,6 +140,15 @@ EVENT_HANDLER(USB_Reset) */
EVENT_HANDLER(USB_Disconnect)
{
+ /* Stop running keyboard reporting and USB management tasks */
+ #if !defined(INTERRUPT_DATA_ENDPOINT)
+ Scheduler_SetTaskMode(USB_Keyboard_Report, TASK_STOP);
+ #endif
+
+ #if !defined(INTERRUPT_CONTROL_ENDPOINT)
+ Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
+ #endif
+
/* Indicate USB not ready */
UpdateStatus(Status_USBNotReady);
}
@@ -171,6 +180,11 @@ EVENT_HANDLER(USB_ConfigurationChanged) /* Indicate USB connected and ready */
UpdateStatus(Status_USBReady);
+
+ #if !defined(INTERRUPT_DATA_ENDPOINT)
+ /* Start running keyboard reporting task */
+ Scheduler_SetTaskMode(USB_Keyboard_Report, TASK_RUN);
+ #endif
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
|