summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iaudio/x5/adc-x5.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-09-10 02:00:40 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-09-10 02:00:40 +0000
commit3d2e10bcbd13ec48decafe49f32afcc12c5e185a (patch)
tree60c490e727a28fd2359c3d185cf2a4f5fd8c328b /firmware/target/coldfire/iaudio/x5/adc-x5.c
parent24ca76ffec3e0d782f75ac1cca2c0b2c8b71f5db (diff)
downloadrockbox-3d2e10bcbd13ec48decafe49f32afcc12c5e185a.tar.gz
rockbox-3d2e10bcbd13ec48decafe49f32afcc12c5e185a.zip
Added remote backlight on hold option to players with remote hold switch. Disabled IRQs while reading pcf50606 ADC. This seems to have stopped buttons becoming unresponsive when using remote. Maybe fixes other button glitches as well?
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10911 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/iaudio/x5/adc-x5.c')
-rwxr-xr-xfirmware/target/coldfire/iaudio/x5/adc-x5.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iaudio/x5/adc-x5.c b/firmware/target/coldfire/iaudio/x5/adc-x5.c
index e465f38494..fc45da8624 100755
--- a/firmware/target/coldfire/iaudio/x5/adc-x5.c
+++ b/firmware/target/coldfire/iaudio/x5/adc-x5.c
@@ -35,6 +35,7 @@ static int channelnum[] =
35 35
36unsigned short adc_scan(int channel) 36unsigned short adc_scan(int channel)
37{ 37{
38 int level = set_irq_level(HIGHEST_IRQ_LEVEL);
38 unsigned char data; 39 unsigned char data;
39 40
40 pcf50606_write(0x2f, 0x80 | (channelnum[channel] << 1) | 1); 41 pcf50606_write(0x2f, 0x80 | (channelnum[channel] << 1) | 1);
@@ -42,6 +43,7 @@ unsigned short adc_scan(int channel)
42 43
43 adcdata[channel] = data; 44 adcdata[channel] = data;
44 45
46 set_irq_level(level);
45 return data; 47 return data;
46} 48}
47 49