Fixed broken LowLevel Audio Out demo sampling frequency configuration (thanks to...
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 28 Sep 2014 05:06:31 +0000 (15:06 +1000)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 28 Sep 2014 05:06:31 +0000 (15:06 +1000)
Demos/Device/LowLevel/AudioOutput/AudioOutput.c
LUFA/DoxygenPages/ChangeLog.txt

index 4f40c70..2bccfde 100644 (file)
@@ -198,7 +198,7 @@ void EVENT_USB_Device_ControlRequest(void)
 
                                        Endpoint_ClearSETUP();
                                        Endpoint_Read_Control_Stream_LE(SampleRate, sizeof(SampleRate));
 
                                        Endpoint_ClearSETUP();
                                        Endpoint_Read_Control_Stream_LE(SampleRate, sizeof(SampleRate));
-                                       Endpoint_ClearOUT();
+                                       Endpoint_ClearIN();
 
                                        /* Set the new sampling frequency to the value given by the host */
                                        CurrentAudioSampleFrequency = (((uint32_t)SampleRate[2] << 16) | ((uint32_t)SampleRate[1] << 8) | (uint32_t)SampleRate[0]);
 
                                        /* Set the new sampling frequency to the value given by the host */
                                        CurrentAudioSampleFrequency = (((uint32_t)SampleRate[2] << 16) | ((uint32_t)SampleRate[1] << 8) | (uint32_t)SampleRate[0]);
@@ -210,7 +210,7 @@ void EVENT_USB_Device_ControlRequest(void)
 
                        break;
                case AUDIO_REQ_GetCurrent:
 
                        break;
                case AUDIO_REQ_GetCurrent:
-                       if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_ENDPOINT))
+                       if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT))
                        {
                                /* Extract out the relevant request information to get the target Endpoint address and control being retrieved */
                                uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
                        {
                                /* Extract out the relevant request information to get the target Endpoint address and control being retrieved */
                                uint8_t EndpointAddress = (uint8_t)USB_ControlRequest.wIndex;
index ef1fe6c..ce241e8 100644 (file)
@@ -38,6 +38,7 @@
   *   - Fixed spurious 0xFE USART byte sent in the USBtoSerial project when the baud rate is changed (thanks to Carl Kjeldsen)
   *   - Fixed blocking USART reads causing low throughput on slow baud rates in the USBtoSerial project (thanks to Nevada Smith)
   *   - Fixed USART reception overrun corrupting the internal buffers in the USBtoSerial project (thanks to Nevada Smith)
   *   - Fixed spurious 0xFE USART byte sent in the USBtoSerial project when the baud rate is changed (thanks to Carl Kjeldsen)
   *   - Fixed blocking USART reads causing low throughput on slow baud rates in the USBtoSerial project (thanks to Nevada Smith)
   *   - Fixed USART reception overrun corrupting the internal buffers in the USBtoSerial project (thanks to Nevada Smith)
+  *   - Fixed broken LowLevel Audio Out demo sampling frequency configuration (thanks to Torsten Duwe)
   *
   *  \section Sec_ChangeLog140302 Version 140302
   *  <b>New:</b>
   *
   *  \section Sec_ChangeLog140302 Version 140302
   *  <b>New:</b>