diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2007-08-21 23:37:26 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2007-08-21 23:37:26 +0000 |
commit | 0d5451e7bde8ed8babb96f22c98290a73411c26f (patch) | |
tree | 849b3ccc544df98318659fb6c6d348adea7b241e /firmware/target/arm/iriver/h10/adc-h10.c | |
parent | 496206be6e71169bcbb6516c435c604c5ae91948 (diff) | |
download | rockbox-0d5451e7bde8ed8babb96f22c98290a73411c26f.tar.gz rockbox-0d5451e7bde8ed8babb96f22c98290a73411c26f.zip |
H10: add more time between enabling touch-pad and reading ADC. Greatly improves touchpad stability. Add (and disable) checking for ADC done bit. Disabled because not yet working.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14419 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/iriver/h10/adc-h10.c')
-rw-r--r-- | firmware/target/arm/iriver/h10/adc-h10.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/target/arm/iriver/h10/adc-h10.c b/firmware/target/arm/iriver/h10/adc-h10.c index 8a4e24dd64..df9b16359b 100644 --- a/firmware/target/arm/iriver/h10/adc-h10.c +++ b/firmware/target/arm/iriver/h10/adc-h10.c | |||
@@ -42,7 +42,12 @@ unsigned short adc_scan(int channel) | |||
42 | /* Start? */ | 42 | /* Start? */ |
43 | ADC_ADDR |= 0x20000000; | 43 | ADC_ADDR |= 0x20000000; |
44 | ADC_ADDR |= 0x80000000; | 44 | ADC_ADDR |= 0x80000000; |
45 | 45 | ||
46 | #if 0 | ||
47 | /* wait for ADC ready. THIS IS NOT WORKING (locks up) */ | ||
48 | while(ADC_STATUS & (0x40 << (channel*8))); /* add loop protection here */ | ||
49 | #endif | ||
50 | |||
46 | /* ADC_DATA_1 and ADC_DATA_2 are both four bytes, one byte per channel. | 51 | /* ADC_DATA_1 and ADC_DATA_2 are both four bytes, one byte per channel. |
47 | For each channel, ADC_DATA_1 stores the 8-bit msb, ADC_DATA_2 stores the | 52 | For each channel, ADC_DATA_1 stores the 8-bit msb, ADC_DATA_2 stores the |
48 | 2-bit lsb (in bits 0 and 1). Each channel is 10 bits total. */ | 53 | 2-bit lsb (in bits 0 and 1). Each channel is 10 bits total. */ |