summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-07-03 21:44:49 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-07-03 21:44:49 +0000
commit6e40988803609c6cd65e7091e1b58e4a6a5b936d (patch)
treeb98a36f41e16c73bdc0e112206e5b73e2fe419eb /firmware
parent64276fc0fff63661a40d8640cc1a08143c80dc72 (diff)
downloadrockbox-6e40988803609c6cd65e7091e1b58e4a6a5b936d.tar.gz
rockbox-6e40988803609c6cd65e7091e1b58e4a6a5b936d.tar.bz2
rockbox-6e40988803609c6cd65e7091e1b58e4a6a5b936d.zip
HD200 - Increase ADC clock when boosted. Scan all 4 ADC channels during system tick
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27262 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/coldfire/mpio/hd200/adc-hd200.c8
-rw-r--r--firmware/target/coldfire/mpio/hd200/system-hd200.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/coldfire/mpio/hd200/adc-hd200.c b/firmware/target/coldfire/mpio/hd200/adc-hd200.c
index 656d82e721..01b6f531e2 100644
--- a/firmware/target/coldfire/mpio/hd200/adc-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/adc-hd200.c
@@ -40,7 +40,7 @@ void ADC(void)
{
static unsigned char channel IBSS_ATTR;
/* read current value */
- adc_data[((channel&0x01)+1)] = ADVALUE;
+ adc_data[(channel&0x03)] = ADVALUE;
/* switch channel
*
@@ -51,10 +51,10 @@ void ADC(void)
channel++;
- and_l(~(3<<24),&ADCONFIG);
- or_l( ((((channel&0x01)+1) << 8 )|(1<<7))<<16, &ADCONFIG);
+ and_l(~(0x03<<24),&ADCONFIG);
+ or_l( (((channel&0x03) << 8 )|(1<<7))<<16, &ADCONFIG);
- if ( (channel & 0x01) == 0 )
+ if ( (channel & 0x03) == 0 )
/* disable ADC interrupt */
and_l((~(1<<6))<<16,&ADCONFIG);
}
diff --git a/firmware/target/coldfire/mpio/hd200/system-hd200.c b/firmware/target/coldfire/mpio/hd200/system-hd200.c
index 60699e46a9..a6277d0390 100644
--- a/firmware/target/coldfire/mpio/hd200/system-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/system-hd200.c
@@ -81,7 +81,7 @@ void cf_set_cpu_frequency(long frequency)
IDECONFIG2 = (1<<18)|(1<<16)|(1<<8)|(1<<0); /* TA /CS2 enable + CS2wait */
and_l(~(0x07<<16), &ADCONFIG);
- or_l((0x06)<<16, &ADCONFIG); /* adclk = busclk/64 */
+ or_l((0x05)<<16, &ADCONFIG); /* adclk = busclk/32 */
break;
case CPUFREQ_NORMAL: