Add missing device deconfiguration-on-error statements to the host mode demos and projects.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user