projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
137ce28
)
Add missing device deconfiguration-on-error statements to the host mode demos and...
author
Dean Camera
<dean@fourwalledcubicle.com>
Fri, 8 Jul 2011 07:56:40 +0000
(07:56 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Fri, 8 Jul 2011 07:56:40 +0000
(07:56 +0000)
Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/MouseHost/MouseHost.c
patch
|
blob
|
blame
|
history
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
patch
|
blob
|
blame
|
history
Projects/Webserver/USBHostMode.c
patch
|
blob
|
blame
|
history
diff --git
a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
index
ab93721
..
f789f63
100644
(file)
--- 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);
{
puts_P(PSTR("Error Enabling Audio Stream.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
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);
{
puts_P(PSTR("Error Setting Audio Sampling Frequency.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
return;
}
diff --git
a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
index
c43b3ab
..
c8dc3a3
100644
(file)
--- 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);
{
puts_P(PSTR("Error Enabling Audio Stream.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
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);
{
puts_P(PSTR("Error Setting Audio Sampling Frequency.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
return;
}
diff --git
a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
index
e74dfe0
..
d118c85
100644
(file)
--- 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);
{
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;
}
return;
}
diff --git
a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
index
abc038e
..
81c877a
100644
(file)
--- 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);
{
puts_P(PSTR("Could not Set Boot Protocol Mode.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
return;
}
diff --git
a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
index
273cdde
..
3bf5dd2
100644
(file)
--- 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);
{
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;
}
return;
}
diff --git
a/Demos/Host/ClassDriver/MouseHost/MouseHost.c
b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
index
5c94ecd
..
ebdc4e2
100644
(file)
--- 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);
{
puts_P(PSTR("Could not Set Boot Protocol Mode.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
return;
}
diff --git
a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
index
b71554f
..
d8a6b74
100644
(file)
--- 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);
{
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;
}
return;
}
diff --git
a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
index
4fdb661
..
704ddea
100644
(file)
--- 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);
" -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
return;
}
diff --git
a/Projects/Webserver/USBHostMode.c
b/Projects/Webserver/USBHostMode.c
index
98467a1
..
1620cb5
100644
(file)
--- a/
Projects/Webserver/USBHostMode.c
+++ b/
Projects/Webserver/USBHostMode.c
@@
-120,6
+120,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
if (RNDIS_Host_InitializeDevice(&Ethernet_RNDIS_Interface_Host) != HOST_SENDCONTROL_Successful)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
if (RNDIS_Host_InitializeDevice(&Ethernet_RNDIS_Interface_Host) != HOST_SENDCONTROL_Successful)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
return;
}
@@
-128,6
+129,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
&PacketFilter, sizeof(PacketFilter)) != HOST_SENDCONTROL_Successful)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
&PacketFilter, sizeof(PacketFilter)) != HOST_SENDCONTROL_Successful)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
return;
}
@@
-135,6
+137,7
@@
void EVENT_USB_Host_DeviceEnumerationComplete(void)
&MACAddress, sizeof(MACAddress)) != HOST_SENDCONTROL_Successful)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
&MACAddress, sizeof(MACAddress)) != HOST_SENDCONTROL_Successful)
{
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ USB_Host_SetDeviceConfiguration(0);
return;
}
return;
}