Renamed NO_CLEARSET_FEATURE_REQUEST compile time token to NO_FEATURELESS_CONTROL_ONLY...
[pub/USBasp.git] / Demos / AudioOutput / AudioOutput.c
index 184910e..87afd36 100644 (file)
@@ -66,8 +66,8 @@ int main(void)
        MCUSR &= ~(1 << WDRF);\r
        wdt_disable();\r
 \r
        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
 \r
        /* Hardware Initialization */\r
        LEDs_Init();\r
@@ -193,7 +193,8 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
                                        Scheduler_SetTaskMode(USB_Audio_Task, TASK_STOP);                               \r
                                }\r
                                \r
                                        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
                                Endpoint_ClearSetupIN();\r
                        }\r
 \r
@@ -249,7 +250,7 @@ TASK(USB_Audio_Task)
                /* Check to see if the bank is now empty */\r
                if (!(Endpoint_ReadWriteAllowed()))\r
                {\r
                /* Check to see if the bank is now empty */\r
                if (!(Endpoint_ReadWriteAllowed()))\r
                {\r
-                       /* Acknowedge the packet, clear the bank ready for the next packet */\r
+                       /* Acknowledge the packet, clear the bank ready for the next packet */\r
                        Endpoint_ClearCurrentBank();\r
                }\r
 \r
                        Endpoint_ClearCurrentBank();\r
                }\r
 \r