aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-06-09 04:08:03 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-06-09 04:08:03 +0000
commit1f1d0710f379a8b08ef646cbadb63d92c35e47fb (patch)
tree886a528a8ba721733735c1cded2462e6992e11f6 /Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h
parent0bf5064aec5ac43ba2b25d44528bebb27db2f117 (diff)
downloadlufa-1f1d0710f379a8b08ef646cbadb63d92c35e47fb.tar.gz
lufa-1f1d0710f379a8b08ef646cbadb63d92c35e47fb.tar.bz2
lufa-1f1d0710f379a8b08ef646cbadb63d92c35e47fb.zip
Add new Audio Class Driver Host demos.
Fix errors in the new Audio Host mode Class Driver, which would have prevented data from being sent or received properly by the device. Add microphone/square wave generation compile time switch to the Low Level AudioOutput Host demo.
Diffstat (limited to 'Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h')
-rw-r--r--Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h
index 4772bb3ea..b151f2283 100644
--- a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h
+++ b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h
@@ -48,12 +48,25 @@
#include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
+ #include <LUFA/Drivers/Peripheral/ADC.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Board/Buttons.h>
#include "ConfigDescriptor.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
+
+ /** Maximum ADC range for the microphone input. */
+ #define ADC_MAX_RANGE 0x3FF
+
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
#define LEDMASK_USB_NOTREADY LEDS_LED1