diff options
author | Michael Giacomelli <giac2000@hotmail.com> | 2008-05-03 21:15:13 +0000 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2008-05-03 21:15:13 +0000 |
commit | e243db65b41c967ae8e7ef4cd946a2cdf7c6a19e (patch) | |
tree | 48dd8c03631536feab12c7e3386bc832bbfbd269 /firmware/target/arm/ipod | |
parent | 9e6cd921a162c96e3fb72e8909d91181c7d2b531 (diff) | |
download | rockbox-e243db65b41c967ae8e7ef4cd946a2cdf7c6a19e.tar.gz rockbox-e243db65b41c967ae8e7ef4cd946a2cdf7c6a19e.zip |
Commit FS#8920, fixed headphone detection for the Ipod 2G by Mark Fawcus.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17336 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r-- | firmware/target/arm/ipod/button-1g-3g.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/firmware/target/arm/ipod/button-1g-3g.c b/firmware/target/arm/ipod/button-1g-3g.c index be02f873bb..2aa65bb2c0 100644 --- a/firmware/target/arm/ipod/button-1g-3g.c +++ b/firmware/target/arm/ipod/button-1g-3g.c | |||
@@ -250,5 +250,21 @@ bool button_hold(void) | |||
250 | 250 | ||
251 | bool headphones_inserted(void) | 251 | bool headphones_inserted(void) |
252 | { | 252 | { |
253 | #ifdef IPOD_1G2G | ||
254 | if ((IPOD_HW_REVISION >> 16) == 2) | ||
255 | { | ||
256 | /* 2G uses GPIO B bit 0 */ | ||
257 | return (GPIOB_INPUT_VAL & 0x1)?true:false; | ||
258 | } | ||
259 | else | ||
260 | { | ||
261 | /* 1G has no headphone detection, so fake insertion */ | ||
262 | return (true); | ||
263 | } | ||
264 | #else | ||
265 | /* 3G uses GPIO C bit 0 */ | ||
253 | return (GPIOC_INPUT_VAL & 0x1)?true:false; | 266 | return (GPIOC_INPUT_VAL & 0x1)?true:false; |
267 | #endif | ||
254 | } | 268 | } |
269 | |||
270 | |||