Renamed the EVENT_USB_Device_UnhandledControlRequest() event to EVENT_USB_Device_Cont...
authorDean Camera <dean@fourwalledcubicle.com>
Fri, 5 Nov 2010 05:15:20 +0000 (05:15 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Fri, 5 Nov 2010 05:15:20 +0000 (05:15 +0000)
88 files changed:
Bootloaders/CDC/BootloaderCDC.c
Bootloaders/DFU/BootloaderDFU.c
Bootloaders/DFU/BootloaderDFU.h
Demos/Device/ClassDriver/AudioInput/AudioInput.c
Demos/Device/ClassDriver/AudioInput/AudioInput.h
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h
Demos/Device/ClassDriver/GenericHID/GenericHID.c
Demos/Device/ClassDriver/GenericHID/GenericHID.h
Demos/Device/ClassDriver/Joystick/Joystick.c
Demos/Device/ClassDriver/Joystick/Joystick.h
Demos/Device/ClassDriver/Keyboard/Keyboard.c
Demos/Device/ClassDriver/Keyboard/Keyboard.h
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h
Demos/Device/ClassDriver/MIDI/MIDI.c
Demos/Device/ClassDriver/MIDI/MIDI.h
Demos/Device/ClassDriver/MassStorage/MassStorage.c
Demos/Device/ClassDriver/MassStorage/MassStorage.h
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
Demos/Device/ClassDriver/Mouse/Mouse.c
Demos/Device/ClassDriver/Mouse/Mouse.h
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h
Demos/Device/Incomplete/Sideshow/Sideshow.c
Demos/Device/Incomplete/Sideshow/Sideshow.h
Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h
Demos/Device/LowLevel/AudioInput/AudioInput.c
Demos/Device/LowLevel/AudioInput/AudioInput.h
Demos/Device/LowLevel/AudioOutput/AudioOutput.c
Demos/Device/LowLevel/AudioOutput/AudioOutput.h
Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c
Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h
Demos/Device/LowLevel/GenericHID/GenericHID.c
Demos/Device/LowLevel/GenericHID/GenericHID.h
Demos/Device/LowLevel/Joystick/Joystick.c
Demos/Device/LowLevel/Joystick/Joystick.h
Demos/Device/LowLevel/Keyboard/Keyboard.c
Demos/Device/LowLevel/Keyboard/Keyboard.h
Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h
Demos/Device/LowLevel/MassStorage/MassStorage.c
Demos/Device/LowLevel/MassStorage/MassStorage.h
Demos/Device/LowLevel/Mouse/Mouse.c
Demos/Device/LowLevel/Mouse/Mouse.h
Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h
Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c
Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h
Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.h
LUFA/Drivers/USB/Class/Device/Audio.h
LUFA/Drivers/USB/Class/Device/CDC.h
LUFA/Drivers/USB/Class/Device/HID.h
LUFA/Drivers/USB/Class/Device/MIDI.h
LUFA/Drivers/USB/Class/Device/MassStorage.h
LUFA/Drivers/USB/Class/Device/RNDIS.h
LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
LUFA/Drivers/USB/HighLevel/Events.h
LUFA/Drivers/USB/HighLevel/StdRequestType.h
LUFA/Drivers/USB/USB.h
LUFA/ManPages/ChangeLog.txt
LUFA/ManPages/MigrationInformation.txt
Projects/Benito/Benito.h
Projects/Incomplete/StandaloneProgrammer/DiskDevice.c
Projects/Incomplete/StandaloneProgrammer/DiskDevice.h
Projects/LEDNotifier/LEDNotifier.c
Projects/LEDNotifier/LEDNotifier.h
Projects/Magstripe/Magstripe.c
Projects/Magstripe/Magstripe.h
Projects/RelayBoard/RelayBoard.c
Projects/RelayBoard/RelayBoard.h
Projects/TempDataLogger/TempDataLogger.c
Projects/TempDataLogger/TempDataLogger.h
Projects/USBtoSerial/USBtoSerial.c
Projects/USBtoSerial/USBtoSerial.h
Projects/Webserver/USBDeviceMode.c
Projects/Webserver/USBDeviceMode.h
Projects/XPLAINBridge/XPLAINBridge.c
Projects/XPLAINBridge/XPLAINBridge.h

index 74dd5d2..cb99a05 100644 (file)
@@ -121,11 +121,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
                                   ENDPOINT_BANK_SINGLE);
 }
 
                                   ENDPOINT_BANK_SINGLE);
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the CDC control commands,
- *  which are all issued via the control endpoint), so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Process CDC specific control requests */
        switch (USB_ControlRequest.bRequest)
 {
        /* Process CDC specific control requests */
        switch (USB_ControlRequest.bRequest)
index 7d7f427..ce4e459 100644 (file)
@@ -145,11 +145,11 @@ void ResetHardware(void)
        MCUCR = 0;
 }
 
        MCUCR = 0;
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the DFU commands, which are
- *  all issued via the control endpoint), so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Get the size of the command and data from the wLength value */
        SentCommand.DataSize = USB_ControlRequest.wLength;
 {
        /* Get the size of the command and data from the wLength value */
        SentCommand.DataSize = USB_ControlRequest.wLength;
index f7fda1b..4a62023 100644 (file)
                void SetupHardware(void);
                void ResetHardware(void);
 
                void SetupHardware(void);
                void ResetHardware(void);
 
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
                #if defined(INCLUDE_FROM_BOOTLOADER_C)
                        static void DiscardFillerBytes(uint8_t NumberOfBytes);
 
                #if defined(INCLUDE_FROM_BOOTLOADER_C)
                        static void DiscardFillerBytes(uint8_t NumberOfBytes);
index b343e7e..cea89c5 100644 (file)
@@ -156,8 +156,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        Audio_Device_ProcessControlRequest(&Microphone_Audio_Interface);
 }
 {
        Audio_Device_ProcessControlRequest(&Microphone_Audio_Interface);
 }
