Device mode class driver callbacks are now fired before the control request status...
[pub/USBasp.git] / Demos / Device / LowLevel / AudioInput / AudioInput.c
index 98c2e8b..aa8967c 100644 (file)
@@ -47,6 +47,7 @@ int main(void)
        SetupHardware();\r
 \r
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
        SetupHardware();\r
 \r
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+       sei();\r
        \r
        for (;;)\r
        {\r
        \r
        for (;;)\r
        {\r
@@ -72,7 +73,7 @@ void SetupHardware(void)
        USB_Init();\r
        \r
        /* Start the ADC conversion in free running mode */\r
        USB_Init();\r
        \r
        /* Start the ADC conversion in free running mode */\r
-       ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | MIC_IN_ADC_CHANNEL);\r
+       ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | MIC_IN_ADC_MUX_MASK);\r
 }\r
 \r
 /** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs, and\r
 }\r
 \r
 /** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs, and\r
@@ -171,7 +172,7 @@ void USB_Audio_Task(void)
                \r
                #if defined(MICROPHONE_BIASED_TO_HALF_RAIL)\r
                /* Microphone is biased to half rail voltage, subtract the bias from the sample value */\r
                \r
                #if defined(MICROPHONE_BIASED_TO_HALF_RAIL)\r
                /* Microphone is biased to half rail voltage, subtract the bias from the sample value */\r
-               AudioSample -= (SAMPLE_MAX_RANGE / 2));\r
+               AudioSample -= (SAMPLE_MAX_RANGE / 2);\r
                #endif\r
 \r
                /* Write the sample to the buffer */\r
                #endif\r
 \r
                /* Write the sample to the buffer */\r