aboutsummaryrefslogtreecommitdiffstats
path: root/Demos
diff options
context:
space:
mode:
Diffstat (limited to 'Demos')
-rw-r--r--Demos/Device/ClassDriver/AudioInput/AudioInput.c12
-rw-r--r--Demos/Device/ClassDriver/AudioInput/AudioInput.h8
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/AudioOutput.c12
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/AudioOutput.h8
-rw-r--r--Demos/Device/ClassDriver/CDC/CDC.c12
-rw-r--r--Demos/Device/ClassDriver/CDC/CDC.h8
-rw-r--r--Demos/Device/ClassDriver/DualCDC/DualCDC.c14
-rw-r--r--Demos/Device/ClassDriver/DualCDC/DualCDC.h8
-rw-r--r--Demos/Device/ClassDriver/GenericHID/GenericHID.c12
-rw-r--r--Demos/Device/ClassDriver/GenericHID/GenericHID.h8
-rw-r--r--Demos/Device/ClassDriver/Joystick/Joystick.c12
-rw-r--r--Demos/Device/ClassDriver/Joystick/Joystick.h8
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.c12
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.h8
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c14
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h8
-rw-r--r--Demos/Device/ClassDriver/MIDI/MIDI.c12
-rw-r--r--Demos/Device/ClassDriver/MIDI/MIDI.h8
-rw-r--r--Demos/Device/ClassDriver/MassStorage/MassStorage.c12
-rw-r--r--Demos/Device/ClassDriver/MassStorage/MassStorage.h8
-rw-r--r--Demos/Device/ClassDriver/Mouse/Mouse.c16
-rw-r--r--Demos/Device/ClassDriver/Mouse/Mouse.h8
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c12
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h8
-rw-r--r--Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c12
-rw-r--r--Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.h8
-rw-r--r--Demos/Device/Incomplete/Sideshow/Sideshow.c8
-rw-r--r--Demos/Device/Incomplete/Sideshow/Sideshow.h8
-rw-r--r--Demos/Device/LowLevel/AudioInput/AudioInput.c10
-rw-r--r--Demos/Device/LowLevel/AudioInput/AudioInput.h8
-rw-r--r--Demos/Device/LowLevel/AudioOutput/AudioOutput.c10
-rw-r--r--Demos/Device/LowLevel/AudioOutput/AudioOutput.h8
-rw-r--r--Demos/Device/LowLevel/CDC/CDC.c13
-rw-r--r--Demos/Device/LowLevel/CDC/CDC.h8
-rw-r--r--Demos/Device/LowLevel/DualCDC/DualCDC.c14
-rw-r--r--Demos/Device/LowLevel/DualCDC/DualCDC.h8
-rw-r--r--Demos/Device/LowLevel/GenericHID/GenericHID.c10
-rw-r--r--Demos/Device/LowLevel/GenericHID/GenericHID.h8
-rw-r--r--Demos/Device/LowLevel/Joystick/Joystick.c10
-rw-r--r--Demos/Device/LowLevel/Joystick/Joystick.h8
-rw-r--r--Demos/Device/LowLevel/Keyboard/Keyboard.c10
-rw-r--r--Demos/Device/LowLevel/Keyboard/Keyboard.h8
-rw-r--r--Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c8
-rw-r--r--Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h8
-rw-r--r--Demos/Device/LowLevel/MIDI/MIDI.c6
-rw-r--r--Demos/Device/LowLevel/MIDI/MIDI.h6
-rw-r--r--Demos/Device/LowLevel/MassStorage/MassStorage.c8
-rw-r--r--Demos/Device/LowLevel/MassStorage/MassStorage.h8
-rw-r--r--Demos/Device/LowLevel/Mouse/Mouse.c10
-rw-r--r--Demos/Device/LowLevel/Mouse/Mouse.h8
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c10
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h8
-rw-r--r--Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c13
-rw-r--r--Demos/Device/LowLevel/USBtoSerial/USBtoSerial.h8
-rw-r--r--Demos/Host/ClassDriver/CDCHost/CDCHost.c10
-rw-r--r--Demos/Host/ClassDriver/CDCHost/CDCHost.h10
-rw-r--r--Demos/Host/ClassDriver/MouseHost/MouseHost.c10
-rw-r--r--Demos/Host/ClassDriver/MouseHost/MouseHost.h10
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c15
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/BluetoothHost.h10
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c2
-rw-r--r--Demos/Host/LowLevel/CDCHost/CDCHost.c10
-rw-r--r--Demos/Host/LowLevel/CDCHost/CDCHost.h10
-rw-r--r--Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c10
-rw-r--r--Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h10
-rw-r--r--Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c10
-rw-r--r--Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h10
-rw-r--r--Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c10
-rw-r--r--Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h10
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c8
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h10
-rw-r--r--Demos/Host/LowLevel/MouseHost/MouseHost.c10
-rw-r--r--Demos/Host/LowLevel/MouseHost/MouseHost.h10
-rw-r--r--Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c10
-rw-r--r--Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h10
-rw-r--r--Demos/Host/LowLevel/PrinterHost/PrinterHost.c10
-rw-r--r--Demos/Host/LowLevel/PrinterHost/PrinterHost.h10
-rw-r--r--Demos/Host/LowLevel/StillImageHost/StillImageHost.c10
-rw-r--r--Demos/Host/LowLevel/StillImageHost/StillImageHost.h10
-rw-r--r--Demos/OTG/TestApp/TestEvents.c144
-rw-r--r--Demos/OTG/TestApp/TestEvents.h27
81 files changed, 457 insertions, 477 deletions
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.c b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
index 59d2129f4..3aa26ae85 100644
--- a/Demos/Device/ClassDriver/AudioInput/AudioInput.c
+++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
@@ -112,7 +112,7 @@ void ProcessNextSample(void)
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -123,7 +123,7 @@ void EVENT_USB_Connect(void)
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Stop the sample reload timer */
TCCR0B = 0;
@@ -132,7 +132,7 @@ void EVENT_USB_Disconnect(void)
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -140,8 +140,8 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- Audio_Device_ProcessControlPacket(&Microphone_Audio_Interface);
+ Audio_Device_ProcessControlRequest(&Microphone_Audio_Interface);
}
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.h b/Demos/Device/ClassDriver/AudioInput/AudioInput.h
index f26267339..03e2a6da3 100644
--- a/Demos/Device/ClassDriver/AudioInput/AudioInput.h
+++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.h
@@ -76,9 +76,9 @@
void SetupHardware(void);
void ProcessNextSample(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
index 9a8804a45..d7de7d5b0 100644
--- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
+++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
@@ -140,7 +140,7 @@ void ProcessNextSample(void)
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -169,7 +169,7 @@ void EVENT_USB_Connect(void)
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -194,7 +194,7 @@ void EVENT_USB_Disconnect(void)
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -202,8 +202,8 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- Audio_Device_ProcessControlPacket(&Speaker_Audio_Interface);
+ Audio_Device_ProcessControlRequest(&Speaker_Audio_Interface);
}
diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
index 9846a7634..d31a8e6b6 100644
--- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
+++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
@@ -68,9 +68,9 @@
void SetupHardware(void);
void ProcessNextSample(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/ClassDriver/CDC/CDC.c b/Demos/Device/ClassDriver/CDC/CDC.c
index 8e3530ca2..4f64646ea 100644
--- a/Demos/Device/ClassDriver/CDC/CDC.c
+++ b/Demos/Device/ClassDriver/CDC/CDC.c
@@ -155,19 +155,19 @@ void CheckJoystickMovement(void)
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -175,8 +175,8 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- CDC_Device_ProcessControlPacket(&VirtualSerial_CDC_Interface);
+ CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
}
diff --git a/Demos/Device/ClassDriver/CDC/CDC.h b/Demos/Device/ClassDriver/CDC/CDC.h
index 255cd8611..ee375a466 100644
--- a/Demos/Device/ClassDriver/CDC/CDC.h
+++ b/Demos/Device/ClassDriver/CDC/CDC.h
@@ -67,9 +67,9 @@
void SetupHardware(void);
void CheckJoystickMovement(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/ClassDriver/DualCDC/DualCDC.c b/Demos/Device/ClassDriver/DualCDC/DualCDC.c
index 82ed59d51..e5406a4ba 100644
--- a/Demos/Device/ClassDriver/DualCDC/DualCDC.c
+++ b/Demos/Device/ClassDriver/DualCDC/DualCDC.c
@@ -163,19 +163,19 @@ void CheckJoystickMovement(void)
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -186,9 +186,9 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- CDC_Device_ProcessControlPacket(&VirtualSerial1_CDC_Interface);
- CDC_Device_ProcessControlPacket(&VirtualSerial2_CDC_Interface);
+ CDC_Device_ProcessControlRequest(&VirtualSerial1_CDC_Interface);
+ CDC_Device_ProcessControlRequest(&VirtualSerial2_CDC_Interface);
}
diff --git a/Demos/Device/ClassDriver/DualCDC/DualCDC.h b/Demos/Device/ClassDriver/DualCDC/DualCDC.h
index 0f1a76498..2f12aca88 100644
--- a/Demos/Device/ClassDriver/DualCDC/DualCDC.h
+++ b/Demos/Device/ClassDriver/DualCDC/DualCDC.h
@@ -67,9 +67,9 @@
void SetupHardware(void);
void CheckJoystickMovement(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.c b/Demos/Device/ClassDriver/GenericHID/GenericHID.c
index 323d69336..13db6bf74 100644
--- a/Demos/Device/ClassDriver/GenericHID/GenericHID.c
+++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.c
@@ -103,19 +103,19 @@ void SetupHardware(void)
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -123,10 +123,10 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- HID_Device_ProcessControlPacket(&Generic_HID_Interface);
+ HID_Device_ProcessControlRequest(&Generic_HID_Interface);
}
/** ISR to keep track of each millisecond interrupt, for determining the HID class idle period remaining when set. */
diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.h b/Demos/Device/ClassDriver/GenericHID/GenericHID.h
index 50a92ec1e..8cf0afc5d 100644
--- a/Demos/Device/ClassDriver/GenericHID/GenericHID.h
+++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.h
@@ -67,10 +67,10 @@
/* Function Prototypes: */
void SetupHardware(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
void* ReportData, uint16_t* ReportSize);
diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.c b/Demos/Device/ClassDriver/Joystick/Joystick.c
index f4dc32d9b..ea85aadde 100644
--- a/Demos/Device/ClassDriver/Joystick/Joystick.c
+++ b/Demos/Device/ClassDriver/Joystick/Joystick.c
@@ -97,19 +97,19 @@ void SetupHardware(void)
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -117,10 +117,10 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- HID_Device_ProcessControlPacket(&Joystick_HID_Interface);
+ HID_Device_ProcessControlRequest(&Joystick_HID_Interface);
}
/** ISR to keep track of each millisecond interrupt, for determining the HID class idle period remaining when set. */
diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.h b/Demos/Device/ClassDriver/Joystick/Joystick.h
index 764de1723..493dfa072 100644
--- a/Demos/Device/ClassDriver/Joystick/Joystick.h
+++ b/Demos/Device/ClassDriver/Joystick/Joystick.h
@@ -78,10 +78,10 @@
/* Function Prototypes: */
void SetupHardware(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
void* ReportData, uint16_t* ReportSize);
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
index 040aec453..6f0bd1d1a 100644
--- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c
+++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
@@ -98,19 +98,19 @@ void SetupHardware()
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -118,10 +118,10 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- HID_Device_ProcessControlPacket(&Keyboard_HID_Interface);
+ HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
}
/** ISR to keep track of each millisecond interrupt, for determining the HID class idle period remaining when set. */
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.h b/Demos/Device/ClassDriver/Keyboard/Keyboard.h
index 4a28d20ff..0f7176ce0 100644
--- a/Demos/Device/ClassDriver/Keyboard/Keyboard.h
+++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.h
@@ -81,10 +81,10 @@
/* Function Prototypes: */
void SetupHardware(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
void* ReportData, uint16_t* ReportSize);
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
index abaf3808b..e21999049 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
+++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
@@ -121,19 +121,19 @@ void SetupHardware()
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -144,11 +144,11 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- HID_Device_ProcessControlPacket(&Keyboard_HID_Interface);
- HID_Device_ProcessControlPacket(&Mouse_HID_Interface);
+ HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
+ HID_Device_ProcessControlRequest(&Mouse_HID_Interface);
}
/** ISR to keep track of each millisecond interrupt, for determining the HID class idle period remaining when set. */
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h
index 15532c816..297564157 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h
+++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h
@@ -85,10 +85,10 @@
/* Function Prototypes: */
void SetupHardware(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
void* ReportData, uint16_t* ReportSize);
diff --git a/Demos/Device/ClassDriver/MIDI/MIDI.c b/Demos/Device/ClassDriver/MIDI/MIDI.c
index fcb86d661..f1a0d9afc 100644
--- a/Demos/Device/ClassDriver/MIDI/MIDI.c
+++ b/Demos/Device/ClassDriver/MIDI/MIDI.c
@@ -157,19 +157,19 @@ void CheckJoystickMovement(void)
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -177,8 +177,8 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- MIDI_Device_ProcessControlPacket(&Keyboard_MIDI_Interface);
+ MIDI_Device_ProcessControlRequest(&Keyboard_MIDI_Interface);
}
diff --git a/Demos/Device/ClassDriver/MIDI/MIDI.h b/Demos/Device/ClassDriver/MIDI/MIDI.h
index bc9038207..7c1484d4b 100644
--- a/Demos/Device/ClassDriver/MIDI/MIDI.h
+++ b/Demos/Device/ClassDriver/MIDI/MIDI.h
@@ -69,9 +69,9 @@
void SetupHardware(void);
void CheckJoystickMovement(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.c b/Demos/Device/ClassDriver/MassStorage/MassStorage.c
index 6a4612e4c..52ed2d938 100644
--- a/Demos/Device/ClassDriver/MassStorage/MassStorage.c
+++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.c
@@ -92,19 +92,19 @@ void SetupHardware(void)
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -112,10 +112,10 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- MS_Device_ProcessControlPacket(&Disk_MS_Interface);
+ MS_Device_ProcessControlRequest(&Disk_MS_Interface);
}
/** Mass Storage class driver callback function the reception of SCSI commands from the host, which must be processed.
diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.h b/Demos/Device/ClassDriver/MassStorage/MassStorage.h
index 71497780e..e6b2bf99f 100644
--- a/Demos/Device/ClassDriver/MassStorage/MassStorage.h
+++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.h
@@ -78,10 +78,10 @@
/* Function Prototypes: */
void SetupHardware(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* MSInterfaceInfo);
diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.c b/Demos/Device/ClassDriver/Mouse/Mouse.c
index 08e87e672..d26101381 100644
--- a/Demos/Device/ClassDriver/Mouse/Mouse.c
+++ b/Demos/Device/ClassDriver/Mouse/Mouse.c
@@ -96,20 +96,20 @@ void SetupHardware(void)
TIMSK0 = (1 << OCIE0A);
}
-/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+/** Event handler for the library USB WakeUp event. */
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
-/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+/** Event handler for the library USB Suspend event. */
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -117,10 +117,10 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_Device_UnhandledControlRequest(void)
{
- HID_Device_ProcessControlPacket(&Mouse_HID_Interface);
+ HID_Device_ProcessControlRequest(&Mouse_HID_Interface);
}
/** ISR to keep track of each millisecond interrupt, for determining the HID class idle period remaining when set. */
diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.h b/Demos/Device/ClassDriver/Mouse/Mouse.h
index 57e4a693d..709077fab 100644
--- a/Demos/Device/ClassDriver/Mouse/Mouse.h
+++ b/Demos/Device/ClassDriver/Mouse/Mouse.h
@@ -80,10 +80,10 @@
/* Function Prototypes: */
void SetupHardware(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(void);
+ void EVENT_USB_Device_Device_Connect(void);
+ void EVENT_USB_Device_Device_Disconnect(void);
+ void EVENT_USB_Device_Device_ConfigurationChanged(void);
+ void EVENT_USB_Device_Device_UnhandledControlRequest(void);
bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID,
void* ReportData, uint16_t* ReportSize);
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
index 81d31c9cd..905f4efd0 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
@@ -107,19 +107,19 @@ void SetupHardware(void)
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -127,8 +127,8 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
- RNDIS_Device_ProcessControlPacket(&Ethernet_RNDIS_Interface);
+ RNDIS_Device_ProcessControlRequest(&Ethernet_RNDIS_Interface);
}
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h
index c5503e286..b91a54d21 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h
@@ -76,9 +76,9 @@
/* Function Prototypes: */
void SetupHardware(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c
index e51963c7a..b78a6d331 100644
--- a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c
+++ b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c
@@ -116,19 +116,19 @@ void SetupHardware(void)
}
/** Event handler for the library USB Connection event. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Disconnection event. */
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
/** Event handler for the library USB Configuration Changed event. */
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -136,10 +136,10 @@ void EVENT_USB_ConfigurationChanged(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
-/** Event handler for the library USB Unhandled Control Packet event. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the library USB Unhandled Control Request event. */
+void EVENT_USB_Device_UnhandledControlPacket(void)
{
- CDC_Device_ProcessControlPacket(&VirtualSerial_CDC_Interface);
+ CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
}
/** ISR to manage the reception of data from the serial port, placing received bytes into a circular buffer
diff --git a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.h b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.h
index 3ee7e89ed..4ceb931a3 100644
--- a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.h
+++ b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.h
@@ -69,10 +69,10 @@
/* Function Prototypes: */
void SetupHardware(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo);
diff --git a/Demos/Device/Incomplete/Sideshow/Sideshow.c b/Demos/Device/Incomplete/Sideshow/Sideshow.c
index d67fae03f..fdf4265e6 100644
--- a/Demos/Device/Incomplete/Sideshow/Sideshow.c
+++ b/Demos/Device/Incomplete/Sideshow/Sideshow.c
@@ -82,17 +82,17 @@ void SetupHardware(void)
SerialStream_Init(9600, false);
}
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -112,7 +112,7 @@ void EVENT_USB_ConfigurationChanged(void)
}
}
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Process UFI specific control requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/Incomplete/Sideshow/Sideshow.h b/Demos/Device/Incomplete/Sideshow/Sideshow.h
index c8d3b5311..f2890ef21 100644
--- a/Demos/Device/Incomplete/Sideshow/Sideshow.h
+++ b/Demos/Device/Incomplete/Sideshow/Sideshow.h
@@ -65,9 +65,9 @@
void SetupHardware(void);
void SideShow_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c
index bf790169d..a01c6729c 100644
--- a/Demos/Device/LowLevel/AudioInput/AudioInput.c
+++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c
@@ -78,7 +78,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs, and
* configures the sample update and PWM timers.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -92,7 +92,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs, disables the sample update and PWM output timers and stops the USB and Audio management tasks.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Stop the sample reload timer */
TCCR0B = 0;
@@ -107,7 +107,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
* of the USB device after enumeration - the device endpoints are configured.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -121,11 +121,11 @@ void EVENT_USB_ConfigurationChanged(void)
}
}
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
+/** 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Process General and Audio specific control requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.h b/Demos/Device/LowLevel/AudioInput/AudioInput.h
index 591d3f355..f74491dac 100644
--- a/Demos/Device/LowLevel/AudioInput/AudioInput.h
+++ b/Demos/Device/LowLevel/AudioInput/AudioInput.h
@@ -74,9 +74,9 @@
void SetupHardware(void);
void USB_Audio_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
index 7dde84bb3..1128e8f4e 100644
--- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
+++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
@@ -73,7 +73,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs, and
* configures the sample update and PWM timers.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -105,7 +105,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs, disables the sample update and PWM output timers and stops the USB and Audio management tasks.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Stop the timers */
TCCR0B = 0;
@@ -134,7 +134,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
* of the USB device after enumeration - the device endpoints are configured.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -148,11 +148,11 @@ void EVENT_USB_ConfigurationChanged(void)
}
}
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
+/** 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Process General and Audio specific control requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h
index 6c8d733f3..362a5540a 100644
--- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h
+++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h
@@ -65,9 +65,9 @@
void SetupHardware(void);
void USB_Audio_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/LowLevel/CDC/CDC.c b/Demos/Device/LowLevel/CDC/CDC.c
index 4b5409f5c..9ee744ea0 100644
--- a/Demos/Device/LowLevel/CDC/CDC.c
+++ b/Demos/Device/LowLevel/CDC/CDC.c
@@ -143,7 +143,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -152,7 +152,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops the USB management and CDC management tasks.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Indicate USB not ready */
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -161,7 +161,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
* of the USB device after enumeration - the device endpoints are configured and the CDC management task started.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -187,13 +187,16 @@ void EVENT_USB_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
+
+ /* Reset line encoding baud rate so that the host knows to send new values */
+ LineEncoding.BaudRateBPS = 0;
}
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
+/** 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Process CDC specific control requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/LowLevel/CDC/CDC.h b/Demos/Device/LowLevel/CDC/CDC.h
index a8f7199ab..4a7b6b158 100644
--- a/Demos/Device/LowLevel/CDC/CDC.h
+++ b/Demos/Device/LowLevel/CDC/CDC.h
@@ -175,9 +175,9 @@
void SetupHardware(void);
void CDC_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/LowLevel/DualCDC/DualCDC.c b/Demos/Device/LowLevel/DualCDC/DualCDC.c
index 654ce863e..c49a1ad85 100644
--- a/Demos/Device/LowLevel/DualCDC/DualCDC.c
+++ b/Demos/Device/LowLevel/DualCDC/DualCDC.c
@@ -97,7 +97,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -106,7 +106,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops the USB management and CDC management tasks.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Indicate USB not ready */
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -115,7 +115,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
* of the USB device after enumeration - the device endpoints are configured and the CDC management tasks are started.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -163,13 +163,17 @@ void EVENT_USB_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
+
+ /* Reset line encoding baud rates so that the host knows to send new values */
+ LineEncoding1.BaudRateBPS = 0;
+ LineEncoding2.BaudRateBPS = 0;
}
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
+/** 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Determine which interface's Line Coding data is being set from the wIndex parameter */
uint8_t* LineEncodingData = (USB_ControlRequest.wIndex == 0) ? (uint8_t*)&LineEncoding1 : (uint8_t*)&LineEncoding2;
diff --git a/Demos/Device/LowLevel/DualCDC/DualCDC.h b/Demos/Device/LowLevel/DualCDC/DualCDC.h
index d6f09e643..b2085c452 100644
--- a/Demos/Device/LowLevel/DualCDC/DualCDC.h
+++ b/Demos/Device/LowLevel/DualCDC/DualCDC.h
@@ -111,9 +111,9 @@
void CDC2_Task(void);
void SetupHardware(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.c b/Demos/Device/LowLevel/GenericHID/GenericHID.c
index 34c991f12..5a8bb5187 100644
--- a/Demos/Device/LowLevel/GenericHID/GenericHID.c
+++ b/Demos/Device/LowLevel/GenericHID/GenericHID.c
@@ -74,7 +74,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -83,7 +83,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops the USB management task.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Indicate USB not ready */
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -92,7 +92,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
* of the USB device after enumeration, and configures the generic HID device endpoints.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -114,11 +114,11 @@ void EVENT_USB_ConfigurationChanged(void)
}
}
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
+/** 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Handle HID Class specific requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.h b/Demos/Device/LowLevel/GenericHID/GenericHID.h
index fbd0a7f8d..c03651773 100644
--- a/Demos/Device/LowLevel/GenericHID/GenericHID.h
+++ b/Demos/Device/LowLevel/GenericHID/GenericHID.h
@@ -73,10 +73,10 @@
void SetupHardware(void);
void HID_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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 ProcessGenericHIDReport(uint8_t* DataArray);
void CreateGenericHIDReport(uint8_t* DataArray);
diff --git a/Demos/Device/LowLevel/Joystick/Joystick.c b/Demos/Device/LowLevel/Joystick/Joystick.c
index db2415e4b..306baa9e0 100644
--- a/Demos/Device/LowLevel/Joystick/Joystick.c
+++ b/Demos/Device/LowLevel/Joystick/Joystick.c
@@ -72,7 +72,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -81,7 +81,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops the USB management and joystick reporting tasks.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Indicate USB not ready */
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -90,7 +90,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
* of the USB device after enumeration - the device endpoints are configured and the joystick reporting task started.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -104,11 +104,11 @@ void EVENT_USB_ConfigurationChanged(void)
}
}
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
+/** 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Handle HID Class specific requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/LowLevel/Joystick/Joystick.h b/Demos/Device/LowLevel/Joystick/Joystick.h
index c50d7f01b..db280ee5c 100644
--- a/Demos/Device/LowLevel/Joystick/Joystick.h
+++ b/Demos/Device/LowLevel/Joystick/Joystick.h
@@ -81,10 +81,10 @@
void SetupHardware(void);
void HID_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
bool GetNextReport(USB_JoystickReport_Data_t* ReportData);
diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.c b/Demos/Device/LowLevel/Keyboard/Keyboard.c
index e27b22827..f8310abb4 100644
--- a/Demos/Device/LowLevel/Keyboard/Keyboard.c
+++ b/Demos/Device/LowLevel/Keyboard/Keyboard.c
@@ -96,7 +96,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -108,7 +108,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Indicate USB not ready */
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -117,7 +117,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
* of the USB device after enumeration, and configures the keyboard device endpoints.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -139,11 +139,11 @@ void EVENT_USB_ConfigurationChanged(void)
}
}
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
+/** 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Handle HID Class specific requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.h b/Demos/Device/LowLevel/Keyboard/Keyboard.h
index 2a2ebdc49..bc478f317 100644
--- a/Demos/Device/LowLevel/Keyboard/Keyboard.h
+++ b/Demos/Device/LowLevel/Keyboard/Keyboard.h
@@ -101,10 +101,10 @@
void SetupHardware(void);
void HID_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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 CreateKeyboardReport(USB_KeyboardReport_Data_t* ReportData);
void ProcessLEDReport(uint8_t LEDReport);
diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
index 7d486e16e..bfd337a2a 100644
--- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
+++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
@@ -80,7 +80,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -89,7 +89,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops the USB management task.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Indicate USB not ready */
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -98,7 +98,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
* of the USB device after enumeration, and configures the keyboard and mouse device endpoints.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -132,7 +132,7 @@ void EVENT_USB_ConfigurationChanged(void)
* 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
uint8_t* ReportData;
uint8_t ReportSize;
diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h
index 138f0fc1d..37cb7f651 100644
--- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h
+++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h
@@ -98,9 +98,9 @@
void Keyboard_HID_Task(void);
void Mouse_HID_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/LowLevel/MIDI/MIDI.c b/Demos/Device/LowLevel/MIDI/MIDI.c
index 8aed527db..4dfb9b7e6 100644
--- a/Demos/Device/LowLevel/MIDI/MIDI.c
+++ b/Demos/Device/LowLevel/MIDI/MIDI.c
@@ -70,7 +70,7 @@ void SetupHardware(void)
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -79,7 +79,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs, disables the sample update and PWM output timers and stops the USB and MIDI management tasks.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Indicate USB not ready */
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -88,7 +88,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
* of the USB device after enumeration - the device endpoints are configured and the MIDI management task started.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
diff --git a/Demos/Device/LowLevel/MIDI/MIDI.h b/Demos/Device/LowLevel/MIDI/MIDI.h
index 3b9b938a5..3e7a06d6d 100644
--- a/Demos/Device/LowLevel/MIDI/MIDI.h
+++ b/Demos/Device/LowLevel/MIDI/MIDI.h
@@ -95,8 +95,8 @@
void SetupHardware(void);
void MIDI_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
+ void EVENT_USB_Device_Connect(void);
+ void EVENT_USB_Device_Disconnect(void);
+ void EVENT_USB_Device_ConfigurationChanged(void);
#endif
diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.c b/Demos/Device/LowLevel/MassStorage/MassStorage.c
index 01d27f043..1a2d8d468 100644
--- a/Demos/Device/LowLevel/MassStorage/MassStorage.c
+++ b/Demos/Device/LowLevel/MassStorage/MassStorage.c
@@ -83,7 +83,7 @@ void SetupHardware(void)
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs. */
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -95,7 +95,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops the Mass Storage management task.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Indicate USB not ready */
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -104,7 +104,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
* of the USB device after enumeration - the device endpoints are configured and the Mass Storage management task started.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -129,7 +129,7 @@ void EVENT_USB_ConfigurationChanged(void)
* 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Process UFI specific control requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.h b/Demos/Device/LowLevel/MassStorage/MassStorage.h
index 81fba0000..868daf09a 100644
--- a/Demos/Device/LowLevel/MassStorage/MassStorage.h
+++ b/Demos/Device/LowLevel/MassStorage/MassStorage.h
@@ -136,10 +136,10 @@
void SetupHardware(void);
void MassStorage_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#if defined(INCLUDE_FROM_MASSSTORAGE_C)
static bool ReadInCommandBlock(void);
diff --git a/Demos/Device/LowLevel/Mouse/Mouse.c b/Demos/Device/LowLevel/Mouse/Mouse.c
index d15f688d6..48f04612b 100644
--- a/Demos/Device/LowLevel/Mouse/Mouse.c
+++ b/Demos/Device/LowLevel/Mouse/Mouse.c
@@ -96,7 +96,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -108,7 +108,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops the USB management and Mouse reporting tasks.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Indicate USB not ready */
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -117,7 +117,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
* of the USB device after enumeration - the device endpoints are configured and the mouse reporting task started.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -131,11 +131,11 @@ void EVENT_USB_ConfigurationChanged(void)
}
}
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
+/** 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Handle HID Class specific requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/LowLevel/Mouse/Mouse.h b/Demos/Device/LowLevel/Mouse/Mouse.h
index 8ff8b8fc3..b244ffa58 100644
--- a/Demos/Device/LowLevel/Mouse/Mouse.h
+++ b/Demos/Device/LowLevel/Mouse/Mouse.h
@@ -101,10 +101,10 @@
void SetupHardware(void);
void Mouse_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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 CreateMouseReport(USB_MouseReport_Data_t* ReportData);
diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
index ca38c24d6..b722187c6 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
+++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
@@ -79,7 +79,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -88,7 +88,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops all the relevant tasks.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Indicate USB not ready */
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -97,7 +97,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host sets the current configuration
* of the USB device after enumeration, and configures the RNDIS device endpoints and starts the relevant tasks.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -125,11 +125,11 @@ void EVENT_USB_ConfigurationChanged(void)
}
}
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
+/** 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Process RNDIS class commands */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h
index 5cbddee52..3ae896607 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h
+++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h
@@ -94,9 +94,9 @@
void RNDIS_Task(void);
void Ethernet_Task(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c
index 2765064f7..bb1b4da2d 100644
--- a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c
+++ b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c
@@ -89,7 +89,7 @@ void SetupHardware(void)
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_Connect(void)
+void EVENT_USB_Device_Connect(void)
{
/* Indicate USB enumerating */
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -98,7 +98,7 @@ void EVENT_USB_Connect(void)
/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via
* the status LEDs and stops the USB management and CDC management tasks.
*/
-void EVENT_USB_Disconnect(void)
+void EVENT_USB_Device_Disconnect(void)
{
/* Reset Tx and Rx buffers, device disconnected */
Buffer_Initialize(&Rx_Buffer);
@@ -111,7 +111,7 @@ void EVENT_USB_Disconnect(void)
/** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration
* of the USB device after enumeration - the device endpoints are configured and the CDC management task started.
*/
-void EVENT_USB_ConfigurationChanged(void)
+void EVENT_USB_Device_ConfigurationChanged(void)
{
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
@@ -137,13 +137,16 @@ void EVENT_USB_ConfigurationChanged(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
}
+
+ /* Reset line encoding baud rate so that the host knows to send new values */
+ LineEncoding.BaudRateBPS = 0;
}
-/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
+/** 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.
*/
-void EVENT_USB_UnhandledControlPacket(void)
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
/* Process CDC specific control requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.h b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.h
index 51c47c943..d9567a154 100644
--- a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.h
+++ b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.h
@@ -178,9 +178,9 @@
void CDC_Task(void);
void ReconfigureUSART(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_UnhandledControlPacket(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);
#endif
diff --git a/Demos/Host/ClassDriver/CDCHost/CDCHost.c b/Demos/Host/ClassDriver/CDCHost/CDCHost.c
index 6678b2276..92a558ca2 100644
--- a/Demos/Host/ClassDriver/CDCHost/CDCHost.c
+++ b/Demos/Host/ClassDriver/CDCHost/CDCHost.c
@@ -130,7 +130,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR("Device Attached.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -139,7 +139,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR("\r\nDevice Unattached.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -148,13 +148,13 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
-void EVENT_USB_HostError(const uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
USB_ShutDown();
@@ -168,7 +168,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/ClassDriver/CDCHost/CDCHost.h b/Demos/Host/ClassDriver/CDCHost/CDCHost.h
index c219a193b..87a0bbcac 100644
--- a/Demos/Host/ClassDriver/CDCHost/CDCHost.h
+++ b/Demos/Host/ClassDriver/CDCHost/CDCHost.h
@@ -66,10 +66,10 @@
/* Function Prototypes: */
void SetupHardware(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
#endif
diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.c b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
index ec4316386..76a1238ca 100644
--- a/Demos/Host/ClassDriver/MouseHost/MouseHost.c
+++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
@@ -132,7 +132,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR("Device Attached.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -141,7 +141,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR("\r\nDevice Unattached.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -150,13 +150,13 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
-void EVENT_USB_HostError(const uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
USB_ShutDown();
@@ -170,7 +170,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.h b/Demos/Host/ClassDriver/MouseHost/MouseHost.h
index 02878257d..9f92be086 100644
--- a/Demos/Host/ClassDriver/MouseHost/MouseHost.h
+++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.h
@@ -66,10 +66,10 @@
/* Function Prototypes: */
void SetupHardware(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
#endif
diff --git a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
index a52ba7cb6..25c15a922 100644
--- a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
+++ b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
@@ -75,26 +75,26 @@ void SetupHardware(void)
USB_Init();
}
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR(ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
-void EVENT_USB_HostError(uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(uint8_t ErrorCode)
{
USB_ShutDown();
@@ -105,7 +105,7 @@ void EVENT_USB_HostError(uint8_t ErrorCode)
for(;;);
}
-void EVENT_USB_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
@@ -158,9 +158,6 @@ void Bluetooth_Management_Task(void)
break;
}
- USB_HostState = HOST_STATE_Configured;
- break;
- case HOST_STATE_Configured:
puts_P(PSTR("Getting Config Data.\r\n"));
/* Get and process the configuration descriptor data */
@@ -183,7 +180,7 @@ void Bluetooth_Management_Task(void)
puts_P(PSTR("Bluetooth Dongle Enumerated.\r\n"));
- USB_HostState = HOST_STATE_Ready;
+ USB_HostState = HOST_STATE_Configured;
break;
}
}
diff --git a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.h b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.h
index d44a38a2a..0246bff82 100644
--- a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.h
+++ b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.h
@@ -70,11 +70,11 @@
void Bluetooth_Management_Task(void);
/* Event Handlers: */
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationComplete(void);
- void EVENT_USB_HostError(uint8_t ErrorCode);
- void EVENT_USB_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode);
/* Function Prototypes: */
void SetupHardware(void);
diff --git a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c
index 54291bf75..3b8bcde89 100644
--- a/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c
+++ b/Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c
@@ -398,7 +398,7 @@ void Bluetooth_ProcessHCICommands(void)
{
while (!(Bluetooth_GetNextHCIEventHeader()))
{
- if (USB_DeviceState == DEVICE_STATE_Unattached)
+ if (USB_HostState == HOST_STATE_Unattached)
return;
}
diff --git a/Demos/Host/LowLevel/CDCHost/CDCHost.c b/Demos/Host/LowLevel/CDCHost/CDCHost.c
index e20fa2cfc..a423b90eb 100644
--- a/Demos/Host/LowLevel/CDCHost/CDCHost.c
+++ b/Demos/Host/LowLevel/CDCHost/CDCHost.c
@@ -73,7 +73,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -82,7 +82,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR(ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -91,13 +91,13 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
-void EVENT_USB_HostError(const uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
USB_ShutDown();
@@ -111,7 +111,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/LowLevel/CDCHost/CDCHost.h b/Demos/Host/LowLevel/CDCHost/CDCHost.h
index 9e1d63864..95faa7d53 100644
--- a/Demos/Host/LowLevel/CDCHost/CDCHost.h
+++ b/Demos/Host/LowLevel/CDCHost/CDCHost.h
@@ -117,10 +117,10 @@
void SetupHardware(void);
void CDC_Host_Task(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
#endif
diff --git a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
index d36064333..33397b643 100644
--- a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
+++ b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
@@ -73,7 +73,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -82,7 +82,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Unattached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -91,13 +91,13 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
-void EVENT_USB_HostError(const uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
USB_ShutDown();
@@ -111,7 +111,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
index 415dae023..4a64b5791 100644
--- a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
+++ b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
@@ -84,11 +84,11 @@
void SetupHardware(void);
void HID_Host_Task(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
void ReadNextReport(void);
void WriteNextReport(uint8_t* ReportOUTData, uint8_t ReportIndex, uint8_t ReportType, uint16_t ReportLength);
diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
index 1a53526ba..f40e7b9a0 100644
--- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
+++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
@@ -73,7 +73,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -82,7 +82,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Unattached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -91,13 +91,13 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
-void EVENT_USB_HostError(const uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
USB_ShutDown();
@@ -111,7 +111,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
index 98a9e37a7..aed6ca629 100644
--- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
+++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
@@ -84,11 +84,11 @@
void Keyboard_HID_Task(void);
void SetupHardware(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
void ReadNextReport(void);
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
index 2cc08a13d..ef73b77b0 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
@@ -73,7 +73,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -82,7 +82,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR(ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -91,13 +91,13 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
-void EVENT_USB_HostError(const uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
USB_ShutDown();
@@ -111,7 +111,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h
index 90db94a2a..8453bb661 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h
@@ -67,11 +67,11 @@
void Keyboard_HID_Task(void);
void SetupHardware(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
void ProcessKeyboardReport(uint8_t* KeyboardReport);
diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
index 6cfe669f6..60eb98a04 100644
--- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
+++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
@@ -79,7 +79,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -88,7 +88,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR(ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -97,7 +97,7 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
@@ -117,7 +117,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h
index 1307a1af2..c07109919 100644
--- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h
+++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h
@@ -76,11 +76,11 @@
void MassStorage_Task(void);
void SetupHardware(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
void ShowDiskReadError(char* CommandString, bool FailedAtSCSILayer, uint8_t ErrorCode);
diff --git a/Demos/Host/LowLevel/MouseHost/MouseHost.c b/Demos/Host/LowLevel/MouseHost/MouseHost.c
index b98f4bf96..44147481b 100644
--- a/Demos/Host/LowLevel/MouseHost/MouseHost.c
+++ b/Demos/Host/LowLevel/MouseHost/MouseHost.c
@@ -73,7 +73,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -82,7 +82,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Unattached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -91,13 +91,13 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
-void EVENT_USB_HostError(const uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
USB_ShutDown();
@@ -111,7 +111,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/LowLevel/MouseHost/MouseHost.h b/Demos/Host/LowLevel/MouseHost/MouseHost.h
index 1abd56068..4a3838289 100644
--- a/Demos/Host/LowLevel/MouseHost/MouseHost.h
+++ b/Demos/Host/LowLevel/MouseHost/MouseHost.h
@@ -84,11 +84,11 @@
void Mouse_HID_Task(void);
void SetupHardware(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
void ReadNextReport(void);
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
index 8ea5e7201..b5b41ce67 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
+++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
@@ -73,7 +73,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -82,7 +82,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Unattached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -91,13 +91,13 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
-void EVENT_USB_HostError(const uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
USB_ShutDown();
@@ -111,7 +111,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h
index 71d11a1ee..c5bfce52f 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h
+++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h
@@ -67,11 +67,11 @@
void Mouse_HID_Task(void);
void SetupHardware(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
void ProcessMouseReport(uint8_t* MouseReport);
diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c
index bbda0c24b..bd84f19eb 100644
--- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c
+++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c
@@ -73,7 +73,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -82,7 +82,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR(ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -91,13 +91,13 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
-void EVENT_USB_HostError(uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(uint8_t ErrorCode)
{
USB_ShutDown();
@@ -111,7 +111,7 @@ void EVENT_USB_HostError(uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h
index f6afcc796..db7a9fe7e 100644
--- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h
+++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h
@@ -70,11 +70,11 @@
#define LEDMASK_USB_BUSY (LEDS_LED2)
/* Function Prototypes: */
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationComplete(void);
- void EVENT_USB_HostError(uint8_t ErrorCode);
- void EVENT_USB_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode);
void SetupHardware(void);
diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c
index ca0771a94..6c56d5f3e 100644
--- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c
+++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c
@@ -74,7 +74,7 @@ void SetupHardware(void)
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
* starts the library USB task to begin the enumeration and USB management process.
*/
-void EVENT_USB_DeviceAttached(void)
+void EVENT_USB_Host_DeviceAttached(void)
{
puts_P(PSTR(ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
@@ -83,7 +83,7 @@ void EVENT_USB_DeviceAttached(void)
/** Event handler for the USB_DeviceUnattached event. This indicates that a device has been removed from the host, and
* stops the library USB task management process.
*/
-void EVENT_USB_DeviceUnattached(void)
+void EVENT_USB_Host_DeviceUnattached(void)
{
puts_P(PSTR(ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
@@ -92,13 +92,13 @@ void EVENT_USB_DeviceUnattached(void)
/** Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully
* enumerated by the host and is now ready to be used by the application.
*/
-void EVENT_USB_DeviceEnumerationComplete(void)
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
LEDs_SetAllLEDs(LEDMASK_USB_READY);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
-void EVENT_USB_HostError(const uint8_t ErrorCode)
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
USB_ShutDown();
@@ -112,7 +112,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.h b/Demos/Host/LowLevel/StillImageHost/StillImageHost.h
index 1896b8fe5..89956e0f5 100644
--- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.h
+++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.h
@@ -72,11 +72,11 @@
void StillImage_Task(void);
void SetupHardware(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
void UnicodeToASCII(uint8_t* restrict UnicodeString, char* restrict Buffer);
void ShowCommandError(uint8_t ErrorCode, bool ResponseCodeError);
diff --git a/Demos/OTG/TestApp/TestEvents.c b/Demos/OTG/TestApp/TestEvents.c
index d0bc805db..aee2b16ae 100644
--- a/Demos/OTG/TestApp/TestEvents.c
+++ b/Demos/OTG/TestApp/TestEvents.c
@@ -54,71 +54,17 @@ static void Abort_Program(void)
for (;;);
}
-/** Event handler for the USB_VBUSChange event. When fired, the event is logged to the USART. */
-void EVENT_USB_VBUSChange(void)
-{
- puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "VBUS Change\r\n" ESC_FG_WHITE));
-}
-
-/** Event handler for the USB_VBUSConnect event. When fired, the event is logged to the USART. */
-void EVENT_USB_VBUSConnect(void)
-{
- puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "VBUS +\r\n" ESC_FG_WHITE));
-}
-
-/** Event handler for the USB_VBUSDisconnect event. When fired, the event is logged to the USART. */
-void EVENT_USB_VBUSDisconnect(void)
-{
- puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "VBUS -\r\n" ESC_FG_WHITE));
-}
-
-/**
- * Event handler for the USB_Connect event. When fired, the event is logged to the USART and the
- * USB task started.
- */
-void EVENT_USB_Connect(void)
-{
- puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "USB +\r\n" ESC_FG_WHITE));
-}
-
-/**
- * Event handler for the USB_Disconnect event. When fired, the event is logged to the USART and the
- * USB task stopped.
- */
-void EVENT_USB_Disconnect(void)
-{
- puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "USB -\r\n" ESC_FG_WHITE));
-}
-
-/** Event handler for the USB_Suspend event. When fired, the event is logged to the USART. */
-void EVENT_USB_Suspend(void)
-{
- puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "USB Sleep\r\n" ESC_FG_WHITE));
-}
-
-/** Event handler for the USB_WakeUp event. When fired, the event is logged to the USART. */
-void EVENT_USB_WakeUp(void)
-{
- puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "USB Wakeup\r\n" ESC_FG_WHITE));
-}
-
-/** Event handler for the USB_Reset event. When fired, the event is logged to the USART. */
-void EVENT_USB_Reset(void)
-{
- puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "USB Reset\r\n" ESC_FG_WHITE));
-}
-
/** Event handler for the USB_UIDChange event. When fired, the event is logged to the USART. */
void EVENT_USB_UIDChange(void)
{
char* ModeStrPtr;
- puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "UID Change\r\n"));
+ puts_P(PSTR(ESC_FG_RED EVENT_PREFIX "UID Change\r\n"));
if (USB_CurrentMode == USB_MODE_DEVICE)
- ModeStrPtr = PSTR("HOST");
- else if (USB_CurrentMode == USB_MODE_HOST)
ModeStrPtr = PSTR("DEVICE");
+ else if (USB_CurrentMode == USB_MODE_HOST)
+ ModeStrPtr = PSTR("HOST");
else
ModeStrPtr = PSTR("N/A");
@@ -126,7 +72,7 @@ void EVENT_USB_UIDChange(void)
}
/**
- * Event handler for the USB_PowerOnFail event. When fired, the event is logged to the USART and the program
+ * Event handler for the USB_InitFailure event. When fired, the event is logged to the USART and the program
* execution aborted.
*/
void EVENT_USB_InitFailure(const uint8_t ErrorCode)
@@ -148,29 +94,38 @@ void EVENT_USB_InitFailure(const uint8_t ErrorCode)
Abort_Program();
}
-/**
- * Event handler for the USB_HostError event. When fired, the event is logged to the USART and the program
- * execution aborted.
- */
-void EVENT_USB_HostError(const uint8_t ErrorCode)
+/** Event handler for the USB_Device_Connect event. When fired, the event is logged to the USART. */
+void EVENT_USB_Device_Connect(void)
{
- puts_P(PSTR(ESC_FG_RED EVENT_PREFIX "Host Mode Error\r\n"));
- printf_P(PSTR(" -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);
+ puts_P(PSTR(ESC_FG_GREEN EVENT_PREFIX "USB Connect\r\n" ESC_FG_WHITE));
+}
- Abort_Program();
+/** Event handler for the USB_Device_Disconnect event. When fired, the event is logged to the USART. */
+void EVENT_USB_Device_Disconnect(void)
+{
+ puts_P(PSTR(ESC_FG_GREEN EVENT_PREFIX "USB Disconnect\r\n" ESC_FG_WHITE));
}
-/** Event handler for the USB_DeviceEnumerationFailed event. When fired, the event is logged to the USART. */
-void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+/** Event handler for the USB_Device_Suspend event. When fired, the event is logged to the USART. */
+void EVENT_USB_Device_Suspend(void)
{
- puts_P(PSTR(ESC_FG_RED EVENT_PREFIX "Dev Enum Error\r\n"));
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
- printf_P(PSTR(" -- Sub Error Code %d\r\n"), SubErrorCode);
- printf_P(PSTR(" -- In State %d\r\n" ESC_FG_WHITE), USB_HostState);
+ puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "USB Sleep\r\n" ESC_FG_WHITE));
+}
+
+/** Event handler for the USB_Device_WakeUp event. When fired, the event is logged to the USART. */
+void EVENT_USB_Device_WakeUp(void)
+{
+ puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "USB Wakeup\r\n" ESC_FG_WHITE));
+}
+
+/** Event handler for the USB_Device_Reset event. When fired, the event is logged to the USART. */
+void EVENT_USB_Device_Reset(void)
+{
+ puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "USB Reset\r\n" ESC_FG_WHITE));
}
-/** Event handler for the USB_UnhandledControlPacket event. When fired, the event is logged to the USART. */
-void EVENT_USB_UnhandledControlPacket(void)
+/** Event handler for the USB_Device_UnhandledControlRequest event. When fired, the event is logged to the USART. */
+void EVENT_USB_Device_UnhandledControlRequest(void)
{
puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "Ctrl Request\r\n"));
printf_P(PSTR(" -- Req Data %d\r\n"), USB_ControlRequest.bRequest);
@@ -178,26 +133,47 @@ void EVENT_USB_UnhandledControlPacket(void)
printf_P(PSTR(" -- Req Length %d\r\n" ESC_FG_WHITE), USB_ControlRequest.wLength);
}
-/** Event handler for the USB_ConfigurationChanged event. When fired, the event is logged to the USART. */
-void EVENT_USB_ConfigurationChanged(void)
+/** Event handler for the USB_Device_ConfigurationChanged event. When fired, the event is logged to the USART. */
+void EVENT_USB_Device_ConfigurationChanged(void)
{
puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "Configuration Number Changed\r\n" ESC_FG_WHITE));
}
-/** Event handler for the USB_DeviceAttached event. When fired, the event is logged to the USART. */
-void EVENT_USB_DeviceAttached(void)
+/**
+ * Event handler for the USB_Host_HostError event. When fired, the event is logged to the USART and the program
+ * execution aborted.
+ */
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
- puts_P(PSTR(ESC_FG_GREEN EVENT_PREFIX "Device +\r\n" ESC_FG_WHITE));
+ puts_P(PSTR(ESC_FG_RED EVENT_PREFIX "Host Mode Error\r\n"));
+ printf_P(PSTR(" -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);
+
+ Abort_Program();
}
-/** Event handler for the USB_DeviceUnattached event. When fired, the event is logged to the USART. */
-void EVENT_USB_DeviceUnattached(void)
+/** Event handler for the USB_Host_DeviceEnumerationFailed event. When fired, the event is logged to the USART. */
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
{
- puts_P(PSTR(ESC_FG_GREEN EVENT_PREFIX "Device -\r\n" ESC_FG_WHITE));
+ puts_P(PSTR(ESC_FG_RED EVENT_PREFIX "Dev Enum Error\r\n"));
+ printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
+ printf_P(PSTR(" -- Sub Error Code %d\r\n"), SubErrorCode);
+ printf_P(PSTR(" -- In State %d\r\n" ESC_FG_WHITE), USB_HostState);
}
-/** Event handler for the USB_DeviceEnumerationComplete event. When fired, the event is logged to the USART. */
-void EVENT_USB_DeviceEnumerationComplete(void)
+/** Event handler for the USB_Host_DeviceEnumerationComplete event. When fired, the event is logged to the USART. */
+void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR(ESC_FG_YELLOW EVENT_PREFIX "Device Enumeration Complete\r\n" ESC_FG_WHITE));
}
+
+/** Event handler for the USB_Host_DeviceAttached event. When fired, the event is logged to the USART. */
+void EVENT_USB_Host_DeviceAttached(void)
+{
+ puts_P(PSTR(ESC_FG_GREEN EVENT_PREFIX "Device Attached\r\n" ESC_FG_WHITE));
+}
+
+/** Event handler for the USB_Host_DeviceUnattached event. When fired, the event is logged to the USART. */
+void EVENT_USB_Host_DeviceUnattached(void)
+{
+ puts_P(PSTR(ESC_FG_GREEN EVENT_PREFIX "Device Unattached\r\n" ESC_FG_WHITE));
+}
diff --git a/Demos/OTG/TestApp/TestEvents.h b/Demos/OTG/TestApp/TestEvents.h
index b82936fb4..ee00dd728 100644
--- a/Demos/OTG/TestApp/TestEvents.h
+++ b/Demos/OTG/TestApp/TestEvents.h
@@ -54,22 +54,19 @@
static void Abort_Program(void) ATTR_NO_RETURN;
#endif
- void EVENT_USB_VBUSChange(void);
- void EVENT_USB_VBUSConnect(void);
- void EVENT_USB_VBUSDisconnect(void);
- void EVENT_USB_Connect(void);
- void EVENT_USB_Disconnect(void);
void EVENT_USB_InitFailure(const uint8_t ErrorCode);
void EVENT_USB_UIDChange(void);
- void EVENT_USB_HostError(const uint8_t ErrorCode);
- void EVENT_USB_DeviceAttached(void);
- void EVENT_USB_DeviceUnattached(void);
- void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
- void EVENT_USB_DeviceEnumerationComplete(void);
- void EVENT_USB_UnhandledControlPacket(void);
- void EVENT_USB_ConfigurationChanged(void);
- void EVENT_USB_Suspend(void);
- void EVENT_USB_WakeUp(void);
- void EVENT_USB_Reset(void);
+ void EVENT_USB_Host_HostError(const uint8_t ErrorCode);
+ void EVENT_USB_Host_DeviceAttached(void);
+ void EVENT_USB_Host_DeviceUnattached(void);
+ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode);
+ void EVENT_USB_Host_DeviceEnumerationComplete(void);
+ void EVENT_USB_Device_Connect(void);
+ void EVENT_USB_Device_Disconnect(void);
+ void EVENT_USB_Device_ConfigurationChanged(void);
+ void EVENT_USB_Device_ConfigurationChanged(void);
+ void EVENT_USB_Device_Suspend(void);
+ void EVENT_USB_Device_WakeUp(void);
+ void EVENT_USB_Device_Reset(void);
#endif