Add API support signature to the CDC and DFU class bootloaders, so that the applicati...
[pub/USBasp.git] / Demos / Host / ClassDriver / AudioInputHost / AudioInputHost.c
index ab93721..a8a51b8 100644 (file)
@@ -96,7 +96,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
 
                LEDs_SetAllLEDs(LEDMask);
        }
 
                LEDs_SetAllLEDs(LEDMask);
        }
-       
+
        Pipe_SelectPipe(PrevPipe);
 }
 
        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);
        {
                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;
        }
 
@@ -191,7 +193,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
        TIMSK0  = (1 << OCIE0A);
        OCR0A   = ((F_CPU / 8 / 48000) - 1);
        TCCR0A  = (1 << WGM01);  // CTC mode
        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);
 
        /* Set speaker as output */
        DDRC   |= (1 << 6);