aboutsummaryrefslogtreecommitdiff
path: root/Demos/Device/LowLevel/AudioInput
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-05-13 21:01:23 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-05-13 21:01:23 +0000
commitde64d3b8b2b1ca8f524aa7760b5ab807135dd21d (patch)
tree5daf1ada1335d2781e144548b55d8253adff0c05 /Demos/Device/LowLevel/AudioInput
parenta3c6569569b450647b60fd7dfa720ffb1a1e823e (diff)
AppConfigHeaders: Move out the last of the demo/app configurations into new AppConfig.h header files.
git-svn-id: http://lufa-lib.googlecode.com/svn/branches/AppConfigHeaders@2217 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Device/LowLevel/AudioInput')
-rw-r--r--Demos/Device/LowLevel/AudioInput/AudioInput.c2
-rw-r--r--Demos/Device/LowLevel/AudioInput/AudioInput.h6
-rw-r--r--Demos/Device/LowLevel/AudioInput/Config/AppConfig.h2
3 files changed, 3 insertions, 7 deletions
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c
index eb9c4b57..925517b3 100644
--- a/Demos/Device/LowLevel/AudioInput/AudioInput.c
+++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c
@@ -77,7 +77,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_MUX_MASK);
+ ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_GET_CHANNEL_MASK(MIC_IN_ADC_CHANNEL));
}
/** 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 fc209371..0539e069 100644
--- a/Demos/Device/LowLevel/AudioInput/AudioInput.h
+++ b/Demos/Device/LowLevel/AudioInput/AudioInput.h
@@ -52,12 +52,6 @@
#include <LUFA/Drivers/Peripheral/ADC.h>
/* 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 audio sample value for the microphone input. */
#define SAMPLE_MAX_RANGE 0xFFFF
diff --git a/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h b/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h
index 01101649..7702e259 100644
--- a/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h
+++ b/Demos/Device/LowLevel/AudioInput/Config/AppConfig.h
@@ -43,6 +43,8 @@
#ifndef _APP_CONFIG_H_
#define _APP_CONFIG_H_
+ #define MIC_IN_ADC_CHANNEL 2
+
#define MICROPHONE_BIASED_TO_HALF_RAIL
#define USE_TEST_TONE