index 0ed8830..4ba683b 100644 (file)
@@ -81,7 +81,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index 8cd00ce..bf0e22a 100644 (file)
@@ -192,8 +192,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        Audio_Device_ProcessControlRequest(&Speaker_Audio_Interface);
 }
 {
        Audio_Device_ProcessControlRequest(&Speaker_Audio_Interface);
 }
index 7209928..169a509 100644 (file)
@@ -68,7 +68,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index 7023902..af2a4b8 100644 (file)
@@ -183,8 +183,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        CDC_Device_ProcessControlRequest(&VirtualSerial1_CDC_Interface);
        CDC_Device_ProcessControlRequest(&VirtualSerial2_CDC_Interface);
 {
        CDC_Device_ProcessControlRequest(&VirtualSerial1_CDC_Interface);
        CDC_Device_ProcessControlRequest(&VirtualSerial2_CDC_Interface);
index 62eaa07..d64292c 100644 (file)
@@ -70,7 +70,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index 1c08764..7e485f3 100644 (file)
@@ -122,8 +122,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        HID_Device_ProcessControlRequest(&Generic_HID_Interface);
 }
 {
        HID_Device_ProcessControlRequest(&Generic_HID_Interface);
 }
index 5447bae..554517f 100644 (file)
@@ -68,7 +68,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
index eb4e2e2..083f8f7 100644 (file)
@@ -116,8 +116,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        HID_Device_ProcessControlRequest(&Joystick_HID_Interface);
 }
 {
        HID_Device_ProcessControlRequest(&Joystick_HID_Interface);
 }
index 0742ca8..0147a0e 100644 (file)
@@ -81,7 +81,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
index 34dee99..832d16f 100644 (file)
@@ -116,8 +116,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
 }
 {
        HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
 }
index 1384f9a..ad957f4 100644 (file)
@@ -71,7 +71,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
index 61f22d2..0ec07ec 100644 (file)
@@ -140,8 +140,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
        HID_Device_ProcessControlRequest(&Mouse_HID_Interface);
 {
        HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
        HID_Device_ProcessControlRequest(&Mouse_HID_Interface);
index 45caa5b..d67bc02 100644 (file)
@@ -66,7 +66,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
index 95a2ddd..508ed96 100644 (file)
@@ -187,8 +187,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        MIDI_Device_ProcessControlRequest(&Keyboard_MIDI_Interface);
 }
 {
        MIDI_Device_ProcessControlRequest(&Keyboard_MIDI_Interface);
 }
index d4ab1ed..5a4f385 100644 (file)
@@ -72,7 +72,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index 457f6d5..75f1031 100644 (file)
@@ -117,8 +117,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        MS_Device_ProcessControlRequest(&Disk_MS_Interface);
 }
 {
        MS_Device_ProcessControlRequest(&Disk_MS_Interface);
 }
index 8c674f6..f7ac363 100644 (file)
@@ -80,7 +80,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
 
 
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
 
index 7c54110..d15737b 100644 (file)
@@ -146,8 +146,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        MS_Device_ProcessControlRequest(&Disk_MS_Interface);
        HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
 {
        MS_Device_ProcessControlRequest(&Disk_MS_Interface);
        HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
index b65c571..e07157a 100644 (file)
@@ -79,7 +79,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
index 463d93c..cf811c7 100644 (file)
@@ -116,8 +116,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        HID_Device_ProcessControlRequest(&Mouse_HID_Interface);
 }
 {
        HID_Device_ProcessControlRequest(&Mouse_HID_Interface);
 }
index 2e15034..8a46598 100644 (file)
@@ -72,7 +72,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
index b4ab12f..4051cda 100644 (file)
@@ -130,8 +130,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        RNDIS_Device_ProcessControlRequest(&Ethernet_RNDIS_Interface);
 }
 {
        RNDIS_Device_ProcessControlRequest(&Ethernet_RNDIS_Interface);
 }
index d441cc4..888e08f 100644 (file)
@@ -77,7 +77,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index f48817f..2c3a047 100644 (file)
@@ -160,8 +160,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
 }
 {
        CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
 }
index 43d3a84..a81987c 100644 (file)
@@ -71,7 +71,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index 9c7c3da..7c0539a 100644 (file)
@@ -174,8 +174,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
        HID_Device_ProcessControlRequest(&Mouse_HID_Interface);
 {
        CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
        HID_Device_ProcessControlRequest(&Mouse_HID_Interface);
index 5c70019..d08f275 100644 (file)
@@ -71,7 +71,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
index 670299b..8115cdb 100644 (file)
@@ -107,7 +107,7 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        switch (USB_ControlRequest.bRequest)
        {
 {
        switch (USB_ControlRequest.bRequest)
        {
index af8abe6..62b8904 100644 (file)
@@ -73,7 +73,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index c491118..027400c 100644 (file)
@@ -132,11 +132,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);\r
 }\r
 \r
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);\r
 }\r
 \r
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific\r
- *  control requests that are not handled internally by the USB library (including the CDC control commands,\r
- *  which are all issued via the control endpoint), so that they can be handled appropriately for the application.\r
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to\r
+ *  the device from the USB host before passing along unhandled control requests to the library for processing\r
+ *  internally.\r
  */\r
  */\r
