diff options
author | Dave Chapman <dave@dchapman.com> | 2009-10-10 15:37:05 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2009-10-10 15:37:05 +0000 |
commit | 3c362fa8c6b9cd55f2c1e514c426b990be779563 (patch) | |
tree | 18c6acdac85005132bcdbf0bfd6ef3c38cbce2fe | |
parent | 205231caf7548b8ccefc52e29d49d92499312bdc (diff) | |
download | rockbox-3c362fa8c6b9cd55f2c1e514c426b990be779563.tar.gz rockbox-3c362fa8c6b9cd55f2c1e514c426b990be779563.zip |
Nano2G - implement "Pause on headphone unplug" feature
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23072 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/export/config-ipodnano2g.h | 3 | ||||
-rw-r--r-- | firmware/target/arm/ipod/button-clickwheel.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/firmware/export/config-ipodnano2g.h b/firmware/export/config-ipodnano2g.h index f94584b3cf..e8f2c1935d 100644 --- a/firmware/export/config-ipodnano2g.h +++ b/firmware/export/config-ipodnano2g.h | |||
@@ -56,6 +56,9 @@ | |||
56 | /* define this if you would like tagcache to build on this target */ | 56 | /* define this if you would like tagcache to build on this target */ |
57 | #define HAVE_TAGCACHE | 57 | #define HAVE_TAGCACHE |
58 | 58 | ||
59 | /* Define this if you can detect headphones */ | ||
60 | #define HAVE_HEADPHONE_DETECTION | ||
61 | |||
59 | /* define this if you have a flash memory storage */ | 62 | /* define this if you have a flash memory storage */ |
60 | #define HAVE_FLASH_STORAGE | 63 | #define HAVE_FLASH_STORAGE |
61 | 64 | ||
diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c index 001f599878..bdcdd655f5 100644 --- a/firmware/target/arm/ipod/button-clickwheel.c +++ b/firmware/target/arm/ipod/button-clickwheel.c | |||
@@ -352,6 +352,11 @@ bool button_hold(void) | |||
352 | { | 352 | { |
353 | return ((PDAT14 & (1 << 6)) == 0); | 353 | return ((PDAT14 & (1 << 6)) == 0); |
354 | } | 354 | } |
355 | |||
356 | bool headphones_inserted(void) | ||
357 | { | ||
358 | return ((PDAT14 & (1 << 5)) != 0); | ||
359 | } | ||
355 | #endif | 360 | #endif |
356 | 361 | ||
357 | /* | 362 | /* |