Fix analog reading of channel 0 if another channel is active.

This commit is contained in:
Markus Amsler 2011-02-14 18:32:00 +01:00 committed by Michael Moon
parent 3aa7fc83e4
commit bcd47e90b0
2 changed files with 10 additions and 4 deletions

View File

@ -9,7 +9,10 @@
uint8_t adc_running_mask, adc_counter;
#if ANALOG_MASK & 2
#if ANALOG_MASK & 1
#define ANALOG_START 0
#define ANALOG_START_MASK 1
#elif ANALOG_MASK & 2
#define ANALOG_START 1
#define ANALOG_START_MASK 2
#elif ANALOG_MASK & 4
@ -31,7 +34,7 @@ uint8_t adc_running_mask, adc_counter;
#define ANALOG_START 7
#define ANALOG_START_MASK 128
#else
// ANALOG_MASK == 1 or 0, either way defines are the same except they're not used if ANALOG_MASK == 0
// ANALOG_MASK == 0
#define ANALOG_START 0
#define ANALOG_START_MASK 1
#endif

View File

@ -9,7 +9,10 @@
uint8_t adc_running_mask, adc_counter;
#if ANALOG_MASK & 2
#if ANALOG_MASK & 1
#define ANALOG_START 0
#define ANALOG_START_MASK 1
#elif ANALOG_MASK & 2
#define ANALOG_START 1
#define ANALOG_START_MASK 2
#elif ANALOG_MASK & 4
@ -31,7 +34,7 @@ uint8_t adc_running_mask, adc_counter;
#define ANALOG_START 7
#define ANALOG_START_MASK 128
#else
// ANALOG_MASK == 1 or 0, either way defines are the same except they're not used if ANALOG_MASK == 0
// ANALOG_MASK == 0
#define ANALOG_START 0
#define ANALOG_START_MASK 1
#endif