-void EVENT_USB_Device_UnhandledControlRequest(void)\r
+void EVENT_USB_Device_ControlRequest(void)\r
 {\r
        uint8_t TMCRequestStatus = TMC_STATUS_SUCCESS;\r
 \r
 {\r
        uint8_t TMCRequestStatus = TMC_STATUS_SUCCESS;\r
 \r
index b87618f..3862805 100644 (file)
                void EVENT_USB_Device_Connect(void);\r
                void EVENT_USB_Device_Disconnect(void);\r
                void EVENT_USB_Device_ConfigurationChanged(void);\r
                void EVENT_USB_Device_Connect(void);\r
                void EVENT_USB_Device_Disconnect(void);\r
                void EVENT_USB_Device_ConfigurationChanged(void);\r
-               void EVENT_USB_Device_UnhandledControlRequest(void);\r
+               void EVENT_USB_Device_ControlRequest(void);\r
 \r
                uint8_t StreamCallback_AbortINOnRequest(void);\r
                uint8_t StreamCallback_AbortOUTOnRequest(void);\r
 \r
                uint8_t StreamCallback_AbortINOnRequest(void);\r
                uint8_t StreamCallback_AbortOUTOnRequest(void);\r
index fd1fa41..dc75cd7 100644 (file)
@@ -121,11 +121,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the Audio class-specific
- *  requests) so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Process General and Audio specific control requests */
        switch (USB_ControlRequest.bRequest)
 {
        /* Process General and Audio specific control requests */
        switch (USB_ControlRequest.bRequest)
index 7311685..8a938bb 100644 (file)
@@ -81,7 +81,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index fe4af7b..6e7d818 100644 (file)
@@ -147,11 +147,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the Audio class-specific
- *  requests) so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Process General and Audio specific control requests */
        switch (USB_ControlRequest.bRequest)
 {
        /* Process General and Audio specific control requests */
        switch (USB_ControlRequest.bRequest)
index 448ca34..042a8b3 100644 (file)
@@ -67,7 +67,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index d9216ea..cc0f23a 100644 (file)
@@ -146,11 +146,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the CDC control commands,
- *  which are all issued via the control endpoint), so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Determine which interface's Line Coding data is being set from the wIndex parameter */
        void* LineEncodingData = (USB_ControlRequest.wIndex == 0) ? &LineEncoding1 : &LineEncoding2;
 {
        /* Determine which interface's Line Coding data is being set from the wIndex parameter */
        void* LineEncodingData = (USB_ControlRequest.wIndex == 0) ? &LineEncoding1 : &LineEncoding2;
index e99d425..fdacd49 100644 (file)
@@ -71,7 +71,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index 2da75b6..ff3249d 100644 (file)
@@ -107,11 +107,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the HID commands, which are
- *  all issued via the control endpoint), so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Handle HID Class specific requests */
        switch (USB_ControlRequest.bRequest)
 {
        /* Handle HID Class specific requests */
        switch (USB_ControlRequest.bRequest)
index 27e55d1..3643747 100644 (file)
@@ -70,7 +70,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                void ProcessGenericHIDReport(uint8_t* DataArray);
                void EVENT_USB_Device_StartOfFrame(void);
 
                void ProcessGenericHIDReport(uint8_t* DataArray);
index b78e53f..de2e283 100644 (file)
@@ -103,11 +103,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the HID commands, which are
- *  all issued via the control endpoint), so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Handle HID Class specific requests */
        switch (USB_ControlRequest.bRequest)
 {
        /* Handle HID Class specific requests */
        switch (USB_ControlRequest.bRequest)
index 87b3508..d2cae1b 100644 (file)
@@ -82,7 +82,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
                bool GetNextReport(USB_JoystickReport_Data_t* const ReportData);
 
 
                bool GetNextReport(USB_JoystickReport_Data_t* const ReportData);
 
index a8149a9..4e83b51 100644 (file)
@@ -129,11 +129,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the HID commands, which are
- *  all issued via the control endpoint), so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Handle HID Class specific requests */
        switch (USB_ControlRequest.bRequest)
 {
        /* Handle HID Class specific requests */
        switch (USB_ControlRequest.bRequest)
index 459fd8c..f7d3bdb 100644 (file)
@@ -73,7 +73,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                void CreateKeyboardReport(USB_KeyboardReport_Data_t* const ReportData);
                void EVENT_USB_Device_StartOfFrame(void);
 
                void CreateKeyboardReport(USB_KeyboardReport_Data_t* const ReportData);
index c54bb15..2986f6f 100644 (file)
@@ -117,11 +117,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the HID commands, which are
- *  all issued via the control endpoint), so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        uint8_t* ReportData;
        uint8_t  ReportSize;
 {
        uint8_t* ReportData;
        uint8_t  ReportSize;
index 8978c8f..e7086d8 100644 (file)
@@ -70,7 +70,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
 #endif
                void EVENT_USB_Device_StartOfFrame(void);
 
 #endif
index 33eac7a..16344c7 100644 (file)
@@ -120,11 +120,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the Mass Storage class-specific
- *  requests) so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Process UFI specific control requests */
        switch (USB_ControlRequest.bRequest)
 {
        /* Process UFI specific control requests */
        switch (USB_ControlRequest.bRequest)
index 1aba34f..0baa369 100644 (file)
@@ -80,7 +80,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
                #if defined(INCLUDE_FROM_MASSSTORAGE_C)
                        static bool ReadInCommandBlock(void);
 
                #if defined(INCLUDE_FROM_MASSSTORAGE_C)
                        static bool ReadInCommandBlock(void);
index 3ccd0f0..938607b 100644 (file)
@@ -126,11 +126,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the HID commands, which are
- *  all issued via the control endpoint), so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Handle HID Class specific requests */
        switch (USB_ControlRequest.bRequest)
 {
        /* Handle HID Class specific requests */
        switch (USB_ControlRequest.bRequest)
index 108eade..c43dca0 100644 (file)
@@ -72,7 +72,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                void CreateMouseReport(USB_MouseReport_Data_t* const ReportData);
                void EVENT_USB_Device_StartOfFrame(void);
 
                void CreateMouseReport(USB_MouseReport_Data_t* const ReportData);
index eb1e876..a1e55cb 100644 (file)
@@ -112,11 +112,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the RNDIS control commands,
- *  which set up the USB RNDIS network adapter), so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Process RNDIS class commands */
        switch (USB_ControlRequest.bRequest)
 {
        /* Process RNDIS class commands */
        switch (USB_ControlRequest.bRequest)
index d4641f0..ea0f90b 100644 (file)
@@ -83,7 +83,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index 006685c..ac88c3e 100644 (file)
@@ -122,11 +122,11 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the USB_UnhandledControlRequest event. This is used to catch standard and class specific
- *  control requests that are not handled internally by the USB library (including the CDC control commands,
- *  which are all issued via the control endpoint), so that they can be handled appropriately for the application.
+/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
+ *  the device from the USB host before passing along unhandled control requests to the library for processing
+ *  internally.
  */
  */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+void EVENT_USB_Device_ControlRequest(void)
 {
        /* Process CDC specific control requests */
        switch (USB_ControlRequest.bRequest)
 {
        /* Process CDC specific control requests */
        switch (USB_ControlRequest.bRequest)
index 547ec8e..795d22e 100644 (file)
@@ -70,7 +70,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index 1203854..9d0e5cd 100644 (file)
@@ -82,8 +82,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        USB_Device_EnableSOFEvents();
 }
 
        USB_Device_EnableSOFEvents();
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        HID_Device_ProcessControlRequest(&Mouse_HID_Device_Interface);
 }
 {
        HID_Device_ProcessControlRequest(&Mouse_HID_Device_Interface);
 }
index fa256e0..9c5cc2c 100644 (file)
@@ -57,7 +57,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
 #endif
                void EVENT_USB_Device_StartOfFrame(void);
 
 #endif
index 1657c7e..429b899 100644 (file)
                        bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Processes incoming control requests from the host, that are directed to the given Audio class interface. This should be
                        bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Processes incoming control requests from the host, that are directed to the given Audio class interface. This should be
-                        *  linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event.
+                        *  linked to the library \ref EVENT_USB_Device_ControlRequest() event.
                         *
                         *  \param[in,out] AudioInterfaceInfo  Pointer to a structure containing an Audio Class configuration and state.
                         */
                         *
                         *  \param[in,out] AudioInterfaceInfo  Pointer to a structure containing an Audio Class configuration and state.
                         */
index ea014bd..caea6eb 100644 (file)
                        bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Processes incoming control requests from the host, that are directed to the given CDC class interface. This should be
                        bool CDC_Device_ConfigureEndpoints(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Processes incoming control requests from the host, that are directed to the given CDC class interface. This should be
-                        *  linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event.
+                        *  linked to the library \ref EVENT_USB_Device_ControlRequest() event.
                         *
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         */
                         *
                         *  \param[in,out] CDCInterfaceInfo  Pointer to a structure containing a CDC Class configuration and state.
                         */
index 5ce72b5..b9baf29 100644 (file)
                        bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Processes incoming control requests from the host, that are directed to the given HID class interface. This should be
                        bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Processes incoming control requests from the host, that are directed to the given HID class interface. This should be
-                        *  linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event.
+                        *  linked to the library \ref EVENT_USB_Device_ControlRequest() event.
                         *
                         *  \param[in,out] HIDInterfaceInfo  Pointer to a structure containing a HID Class configuration and state.
                         */
                         *
                         *  \param[in,out] HIDInterfaceInfo  Pointer to a structure containing a HID Class configuration and state.
                         */
index a8b79b7..4f72d5c 100644 (file)
 
                /* Inline Functions: */
                        /** Processes incoming control requests from the host, that are directed to the given MIDI class interface. This should be
 
                /* Inline Functions: */
                        /** Processes incoming control requests from the host, that are directed to the given MIDI class interface. This should be
-                        *  linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event.
+                        *  linked to the library \ref EVENT_USB_Device_ControlRequest() event.
                         *
                         *  \param[in,out] MIDIInterfaceInfo  Pointer to a structure containing a MIDI Class configuration and state.
                         */
                         *
                         *  \param[in,out] MIDIInterfaceInfo  Pointer to a structure containing a MIDI Class configuration and state.
                         */
index cf3cad9..57b145e 100644 (file)
                        bool MS_Device_ConfigureEndpoints(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Processes incoming control requests from the host, that are directed to the given Mass Storage class interface. This should be
                        bool MS_Device_ConfigureEndpoints(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Processes incoming control requests from the host, that are directed to the given Mass Storage class interface. This should be
-                        *  linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event.
+                        *  linked to the library \ref EVENT_USB_Device_ControlRequest() event.
                         *
                         *  \param[in,out] MSInterfaceInfo  Pointer to a structure containing a Mass Storage Class configuration and state.
                         */
                         *
                         *  \param[in,out] MSInterfaceInfo  Pointer to a structure containing a Mass Storage Class configuration and state.
                         */
index 1288a25..292c51b 100644 (file)
                        bool RNDIS_Device_ConfigureEndpoints(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Processes incoming control requests from the host, that are directed to the given RNDIS class interface. This should be
                        bool RNDIS_Device_ConfigureEndpoints(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Processes incoming control requests from the host, that are directed to the given RNDIS class interface. This should be
-                        *  linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event.
+                        *  linked to the library \ref EVENT_USB_Device_ControlRequest() event.
                         *
                         *  \param[in,out] RNDISInterfaceInfo  Pointer to a structure containing a RNDIS Class configuration and state.
                         */
                         *
                         *  \param[in,out] RNDISInterfaceInfo  Pointer to a structure containing a RNDIS Class configuration and state.
                         */
index 93b4440..7d7e48d 100644 (file)
@@ -48,72 +48,61 @@ bool    USB_RemoteWakeupEnabled;
 
 void USB_Device_ProcessControlRequest(void)
 {
 
 void USB_Device_ProcessControlRequest(void)
 {
-       bool     RequestHandled = false;
        uint8_t* RequestHeader  = (uint8_t*)&USB_ControlRequest;
 
        for (uint8_t RequestHeaderByte = 0; RequestHeaderByte < sizeof(USB_Request_Header_t); RequestHeaderByte++)
          *(RequestHeader++) = Endpoint_Read_Byte();
 
        uint8_t* RequestHeader  = (uint8_t*)&USB_ControlRequest;
 
        for (uint8_t RequestHeaderByte = 0; RequestHeaderByte < sizeof(USB_Request_Header_t); RequestHeaderByte++)
          *(RequestHeader++) = Endpoint_Read_Byte();
 
-       uint8_t bmRequestType = USB_ControlRequest.bmRequestType;
+       EVENT_USB_Device_ControlRequest();
 
 
-       switch (USB_ControlRequest.bRequest)
+       if (Endpoint_IsSETUPReceived())
        {
        {
-               case REQ_GetStatus:
-                       if ((bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE)) ||
-                           (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_ENDPOINT)))
-                       {
-                               USB_Device_GetStatus();
-                               RequestHandled = true;
-                       }
+               uint8_t bmRequestType = USB_ControlRequest.bmRequestType;
 
 
-                       break;
-               case REQ_ClearFeature:
-               case REQ_SetFeature:
-                       if ((bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE)) ||
-                           (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT)))
-                       {
-                               USB_Device_ClearSetFeature();
-                               RequestHandled = true;
-                       }
+               switch (USB_ControlRequest.bRequest)
+               {
+                       case REQ_GetStatus:
+                               if ((bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE)) ||
+                                       (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_ENDPOINT)))
+                               {
+                                       USB_Device_GetStatus();
+                               }
 
 
-                       break;
-               case REQ_SetAddress:
-                       if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE))
-                       {
-                               USB_Device_SetAddress();
-                               RequestHandled = true;
-                       }
+                               break;
+                       case REQ_ClearFeature:
+                       case REQ_SetFeature:
+                               if ((bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE)) ||
+                                       (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT)))
+                               {
+                                       USB_Device_ClearSetFeature();
+                               }
 
 
-                       break;
-               case REQ_GetDescriptor:
-                       if ((bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE)) ||
-                           (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE)))
-                       {
-                               USB_Device_GetDescriptor();
-                               RequestHandled = true;
-                       }
+                               break;
+                       case REQ_SetAddress:
+                               if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE))
+                                 USB_Device_SetAddress();
 
 
-                       break;
-               case REQ_GetConfiguration:
-                       if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE))
-                       {
-                               USB_Device_GetConfiguration();
-                               RequestHandled = true;
-                       }
+                               break;
+                       case REQ_GetDescriptor:
+                               if ((bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE)) ||
+                                       (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE)))
+                               {
+                                       USB_Device_GetDescriptor();
+                               }
 
 
-                       break;
-               case REQ_SetConfiguration:
-                       if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE))
-                       {
-                               USB_Device_SetConfiguration();
-                               RequestHandled = true;
-                       }
+                               break;
+                       case REQ_GetConfiguration:
+                               if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE))
+                                 USB_Device_GetConfiguration();
 
 
-                       break;
-       }
+                               break;
+                       case REQ_SetConfiguration:
+                               if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE))
+                                 USB_Device_SetConfiguration();
 
 
-       if (!(RequestHandled))
-         EVENT_USB_Device_UnhandledControlRequest();
+                               break;
+               }
+       }
 
        if (Endpoint_IsSETUPReceived())
        {
 
        if (Endpoint_IsSETUPReceived())
        {
index 8d58e39..63bcab5 100644 (file)
                         */
                        void EVENT_USB_Device_Disconnect(void);
 
                         */
                        void EVENT_USB_Device_Disconnect(void);
 
-                       /** Event for unhandled control requests. This event fires when a the USB host issues a control
-                        *  request to the control endpoint (address 0) that the library does not handle. This may either
-                        *  be a standard request that the library has no handler code for, or a class specific request
-                        *  issued to the device which must be handled appropriately.
+                       /** Event for control requests. This event fires when a the USB host issues a control request
+                        *  to the mandatory device control endpoint (of address 0). This may either be a standard 
+                        *  request that the library may have a handler code for internally, or a class specific request
+                        *  issued to the device which must be handled appropriately. If a request is not processed in the
+                        *  user application via this event, it will be passed to the library for processing internally
+                        *  if a suitable handler exists.
                         *
                         *  This event is time-critical; each packet within the request transaction must be acknowledged or
                         *  sent within 50ms or the host will abort the transfer.
                         *
                         *  The library internally handles all standard control requests with the exceptions of SYNC FRAME,
                         *  SET DESCRIPTOR and SET INTERFACE. These and all other non-standard control requests will be left
                         *
                         *  This event is time-critical; each packet within the request transaction must be acknowledged or
                         *  sent within 50ms or the host will abort the transfer.
                         *
                         *  The library internally handles all standard control requests with the exceptions of SYNC FRAME,
                         *  SET DESCRIPTOR and SET INTERFACE. These and all other non-standard control requests will be left
-                        *  for the user to process via this event if desired. If not handled in the user application, requests
-                        *  are automatically STALLed.
+                        *  for the user to process via this event if desired. If not handled in the user application or by
+                        *  the library internally, unknown requests are automatically STALLed.
                         *
                         *  \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
                         *        \ref Group_USBManagement documentation).
                         *
                         *  \note This event does not exist if the USB_HOST_ONLY token is supplied to the compiler (see
                         *        \ref Group_USBManagement documentation).
                         *        request SETUP parameters into the \ref USB_ControlRequest structure which should then be used
                         *        by the application to determine how to handle the issued request.
                         */
                         *        request SETUP parameters into the \ref USB_ControlRequest structure which should then be used
                         *        by the application to determine how to handle the issued request.
                         */
-                       void EVENT_USB_Device_UnhandledControlRequest(void);
+                       void EVENT_USB_Device_ControlRequest(void);
 
                        /** Event for USB configuration number changed. This event fires when a the USB host changes the
                         *  selected configuration number while in device mode. This event should be hooked in device
 
                        /** Event for USB configuration number changed. This event fires when a the USB host changes the
                         *  selected configuration number while in device mode. This event should be hooked in device
                                #if defined(USB_CAN_BE_DEVICE)
                                        void EVENT_USB_Device_Connect(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Device_Disconnect(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                #if defined(USB_CAN_BE_DEVICE)
                                        void EVENT_USB_Device_Connect(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Device_Disconnect(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
-                                       void EVENT_USB_Device_UnhandledControlRequest(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
+                                       void EVENT_USB_Device_ControlRequest(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Device_ConfigurationChanged(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Device_Suspend(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Device_WakeUp(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Device_ConfigurationChanged(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Device_Suspend(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
                                        void EVENT_USB_Device_WakeUp(void) ATTR_WEAK ATTR_ALIAS(USB_Event_Stub);
index 2d8c7cf..6b984ea 100644 (file)
                        {
                                REQ_GetStatus           = 0, /**< Implemented in the library for device, endpoint and interface
                                                              *   recipients. Passed to the user application for other recipients
                        {
                                REQ_GetStatus           = 0, /**< Implemented in the library for device, endpoint and interface
                                                              *   recipients. Passed to the user application for other recipients
-                                                             *   via the \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   via the \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                                REQ_ClearFeature        = 1, /**< Implemented in the library for device, endpoint and interface
                                                              *   recipients. Passed to the user application for other recipients
                                                              *   device mode. */
                                REQ_ClearFeature        = 1, /**< Implemented in the library for device, endpoint and interface
                                                              *   recipients. Passed to the user application for other recipients
-                                                             *   via the \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   via the \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                                REQ_SetFeature          = 3, /**< Implemented in the library for device, endpoint and interface
                                                              *   recipients. Passed to the user application for other recipients
                                                              *   device mode. */
                                REQ_SetFeature          = 3, /**< Implemented in the library for device, endpoint and interface
                                                              *   recipients. Passed to the user application for other recipients
-                                                             *   via the \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   via the \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                                REQ_SetAddress          = 5, /**< Implemented in the library for the device recipient. Passed
                                                              *   to the user application for other recipients via the
                                                              *   device mode. */
                                REQ_SetAddress          = 5, /**< Implemented in the library for the device recipient. Passed
                                                              *   to the user application for other recipients via the
-                                                             *   \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                                REQ_GetDescriptor       = 6, /**< Implemented in the library for device and interface recipients. Passed to the
                                                              *   user application for other recipients via the
                                                              *   device mode. */
                                REQ_GetDescriptor       = 6, /**< Implemented in the library for device and interface recipients. Passed to the
                                                              *   user application for other recipients via the
-                                                             *   \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                                REQ_SetDescriptor       = 7, /**< Not implemented in the library, passed to the user application
                                                              *   device mode. */
                                REQ_SetDescriptor       = 7, /**< Not implemented in the library, passed to the user application
-                                                             *   via the \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   via the \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                                REQ_GetConfiguration    = 8, /**< Implemented in the library for the device recipient. Passed
                                                              *   to the user application for other recipients via the
                                                              *   device mode. */
                                REQ_GetConfiguration    = 8, /**< Implemented in the library for the device recipient. Passed
                                                              *   to the user application for other recipients via the
-                                                             *   \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                                REQ_SetConfiguration    = 9, /**< Implemented in the library for the device recipient. Passed
                                                              *   to the user application for other recipients via the
                                                              *   device mode. */
                                REQ_SetConfiguration    = 9, /**< Implemented in the library for the device recipient. Passed
                                                              *   to the user application for other recipients via the
-                                                             *   \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                                REQ_GetInterface        = 10, /**< Not implemented in the library, passed to the user application
                                                              *   device mode. */
                                REQ_GetInterface        = 10, /**< Not implemented in the library, passed to the user application
-                                                             *   via the \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   via the \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                                REQ_SetInterface        = 11, /**< Not implemented in the library, passed to the user application
                                                              *   device mode. */
                                REQ_SetInterface        = 11, /**< Not implemented in the library, passed to the user application
-                                                             *   via the \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   via the \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                                REQ_SynchFrame          = 12, /**< Not implemented in the library, passed to the user application
                                                              *   device mode. */
                                REQ_SynchFrame          = 12, /**< Not implemented in the library, passed to the user application
-                                                             *   via the \ref EVENT_USB_Device_UnhandledControlRequest() event when received in
+                                                             *   via the \ref EVENT_USB_Device_ControlRequest() event when received in
                                                              *   device mode. */
                        };
                        
                                                              *   device mode. */
                        };
                        
