Mark build test makefiles as being incompatible with parallel make builds, as they...
[pub/USBasp.git] / Demos / Host / ClassDriver / AudioOutputHost / AudioOutputHost.c
index 783b0a5..5f00568 100644 (file)
@@ -44,7 +44,10 @@ USB_ClassInfo_Audio_Host_t Speaker_Audio_Interface =
        {
                .Config =
                        {
        {
                .Config =
                        {
-                               .DataOUTPipeNumber = 1,
+                               .DataOUTPipe            =
+                                       {
+                                               .Address        = (PIPE_DIR_OUT | 2),
+                                       },
                        },
        };
 
                        },
        };
 
@@ -125,6 +128,9 @@ void SetupHardware(void)
 
        /* Create a stdio stream for the serial port for stdin and stdout */
        Serial_CreateStream(NULL);
 
        /* Create a stdio stream for the serial port for stdin and stdout */
        Serial_CreateStream(NULL);
+       
+       /* Start the ADC conversion in free running mode */
+       ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_GET_CHANNEL_MASK(MIC_IN_ADC_CHANNEL));   
 }
 
 /** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
 }
 
 /** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
@@ -187,7 +193,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
        }
 
        USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
        }
 
        USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);
-       if (Audio_Host_GetSetEndpointProperty(&Speaker_Audio_Interface, Speaker_Audio_Interface.Config.DataOUTPipeNumber,
+       if (Audio_Host_GetSetEndpointProperty(&Speaker_Audio_Interface, Speaker_Audio_Interface.Config.DataOUTPipe.Address,
                                              AUDIO_REQ_SetCurrent, AUDIO_EPCONTROL_SamplingFreq,
                                              sizeof(SampleRate), &SampleRate) != HOST_SENDCONTROL_Successful)
        {
                                              AUDIO_REQ_SetCurrent, AUDIO_EPCONTROL_SamplingFreq,
                                              sizeof(SampleRate), &SampleRate) != HOST_SENDCONTROL_Successful)
        {