Ensure that the Keyboard and Mouse demos adhere to the boot protocol specification...
[pub/lufa.git] / Demos / AudioInput / AudioInput.c
index f5474b4..f41306f 100644 (file)
  *  Main source file for the Audio Input demo. This file contains the main tasks of the demo and\r
  *  is responsible for the initial application hardware configuration.\r
  */\r
\r
-/* ---  Project Configuration  --- */\r
-//#define MICROPHONE_BIASED_TO_HALF_RAIL\r
-/* --- --- --- --- --- --- --- --- */\r
 \r
 #include "AudioInput.h"\r
 \r
@@ -63,8 +59,8 @@ int main(void)
        MCUSR &= ~(1 << WDRF);\r
        wdt_disable();\r
 \r
-       /* Disable Clock Division */\r
-       SetSystemClockPrescaler(0);\r
+       /* Disable clock division */\r
+       clock_prescale_set(clock_div_1);\r
        \r
        /* Hardware Initialization */\r
        LEDs_Init();\r
@@ -163,7 +159,8 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
                                        Scheduler_SetTaskMode(USB_Audio_Task, TASK_STOP);                               \r
                                }\r
                                \r
-                               /* Handshake the request */\r
+                               /* Acknowledge status stage */\r
+                               while (!(Endpoint_IsSetupINReady()));\r
                                Endpoint_ClearSetupIN();\r
                        }\r
 \r