index 1e1c26e..fcb7400 100644 (file)
  *
  *  The final standardized Device Class Driver function is the Control Request handler function
  *  <i><b>{Class Name}</b>_Device_ProcessControlRequest()</i>, which should be called when the
  *
  *  The final standardized Device Class Driver function is the Control Request handler function
  *  <i><b>{Class Name}</b>_Device_ProcessControlRequest()</i>, which should be called when the
- *  \ref EVENT_USB_Device_UnhandledControlRequest() event fires. This function should also be
- *  called for each class driver instance, using the address of the instance to operate on as
- *  the function's parameter. The request handler will abort if it is determined that the current
- *  request is not targeted at the given class driver instance, thus these methods can safely be
- *  called one-after-another in the event handler with no form of error checking:
+ *  \ref EVENT_USB_Device_ControlRequest() event fires. This function should also be called for
+ *  each class driver instance, using the address of the instance to operate on as the function's
+ *  parameter. The request handler will abort if it is determined that the current request is not
+ *  targeted at the given class driver instance, thus these methods can safely be called
+ *  one-after-another in the event handler with no form of error checking:
  *
  *  \code
  *
  *  \code
- *  void EVENT_USB_Device_UnhandledControlRequest(void)
+ *  void EVENT_USB_Device_ControlRequest(void)
  *  {
  *      Audio_Device_ProcessControlRequest(&My_Audio_Interface);
  *  }
  *  {
  *      Audio_Device_ProcessControlRequest(&My_Audio_Interface);
  *  }
