diff options
Diffstat (limited to 'Demos/Device/GenericHID')
-rw-r--r-- | Demos/Device/GenericHID/GenericHID.c | 52 | ||||
-rw-r--r-- | Demos/Device/GenericHID/GenericHID.h | 3 | ||||
-rw-r--r-- | Demos/Device/GenericHID/GenericHID.txt | 7 |
3 files changed, 0 insertions, 62 deletions
diff --git a/Demos/Device/GenericHID/GenericHID.c b/Demos/Device/GenericHID/GenericHID.c index d4e7cca73..0369f9f52 100644 --- a/Demos/Device/GenericHID/GenericHID.c +++ b/Demos/Device/GenericHID/GenericHID.c @@ -39,10 +39,7 @@ /* Scheduler Task List */
TASK_LIST
{
- #if !defined(INTERRUPT_CONTROL_ENDPOINT)
{ .Task = USB_USBTask , .TaskStatus = TASK_STOP },
- #endif
-
{ .Task = USB_HID_Report , .TaskStatus = TASK_STOP },
};
@@ -75,30 +72,13 @@ int main(void) Scheduler_Start();
}
-/** 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_Connect event. This indicates that the device is enumerating via the status LEDs and
* starts the library USB task to begin the enumeration and USB management process.
*/
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);
@@ -111,10 +91,7 @@ EVENT_HANDLER(USB_Disconnect) {
/* Stop running HID reporting and USB management tasks */
Scheduler_SetTaskMode(USB_HID_Report, TASK_STOP);
-
- #if !defined(INTERRUPT_CONTROL_ENDPOINT)
Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
- #endif
/* Indicate USB not ready */
UpdateStatus(Status_USBNotReady);
@@ -298,32 +275,3 @@ TASK(USB_HID_Report) }
}
}
-
-#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.
- */
-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))
- {
- /* Clear the endpoint interrupt */
- Endpoint_ClearEndpointInterrupt(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/GenericHID/GenericHID.h b/Demos/Device/GenericHID/GenericHID.h index 817d37748..5841595e3 100644 --- a/Demos/Device/GenericHID/GenericHID.h +++ b/Demos/Device/GenericHID/GenericHID.h @@ -68,9 +68,6 @@ };
/* Event Handlers: */
- /** 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_Connect event when thrown by the library. */
HANDLES_EVENT(USB_Connect);
diff --git a/Demos/Device/GenericHID/GenericHID.txt b/Demos/Device/GenericHID/GenericHID.txt index c78f63753..a40b78b1f 100644 --- a/Demos/Device/GenericHID/GenericHID.txt +++ b/Demos/Device/GenericHID/GenericHID.txt @@ -60,12 +60,5 @@ * <td>This token defines the size of the device reports, both sent and received. The value must be an
* integer ranging from 1 to 255.</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>
- * </tr>
* </table>
*/
|