X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/137ce280c1e9c33e9393f1dfd6bb160c131bd1a4..d4b45e8502a27c0f5ad3e26eabd2b30e84c20bac:/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c?ds=sidebyside diff --git a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c index ab93721ae..3e4a69a05 100644 --- a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c +++ b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2011. + Copyright (C) Dean Camera, 2012. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -96,7 +96,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK) LEDs_SetAllLEDs(LEDMask); } - + Pipe_SelectPipe(PrevPipe); } @@ -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; } @@ -191,7 +193,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void) TIMSK0 = (1 << OCIE0A); OCR0A = ((F_CPU / 8 / 48000) - 1); TCCR0A = (1 << WGM01); // CTC mode - TCCR0B = (1 << CS01); // Fcpu/8 speed + TCCR0B = (1 << CS01); // Fcpu/8 speed /* Set speaker as output */ DDRC |= (1 << 6);