aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-07-08 07:56:40 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-07-08 07:56:40 +0000
commitd9c16402b9059628a9c45a129a99cae86b48aa5d (patch)
treef16c77375babc841d2b712a526b65cfb16199089 /Demos/Host
parent137ce280c1e9c33e9393f1dfd6bb160c131bd1a4 (diff)
downloadlufa-d9c16402b9059628a9c45a129a99cae86b48aa5d.tar.gz
lufa-d9c16402b9059628a9c45a129a99cae86b48aa5d.tar.bz2
lufa-d9c16402b9059628a9c45a129a99cae86b48aa5d.zip
Add missing device deconfiguration-on-error statements to the host mode demos and projects.
Diffstat (limited to 'Demos/Host')
-rw-r--r--Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c2
-rw-r--r--Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c2
-rw-r--r--Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c1
-rw-r--r--Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c1
-rw-r--r--Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c1
-rw-r--r--Demos/Host/ClassDriver/MouseHost/MouseHost.c1
-rw-r--r--Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c1
-rw-r--r--Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c1
8 files changed, 10 insertions, 0 deletions
diff --git a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
index ab93721ae..f789f6318 100644
--- a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
+++ b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
@@ -174,6 +174,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Error Enabling Audio Stream.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
@@ -184,6 +185,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Error Setting Audio Sampling Frequency.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
diff --git a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
index c43b3ab3a..c8dc3a35d 100644
--- a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
+++ b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
@@ -182,6 +182,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Error Enabling Audio Stream.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
@@ -192,6 +193,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Error Setting Audio Sampling Frequency.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
index e74dfe06f..d118c850b 100644
--- a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
+++ b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
@@ -206,6 +206,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Error Setting Report Protocol Mode or Not a Valid Joystick.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
index abc038e22..81c877afa 100644
--- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
+++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
@@ -202,6 +202,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Could not Set Boot Protocol Mode.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
index 273cdde67..3bf5dd254 100644
--- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
@@ -228,6 +228,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Error Setting Report Protocol Mode or Not a Valid Keyboard.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.c b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
index 5c94ecda1..ebdc4e28c 100644
--- a/Demos/Host/ClassDriver/MouseHost/MouseHost.c
+++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
@@ -185,6 +185,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Could not Set Boot Protocol Mode.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
index b71554f48..d8a6b74e6 100644
--- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
+++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
@@ -215,6 +215,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
puts_P(PSTR("Error Setting Report Protocol Mode or Not a Valid Mouse.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
diff --git a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
index 4fdb661fa..704ddea98 100644
--- a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
+++ b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
@@ -134,6 +134,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
" -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}