From 911d9d5f5a6c106faafa17e8b7e21ac3e61b4d2a Mon Sep 17 00:00:00 2001
From: "Jan \"Yenya\" Kasprzak" <kas@fi.muni.cz>
Date: Wed, 29 Aug 2012 16:24:08 +0200
Subject: [PATCH] adc: battery adc

---
 adc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/adc.c b/adc.c
index a6547e3..bef7375 100644
--- a/adc.c
+++ b/adc.c
@@ -3,6 +3,7 @@
 
 #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),
@@ -17,6 +18,7 @@ static unsigned char adc_mux[] = { // pwmleds should be first
 };
 
 #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;
-- 
2.43.5