- Status Closed
- Percent Complete
- Task Type Patches
- Category
- Assigned To No-one
- Operating System
- Severity Low
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Attached to Project: Rockbox
Opened by Magnus Holmgren - 2003-07-16
Last edited by Daniel Stenberg - 2003-07-17
Opened by Magnus Holmgren - 2003-07-16
Last edited by Daniel Stenberg - 2003-07-17
FS#1525 - Init values read by adc_read during adc_init
During adc_init, no analog to digital conversion is
done. Instead, a tick task is started to do the job.
This means it can take up to 8 ticks (80 ms) before a
call to adc_read returns a proper value.
But power_init needs proper adc_read values early on,
to initialize its power history. This patch adds an
initial ADC step in adc_init, so that adc_read will
return proper values when adc_init returns. If I’ve
read the hardware manual correctly, this takes about
100 µs to do (1/100 of a tick).
Note: this code is only tested on a player! However, I
see no reason why it shouldn’t work on other models.
Patch committed.
(I have no rights to close it)