summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/target/coldfire/iriver/h100/adc-h100.c8
-rw-r--r--firmware/target/coldfire/iriver/h300/adc-h300.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/firmware/target/coldfire/iriver/h100/adc-h100.c b/firmware/target/coldfire/iriver/h100/adc-h100.c
index b29a2247ad..5fc10e4b3c 100644
--- a/firmware/target/coldfire/iriver/h100/adc-h100.c
+++ b/firmware/target/coldfire/iriver/h100/adc-h100.c
@@ -111,6 +111,14 @@ static void adc_tick(void)
void adc_init(void)
{
+ or_l(0x80600080, &GPIO_FUNCTION); /* GPIO7: CS
+ GPIO21: Data In (to the ADC)
+ GPIO22: CLK
+ GPIO31: Data Out (from the ADC) */
+ or_l(0x00600080, &GPIO_ENABLE);
+ or_l(0x80, &GPIO_OUT); /* CS high */
+ and_l(~0x00400000, &GPIO_OUT); /* CLK low */
+
adc_scan(ADC_BATTERY);
tick_add_task(adc_tick);
diff --git a/firmware/target/coldfire/iriver/h300/adc-h300.c b/firmware/target/coldfire/iriver/h300/adc-h300.c
index 31702eaef1..140eafe0ab 100644
--- a/firmware/target/coldfire/iriver/h300/adc-h300.c
+++ b/firmware/target/coldfire/iriver/h300/adc-h300.c
@@ -69,14 +69,6 @@ static void adc_tick(void)
void adc_init(void)
{
- or_l(0x80600080, &GPIO_FUNCTION); /* GPIO7: CS
- GPIO21: Data In (to the ADC)
- GPIO22: CLK
- GPIO31: Data Out (from the ADC) */
- or_l(0x00600080, &GPIO_ENABLE);
- or_l(0x80, &GPIO_OUT); /* CS high */
- and_l(~0x00400000, &GPIO_OUT); /* CLK low */
-
adc_scan(ADC_BATTERY);
tick_add_task(adc_tick);