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.zip rockbox-3c362fa8c6b9cd55f2c1e514c426b990be779563.tar.gz rockbox-3c362fa8c6b9cd55f2c1e514c426b990be779563.tar.bz2 rockbox-3c362fa8c6b9cd55f2c1e514c426b990be779563.tar.xz | |
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 f94584b..e8f2c19 100644 --- a/firmware/export/config-ipodnano2g.h +++ b/firmware/export/config-ipodnano2g.h @@ -56,6 +56,9 @@ /* define this if you would like tagcache to build on this target */ #define HAVE_TAGCACHE +/* Define this if you can detect headphones */ +#define HAVE_HEADPHONE_DETECTION + /* define this if you have a flash memory storage */ #define HAVE_FLASH_STORAGE diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c index 001f599..bdcdd65 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) { return ((PDAT14 & (1 << 6)) == 0); } + +bool headphones_inserted(void) +{ + return ((PDAT14 & (1 << 5)) != 0); +} #endif /* |