index 86aac5c..68b042e 100644 (file)
   *  - Changed AudioInput and AudioOutput demos to reload the next sample via an interrupt rather than polling the sample timer
   *  - The MIDI class drivers now automatically flushes the MIDI interface when the MIDI class driver's USBTask() function is called
   *  - Rescue clock of the AVRISP-MKII moved to the AVR's OCR1A pin, so that the clock can be generated at all times
   *  - Changed AudioInput and AudioOutput demos to reload the next sample via an interrupt rather than polling the sample timer
   *  - The MIDI class drivers now automatically flushes the MIDI interface when the MIDI class driver's USBTask() function is called
   *  - Rescue clock of the AVRISP-MKII moved to the AVR's OCR1A pin, so that the clock can be generated at all times
+  *  - Changed ClassDriver MIDI demos to process all incomming events in a loop until the bank becomes empty rather than one at a time
+  *  - Changed LowLevel MIDI demos to only clear the incomming event bank once it has become empty to support packed event packets
+  *  - Renamed the EVENT_USB_Device_UnhandledControlRequest() event to EVENT_USB_Device_ControlRequest() as it is now fired before the library
+  *    request handlers, not afterwards
   *
   *  <b>Fixed:</b>
   *  - Fixed USB_GetHIDReportItemInfo() function modifying the given report item's data when the report item does not exist
   *
   *  <b>Fixed:</b>
   *  - Fixed USB_GetHIDReportItemInfo() function modifying the given report item's data when the report item does not exist
