diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-07-27 12:05:54 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-07-27 12:05:54 +0000 |
commit | 021c0868dd6a9ac01f01db36a7b08cf7ad6737df (patch) | |
tree | 635d37509ce564e05b2065511912e7a436163510 /firmware/target/arm/ipod/adc-ipod.c | |
parent | b701322fea42c809092f50e252f45ddfc38293c3 (diff) | |
download | rockbox-021c0868dd6a9ac01f01db36a7b08cf7ad6737df.tar.gz rockbox-021c0868dd6a9ac01f01db36a7b08cf7ad6737df.zip |
iPod 2nd gen: * Fake battery voltage of 4.00V so rockbox doesn't shutdown (ADC is not yet implemented). * Fix button hold polarity for main rockbox. * Implement backlight inversion (the 1st/2nd gen backlight works in a way that makes the LCD look inverted when active). * Fix default contrast and clean up target tree.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14022 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod/adc-ipod.c')
-rw-r--r-- | firmware/target/arm/ipod/adc-ipod.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/target/arm/ipod/adc-ipod.c b/firmware/target/arm/ipod/adc-ipod.c index 493b98ef74..39463af30b 100644 --- a/firmware/target/arm/ipod/adc-ipod.c +++ b/firmware/target/arm/ipod/adc-ipod.c | |||
@@ -55,7 +55,7 @@ static unsigned short _adc_read(struct adc_struct *adc) | |||
55 | } | 55 | } |
56 | adc->data = value; | 56 | adc->data = value; |
57 | return value; | 57 | return value; |
58 | } else | 58 | } else |
59 | #endif | 59 | #endif |
60 | { | 60 | { |
61 | return adc->data; | 61 | return adc->data; |
@@ -66,11 +66,19 @@ static unsigned short _adc_read(struct adc_struct *adc) | |||
66 | unsigned short adc_scan(int channel) { | 66 | unsigned short adc_scan(int channel) { |
67 | struct adc_struct *adc = &adcdata[channel]; | 67 | struct adc_struct *adc = &adcdata[channel]; |
68 | adc->timeout = 0; | 68 | adc->timeout = 0; |
69 | #ifdef IPOD_1G2G | ||
70 | if (channel == ADC_UNREG_POWER) | ||
71 | return 681; /* FIXME fake 4.00V */ | ||
72 | #endif | ||
69 | return _adc_read(adc); | 73 | return _adc_read(adc); |
70 | } | 74 | } |
71 | 75 | ||
72 | /* Retrieve the ADC value, only does a scan periodically */ | 76 | /* Retrieve the ADC value, only does a scan periodically */ |
73 | unsigned short adc_read(int channel) { | 77 | unsigned short adc_read(int channel) { |
78 | #ifdef IPOD_1G2G | ||
79 | if (channel == ADC_UNREG_POWER) | ||
80 | return 681; /* FIXME fake 4.00V */ | ||
81 | #endif | ||
74 | return _adc_read(&adcdata[channel]); | 82 | return _adc_read(&adcdata[channel]); |
75 | } | 83 | } |
76 | 84 | ||