Added board driver support for the Busware TUL board.
[pub/lufa.git] / Demos / Device / LowLevel / AudioInput / AudioInput.c
index ac819c1..f62fcbe 100644 (file)
@@ -143,6 +143,15 @@ void EVENT_USB_Device_ControlRequest(void)
                        }
 
                        break;
+               case AUDIO_REQ_GetStatus:
+                       /* Get Status request can be directed at either the interface or endpoint, neither is currently used
+                        * according to the latest USB Audio 1.0 standard, but must be ACKed with no data when requested */
+                       if ((USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) ||
+                           (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_ENDPOINT)))
+                       {
+                               Endpoint_ClearSETUP();
+                               Endpoint_ClearStatusStage();
+                       }
        }
 }
 
@@ -180,7 +189,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
                #endif
 
                /* Write the sample to the buffer */
-               Endpoint_Write_Word_LE(AudioSample);
+               Endpoint_Write_16_LE(AudioSample);
 
                /* Check to see if the bank is now full */
                if (!(Endpoint_IsReadWriteAllowed()))