diff options
Diffstat (limited to 'Demos/Device/Keyboard')
-rw-r--r-- | Demos/Device/Keyboard/Keyboard.c | 52 | ||||
-rw-r--r-- | Demos/Device/Keyboard/Keyboard.h | 3 | ||||
-rw-r--r-- | Demos/Device/Keyboard/Keyboard.txt | 13 |
3 files changed, 4 insertions, 64 deletions
diff --git a/Demos/Device/Keyboard/Keyboard.c b/Demos/Device/Keyboard/Keyboard.c index 928d95b62..fe041ef08 100644 --- a/Demos/Device/Keyboard/Keyboard.c +++ b/Demos/Device/Keyboard/Keyboard.c @@ -40,10 +40,7 @@ /* Scheduler Task List */
TASK_LIST
{
- #if !defined(INTERRUPT_CONTROL_ENDPOINT)
- { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- #endif
-
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
{ .Task = USB_Keyboard_Report , .TaskStatus = TASK_STOP },
};
@@ -105,10 +102,8 @@ int main(void) */
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);
@@ -117,21 +112,6 @@ EVENT_HANDLER(USB_Connect) UsingReportProtocol = true;
}
-/** Event handler for the USB_Reset event. This fires when the USB interface is reset by the USB host, before the
- * enumeration process begins, and enables the control endpoint interrupt so that control requests can be handled
- * asynchronously when they arrive rather than when the control endpoint is polled manually.
- */
-EVENT_HANDLER(USB_Reset)
-{
- #if defined(INTERRUPT_CONTROL_ENDPOINT)
- /* Select the control endpoint */
- Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
-
- /* Enable the endpoint SETUP interrupt ISR for the control endpoint */
- USB_INT_Enable(ENDPOINT_INT_SETUP);
- #endif
-}
-
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs.
*/
@@ -139,10 +119,7 @@ EVENT_HANDLER(USB_Disconnect) {
/* Stop running keyboard reporting and USB management tasks */
Scheduler_SetTaskMode(USB_Keyboard_Report, TASK_STOP);
-
- #if !defined(INTERRUPT_CONTROL_ENDPOINT)
Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
- #endif
/* Indicate USB not ready */
UpdateStatus(Status_USBNotReady);
@@ -445,30 +422,3 @@ TASK(USB_Keyboard_Report) ReceiveNextReport();
}
}
-
-#if defined(INTERRUPT_CONTROL_ENDPOINT)
-/** ISR for the general Pipe/Endpoint interrupt vector. This ISR fires when an endpoint's status changes (such as
- * a packet has been received) on an endpoint with its corresponding ISR enabling bits set. This is used to send
- * HID packets to the host each time the HID interrupt endpoints polling period elapses, as managed by the USB
- * controller. It is also used to respond to standard and class specific requests send to the device on the control
- * endpoint, by handing them off to the LUFA library when they are received.
- */
-ISR(ENDPOINT_PIPE_vect, ISR_BLOCK)
-{
- /* Save previously selected endpoint before selecting a new endpoint */
- uint8_t PrevSelectedEndpoint = Endpoint_GetCurrentEndpoint();
-
- /* Check if the control endpoint has received a request */
- if (Endpoint_HasEndpointInterrupted(ENDPOINT_CONTROLEP))
- {
- /* Process the control request */
- USB_USBTask();
-
- /* Handshake the endpoint setup interrupt - must be after the call to USB_USBTask() */
- USB_INT_Clear(ENDPOINT_INT_SETUP);
- }
-
- /* Restore previously selected endpoint */
- Endpoint_SelectEndpoint(PrevSelectedEndpoint);
-}
-#endif
diff --git a/Demos/Device/Keyboard/Keyboard.h b/Demos/Device/Keyboard/Keyboard.h index c73701905..2cc9c5ca8 100644 --- a/Demos/Device/Keyboard/Keyboard.h +++ b/Demos/Device/Keyboard/Keyboard.h @@ -105,9 +105,6 @@ /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */
HANDLES_EVENT(USB_Disconnect);
- /** Indicates that this module will catch the USB_Reset event when thrown by the library. */
- HANDLES_EVENT(USB_Reset);
-
/** Indicates that this module will catch the USB_ConfigurationChanged event when thrown by the library. */
HANDLES_EVENT(USB_ConfigurationChanged);
diff --git a/Demos/Device/Keyboard/Keyboard.txt b/Demos/Device/Keyboard/Keyboard.txt index 39df2a171..3fc9bee3a 100644 --- a/Demos/Device/Keyboard/Keyboard.txt +++ b/Demos/Device/Keyboard/Keyboard.txt @@ -52,16 +52,9 @@ *
* <table>
* <tr>
- * <td><b>Define Name:</b></td>
- * <td><b>Location:</b></td>
- * <td><b>Description:</b></td>
- * </tr>
- * <tr>
- * <td>INTERRUPT_CONTROL_ENDPOINT</td>
- * <td>Makefile CDEFS</td>
- * <td>When defined, this causes the demo to enable interrupts for the control endpoint,
- * which services control requests from the host. If not defined, the control endpoint
- * is serviced via polling using the task scheduler.</td>
+ * <td>
+ * None
+ * </td>
* </tr>
* </table>
*/
|