X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/ea922c98d187eb74c31535afa3334ead5bd50526..2731c3a8aef715c2ea27d541e946200bd4fc189f:/Demos/Host/Incomplete/AudioInputHost/AudioInputHost.c diff --git a/Demos/Host/Incomplete/AudioInputHost/AudioInputHost.c b/Demos/Host/Incomplete/AudioInputHost/AudioInputHost.c index 7ac8f0015..6fe869cda 100644 --- a/Demos/Host/Incomplete/AudioInputHost/AudioInputHost.c +++ b/Demos/Host/Incomplete/AudioInputHost/AudioInputHost.c @@ -43,7 +43,7 @@ int main(void) { SetupHardware(); - puts_P(PSTR(ESC_FG_CYAN "Audio Host Demo running.\r\n" ESC_FG_WHITE)); + puts_P(PSTR(ESC_FG_CYAN "Audio Input Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); sei(); @@ -208,7 +208,7 @@ void Audio_Task(void) /* Sample reload timer initialization */ TIMSK0 = (1 << OCIE0A); - OCR0A = ((F_CPU / 8 / 8000) - 1); + OCR0A = ((F_CPU / 8 / 48000) - 1); TCCR0A = (1 << WGM01); // CTC mode TCCR0B = (1 << CS01); // Fcpu/8 speed @@ -216,8 +216,7 @@ void Audio_Task(void) DDRC |= (1 << 6); /* PWM speaker timer initialization */ - TCCR3A = ((1 << WGM30) | (1 << COM3A1) | (1 << COM3A0) - | (1 << COM3B1) | (1 << COM3B0)); // Set on match, clear on TOP + TCCR3A = ((1 << WGM30) | (1 << COM3A1) | (1 << COM3A0)); // Set on match, clear on TOP TCCR3B = ((1 << WGM32) | (1 << CS30)); // Fast 8-Bit PWM, F_CPU speed puts_P(PSTR("Microphone Enumerated.\r\n")); @@ -225,6 +224,7 @@ void Audio_Task(void) USB_HostState = HOST_STATE_Configured; break; case HOST_STATE_Configured: + /* Do nothing - audio stream is handled by the timer interrupt routine */ break; } } @@ -269,6 +269,5 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK) } Pipe_Freeze(); - Pipe_SelectPipe(PrevPipe); }