fix case where ANALOG_MASK is zero

This commit is contained in:
Michael Moon 2010-11-07 16:44:35 +11:00
parent 6427e8a6cf
commit c9f9464a26
1 changed files with 5 additions and 4 deletions

View File

@ -9,10 +9,7 @@
uint8_t adc_running_mask, adc_counter;
#if ANALOG_MASK & 1
#define ANALOG_START 0
#define ANALOG_START_MASK 1
#elif ANALOG_MASK & 2
#if ANALOG_MASK & 2
#define ANALOG_START 1
#define ANALOG_START_MASK 2
#elif ANALOG_MASK & 4
@ -33,6 +30,10 @@ uint8_t adc_running_mask, adc_counter;
#elif ANALOG_MASK & 128
#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
#define ANALOG_START 0
#define ANALOG_START_MASK 1
#endif
volatile uint16_t adc_result[8] __attribute__ ((__section__ (".bss")));