summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2003-07-17 20:40:16 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2003-07-17 20:40:16 +0000
commitbfaf757db73ed40b60caa4f5f056f7a5489f127d (patch)
tree10d5e9b503af8f67e3651aeb004e34ad0fda880d
parent5dd17b1857b5de2a0250ef79898d2009583b6278 (diff)
downloadrockbox-bfaf757db73ed40b60caa4f5f056f7a5489f127d.zip
rockbox-bfaf757db73ed40b60caa4f5f056f7a5489f127d.tar.gz
rockbox-bfaf757db73ed40b60caa4f5f056f7a5489f127d.tar.bz2
rockbox-bfaf757db73ed40b60caa4f5f056f7a5489f127d.tar.xz
Magnus Holmgren: Just realized one thing: doing AN0-3 last is slightly better, as AN0
will then remain valid for the first execution of the tick task function. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3842 a1c6a512-1295-4272-9138-f99709370657
-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 5affe10..1076743 100644
--- a/firmware/drivers/adc.c
+++ b/firmware/drivers/adc.c
@@ -34,7 +34,7 @@ static void adc_tick(void)
{
/* Read the data that has bee converted since the last tick */
adcdata[current_channel] =
- *(unsigned short *)adcreg[current_channel] >> 6;
+ *(unsigned short *)adcreg[current_channel] >> 6;
/* Start a conversion on the next channel */
current_channel++;
@@ -82,10 +82,10 @@ void adc_init(void)
current_channel = 0;
/* Do a first scan to initialize all values */
- /* AN0 to AN3 */
- adc_batch_convert(true);
/* AN4 to AN7 */
adc_batch_convert(false);
+ /* AN0 to AN3 */
+ adc_batch_convert(true);
tick_add_task(adc_tick);
}