summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/adc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/drivers/adc.c b/firmware/drivers/adc.c
index 5affe10168..107674348d 100644
--- a/firmware/drivers/adc.c
+++ b/firmware/drivers/adc.c
@@ -34,7 +34,7 @@ static void adc_tick(void)
34{ 34{
35 /* Read the data that has bee converted since the last tick */ 35 /* Read the data that has bee converted since the last tick */
36 adcdata[current_channel] = 36 adcdata[current_channel] =
37 *(unsigned short *)adcreg[current_channel] >> 6; 37 *(unsigned short *)adcreg[current_channel] >> 6;
38 38
39 /* Start a conversion on the next channel */ 39 /* Start a conversion on the next channel */
40 current_channel++; 40 current_channel++;
@@ -82,10 +82,10 @@ void adc_init(void)
82 current_channel = 0; 82 current_channel = 0;
83 83
84 /* Do a first scan to initialize all values */ 84 /* Do a first scan to initialize all values */
85 /* AN0 to AN3 */
86 adc_batch_convert(true);
87 /* AN4 to AN7 */ 85 /* AN4 to AN7 */
88 adc_batch_convert(false); 86 adc_batch_convert(false);
87 /* AN0 to AN3 */
88 adc_batch_convert(true);
89 89
90 tick_add_task(adc_tick); 90 tick_add_task(adc_tick);
91} 91}