aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/LowLevel
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/LowLevel')
-rw-r--r--Demos/Device/LowLevel/AudioInput/AudioInput.c2
-rw-r--r--Demos/Device/LowLevel/AudioInput/AudioInput.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c
index 98c2e8b3e..2d718e53c 100644
--- a/Demos/Device/LowLevel/AudioInput/AudioInput.c
+++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c
@@ -72,7 +72,7 @@ void SetupHardware(void)
USB_Init();
/* 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);
}
/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs, and
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.h b/Demos/Device/LowLevel/AudioInput/AudioInput.h
index ace1e9685..4585ab5b6 100644
--- a/Demos/Device/LowLevel/AudioInput/AudioInput.h
+++ b/Demos/Device/LowLevel/AudioInput/AudioInput.h
@@ -52,6 +52,9 @@
/** 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