forked from len0rd/rockbox
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
This commit is contained in:
parent
5dd17b1857
commit
bfaf757db7
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue