#include "lights.h"
+/* ADC numbering: PWM LEDs first, then ambient light sensor, battery sensor */
static unsigned char adc_mux[] = { // pwmleds should be first
// 0: pwmled 0: 1.1V, ADC3 (PA4), single-ended
_BV(REFS1) | _BV(MUX1) | _BV(MUX0),
};
#define AMBIENT_ADC N_PWMLEDS
+#define BATTERY_ADC (N_PWMLEDS + 1)
#define LAST_ADC (sizeof(adc_mux)/sizeof(adc_mux[0]))
volatile static unsigned char current_adc;