X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/7f9f97c792dee6875fbca9806422bdd7d6c5a657..a9e0935a90346beb0c981924becc1f55d969a08b:/Demos/Device/LowLevel/AudioInput/AudioInput.c diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c index 98c2e8b3e..aa8967cd0 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.c +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c @@ -47,6 +47,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { @@ -72,7 +73,7 @@ void SetupHardware(void) USB_Init(); /* Start the ADC conversion in free running mode */ - ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | MIC_IN_ADC_CHANNEL); + ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | MIC_IN_ADC_MUX_MASK); } /** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs, and @@ -171,7 +172,7 @@ void USB_Audio_Task(void) #if defined(MICROPHONE_BIASED_TO_HALF_RAIL) /* Microphone is biased to half rail voltage, subtract the bias from the sample value */ - AudioSample -= (SAMPLE_MAX_RANGE / 2)); + AudioSample -= (SAMPLE_MAX_RANGE / 2); #endif /* Write the sample to the buffer */