summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iaudio/m3/button-m3.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-03-17 00:19:23 +0000
committerJens Arnold <amiconn@rockbox.org>2008-03-17 00:19:23 +0000
commitc6b6bad18fcd68182574086c2eb2a1da30d36d25 (patch)
tree7be19582463e57623a64b674a69893fa771310f5 /firmware/target/coldfire/iaudio/m3/button-m3.c
parent648104a318e84bb4148eeff2a06e6b533deace40 (diff)
downloadrockbox-c6b6bad18fcd68182574086c2eb2a1da30d36d25.tar.gz
rockbox-c6b6bad18fcd68182574086c2eb2a1da30d36d25.zip
iAudio M3: ADC driver, making buttons and battery voltage reading work. * Disable the multi-colour LED for now to save power. Proper handling will be added later. * Make reboot on button press work on iAudio X5, M5, M3 in panicf(), and on M3 in UIE().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16684 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/iaudio/m3/button-m3.c')
-rw-r--r--firmware/target/coldfire/iaudio/m3/button-m3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/coldfire/iaudio/m3/button-m3.c b/firmware/target/coldfire/iaudio/m3/button-m3.c
index c7c5b2e90f..ecea221a4c 100644
--- a/firmware/target/coldfire/iaudio/m3/button-m3.c
+++ b/firmware/target/coldfire/iaudio/m3/button-m3.c
@@ -56,7 +56,7 @@ int button_read_device(void)
56 56
57 if (!hold_button) 57 if (!hold_button)
58 { 58 {
59 data = adc_scan(ADC_BUTTONS); 59 data = adc_read(ADC_BUTTONS);
60 60
61 if (data < 0xc0) 61 if (data < 0xc0)
62 { 62 {
@@ -82,7 +82,7 @@ int button_read_device(void)
82 } 82 }
83 83
84 /* remote buttons */ 84 /* remote buttons */
85 data = remote_detect() ? adc_scan(ADC_REMOTE) : 0xff; 85 data = remote_detect() ? adc_read(ADC_REMOTE) : 0xff;
86 86
87 remote_hold_button_old = remote_hold_button; 87 remote_hold_button_old = remote_hold_button;
88 remote_hold_button = data < 0x14; 88 remote_hold_button = data < 0x14;