index 004d9a0..08c7a9f 100644 (file)
@@ -37,6 +37,9 @@
  *    - The ENDPOINT_DOUBLEBANK_SUPPORTED() macro is has been renamed \ref ENDPOINT_BANKS_SUPPORTED() and now returns the total number of
  *      banks supported by the given endpoint. Existing code should switch to the new naming scheme, and test that the return value of the
  *      macro is equal to or greated than 2 to regain the previous functionality.
  *    - The ENDPOINT_DOUBLEBANK_SUPPORTED() macro is has been renamed \ref ENDPOINT_BANKS_SUPPORTED() and now returns the total number of
  *      banks supported by the given endpoint. Existing code should switch to the new naming scheme, and test that the return value of the
  *      macro is equal to or greated than 2 to regain the previous functionality.
+ *    - The EVENT_USB_Device_UnhandledControlRequest() event is now named \ref EVENT_USB_Device_ControlRequest() and fires before (not after)
+ *      the internal library event handlers. Existing code should rename the event handlers in the user application to match the new event
+ *      name, and should ensure that the new execution order does not affect the application's operation.
  *
  *  <b>Host Mode</b>
  *    - Pipes MUST be allocated in ascending order to ensure that bank corruption does not occur. Ensure that your user application
  *
  *  <b>Host Mode</b>
  *    - Pipes MUST be allocated in ascending order to ensure that bank corruption does not occur. Ensure that your user application
