Rockbox

Tasklist

FS#1526 - Init values read by adc_read during adc_init

Attached to Project: Rockbox
Opened by Magnus Holmgren (learman) - Wednesday, 16 July 2003, 21:02 GMT
Last edited by Magnus Holmgren (learman) - Wednesday, 16 July 2003, 21:03 GMT
Task Type Patches
Category
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

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.
This task depends upon

Closed by  Magnus Holmgren (learman)
Wednesday, 16 July 2003, 21:03 GMT
Reason for closing:  
Additional comments about closing:  Logged In: YES
user_id=620107

Sorry about that; did a reload when I shouldn't have... :)
Comment by Magnus Holmgren (learman) - Wednesday, 16 July 2003, 21:03 GMT

Sorry about that; did a reload when I shouldn't have... :)

Loading...