summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/iriver/h10
diff options
context:
space:
mode:
authorBarry Wardell <rockbox@barrywardell.net>2006-09-23 17:47:54 +0000
committerBarry Wardell <rockbox@barrywardell.net>2006-09-23 17:47:54 +0000
commit5a79b4e015366fa2ee7c06cf29b3237275db369a (patch)
treec69b042757caec05b46146c96db2c934a0e68438 /firmware/target/arm/iriver/h10
parent193611367ab739c284be26060f707776804757b9 (diff)
downloadrockbox-5a79b4e015366fa2ee7c06cf29b3237275db369a.tar.gz
rockbox-5a79b4e015366fa2ee7c06cf29b3237275db369a.tar.bz2
rockbox-5a79b4e015366fa2ee7c06cf29b3237275db369a.zip
Add ADC to I/O ports debug menu on H10. Fix battery level reading empty when starting up on H10. Calibrated battery for H10 20GB.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11036 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/iriver/h10')
-rwxr-xr-xfirmware/target/arm/iriver/h10/adc-h10.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/firmware/target/arm/iriver/h10/adc-h10.c b/firmware/target/arm/iriver/h10/adc-h10.c
index 134b90b587..0dc0e8aee5 100755
--- a/firmware/target/arm/iriver/h10/adc-h10.c
+++ b/firmware/target/arm/iriver/h10/adc-h10.c
@@ -81,21 +81,12 @@ void adc_init(void)
/* Initialise */
ADC_INIT=0;
- ADC_ADDR=0x130;
- ADC_STATUS=0;
-
- /* Enable Channels 1-4 */
- ADC_ADDR |= 0x1000000;
- ADC_ADDR |= 0x2000000;
- ADC_ADDR |= 0x4000000;
- ADC_ADDR |= 0x8000000;
-
- /* Start? */
- ADC_ADDR |= 0x20000000;
- ADC_ADDR |= 0x80000000;
-
- /* Wait 50ms for things to settle */
- sleep(HZ/20);
+
+ /* Force a scan of all channels to get initial values */
+ adc_scan(ADC_BATTERY);
+ adc_scan(ADC_UNKNOWN_1);
+ adc_scan(ADC_UNKNOWN_2);
+ adc_scan(ADC_SCROLLPAD);
tick_add_task(adc_tick);
}