Add error message for debugging purposes to the low level AudioInputHost and AudioOutputHost demos, if the request to set the audio sample rate fails.

This commit is contained in:
Dean Camera 2012-09-14 15:19:43 +00:00
parent df14c97519
commit 5f1428bb50
3 changed files with 7 additions and 0 deletions

View file

@ -152,6 +152,9 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
/* Set the sample rate on the streaming interface endpoint */
if ((ErrorCode = USB_Host_SendControlRequest(&SampleRate)) != HOST_SENDCONTROL_Successful)
{
printf_P(PSTR(ESC_FG_RED "Could not set requested Audio sample rate.\r\n"
" -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
USB_Host_SetDeviceConfiguration(0);
return;