aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/AudioInput
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver/AudioInput')
-rw-r--r--Demos/Device/ClassDriver/AudioInput/AudioInput.c2
-rw-r--r--Demos/Device/ClassDriver/AudioInput/AudioInput.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.c b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
index eeec921ee..b90ee5125 100644
--- a/Demos/Device/ClassDriver/AudioInput/AudioInput.c
+++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
@@ -86,7 +86,7 @@ void SetupHardware(void)
ADC_SetupChannel(MIC_IN_ADC_CHANNEL);
/* Start the ADC conversion in free running mode */
- ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | MIC_IN_ADC_CHANNEL);
+ ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | MIC_IN_ADC_MUX_MASK);
}
/** Processes the next audio sample by reading the last ADC conversion and writing it to the audio
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.h b/Demos/Device/ClassDriver/AudioInput/AudioInput.h
index ddb643045..98fec7813 100644
--- a/Demos/Device/ClassDriver/AudioInput/AudioInput.h
+++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.h
@@ -52,6 +52,9 @@
/* Macros: */
/** ADC channel number for the microphone input. */
#define MIC_IN_ADC_CHANNEL 2
+
+ /** ADC channel MUX mask for the microphone input. */
+ #define MIC_IN_ADC_MUX_MASK ADC_CHANNEL2
/** Maximum ADC sample value for the microphone input. */
#define SAMPLE_MAX_RANGE 0xFFFF