index 73d45c8..7883ec8 100644 (file)
@@ -68,7 +68,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
                void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo);
                void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo);
 
                void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo);
                void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo);
index c4f0eb7..79e6821 100644 (file)
@@ -80,8 +80,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        MS_Device_ProcessControlRequest(&DiskDevice_MS_Interface);
 }
 {
        MS_Device_ProcessControlRequest(&DiskDevice_MS_Interface);
 }
index a742ce8..7d24cc2 100644 (file)
@@ -52,7 +52,7 @@
                        void EVENT_USB_Device_Connect(void);
                        void EVENT_USB_Device_Disconnect(void);
                        void EVENT_USB_Device_ConfigurationChanged(void);
                        void EVENT_USB_Device_Connect(void);
                        void EVENT_USB_Device_Disconnect(void);
                        void EVENT_USB_Device_ConfigurationChanged(void);
-                       void EVENT_USB_Device_UnhandledControlRequest(void);
+                       void EVENT_USB_Device_ControlRequest(void);
 
                        bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                #endif
 
                        bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                #endif
index b29629b..4ebfb7a 100644 (file)
@@ -160,8 +160,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);
 }
 
        CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
 }
 {
        CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
 }
index 0dada2a..0ecdb3c 100644 (file)
@@ -54,7 +54,7 @@
                void SetupHardware(void);
 
                void EVENT_USB_Device_ConfigurationChanged(void);
                void SetupHardware(void);
 
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index cc5a9a2..a1d7d3d 100644 (file)
@@ -149,8 +149,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        USB_Device_EnableSOFEvents();
 }
 
        USB_Device_EnableSOFEvents();
 }
 
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
 }
 {
        HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
 }
