Added explicit ADC channel masks for the standard set of ADC channels, as the single-ended channel MUX masks are not equal to the channel number on some AVR models. Changed demos to use the new channel masks when using the ADC driver.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user