From 359fbfe14d00ab378f85a36664820ea9ba538c3f Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 10 May 2012 19:24:58 +0000 Subject: Add branch for the conversion of demos to use standard C header files for configuration, rather than makefile defined macros. --- Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c') diff --git a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c index 783b0a5e5..833be1b2c 100644 --- a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c +++ b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c @@ -44,7 +44,10 @@ USB_ClassInfo_Audio_Host_t Speaker_Audio_Interface = { .Config = { - .DataOUTPipeNumber = 1, + .DataOUTPipe = + { + .Address = (PIPE_DIR_OUT | 2), + }, }, }; @@ -187,7 +190,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void) } 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) { -- cgit v1.2.3 From e9e6730d4999bea6e0eaefc2fce062ef090388b8 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 13 May 2012 21:01:23 +0000 Subject: AppConfigHeaders: Move out the last of the demo/app configurations into new AppConfig.h header files. --- Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c') diff --git a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c index 833be1b2c..5f00568f5 100644 --- a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c +++ b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c @@ -128,6 +128,9 @@ void SetupHardware(void) /* 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 -- cgit v1.2.3