index 2627cfc..1de5a2e 100644 (file)
@@ -71,7 +71,7 @@
                void ReadMagstripeData(void);
 
                void EVENT_USB_Device_ConfigurationChanged(void);
                void ReadMagstripeData(void);
 
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
                void EVENT_USB_Device_StartOfFrame(void);
 
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
index a8e0efd..7f6a1ed 100644 (file)
@@ -69,8 +69,8 @@ void SetupHardware(void)
        PORTC &= ~ALL_RELAYS;
 }
 
        PORTC &= ~ALL_RELAYS;
 }
 
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
     const uint8_t SerialNumber[5] = { 0, 0, 0, 0, 1 };
        uint8_t ControlData[2]        = { 0, 0 };
 {
     const uint8_t SerialNumber[5] = { 0, 0, 0, 0, 1 };
        uint8_t ControlData[2]        = { 0, 0 };
index 0de76ef..63c1210 100644 (file)
@@ -59,7 +59,7 @@
        /* Function Prototypes: */
                void SetupHardware(void);
 
        /* Function Prototypes: */
                void SetupHardware(void);
 
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
 #endif
 
 
 #endif
 
index 7fe004b..c572a38 100644 (file)
@@ -245,8 +245,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        MS_Device_ProcessControlRequest(&Disk_MS_Interface);
        HID_Device_ProcessControlRequest(&Generic_HID_Interface);
 {
        MS_Device_ProcessControlRequest(&Disk_MS_Interface);
        HID_Device_ProcessControlRequest(&Generic_HID_Interface);
index 87e0bd2..f81a574 100644 (file)
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
 
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
                bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
index c26667d..7f3474a 100644 (file)
@@ -152,8 +152,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
 }
 {
        CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
 }
index 80ff273..5276b04 100644 (file)
@@ -70,7 +70,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
                void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo);
 
 
                void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo);
 
index 03ba6df..3d50a8e 100644 (file)
@@ -92,8 +92,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        MS_Device_ProcessControlRequest(&Disk_MS_Interface);
 }
 {
        MS_Device_ProcessControlRequest(&Disk_MS_Interface);
 }
index 627ef72..68f3ef4 100644 (file)
@@ -49,7 +49,7 @@
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
 
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
 
 
                bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo);
 
index d645ebe..15cb87d 100644 (file)
@@ -212,8 +212,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        if (CurrentFirmwareMode == MODE_USART_BRIDGE)
          CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
 {
        if (CurrentFirmwareMode == MODE_USART_BRIDGE)
          CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
index 5706d20..7d81abf 100644 (file)
@@ -86,7 +86,7 @@
                void UARTBridge_Task(void);
 
                void EVENT_USB_Device_ConfigurationChanged(void);
                void UARTBridge_Task(void);
 
                void EVENT_USB_Device_ConfigurationChanged(void);
-               void EVENT_USB_Device_UnhandledControlRequest(void);
+               void EVENT_USB_Device_ControlRequest(void);
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
 
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);