summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-09-26 11:15:33 +0000
committerDave Chapman <dave@dchapman.com>2006-09-26 11:15:33 +0000
commitc8dbe047ff1f78bcf97f62167557da15574a5f86 (patch)
treec0177ccb9b61f26151c59183b948392c256515ff /firmware
parentd76a1e904f947e7574615d9afe97f046150655ad (diff)
Patch #6067 from Robert Keevil - enable headphone detection for the remaining ipods (mini 1g/2g and ipod 3g)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11060 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/button.c4
-rw-r--r--firmware/export/config-ipod3g.h3
-rw-r--r--firmware/export/config-ipodmini.h3
-rwxr-xr-xfirmware/export/config-ipodmini2g.h3
4 files changed, 13 insertions, 0 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 0042d9b8eb..20b725c3d4 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -1351,7 +1351,11 @@ void button_clear_queue(void)
#ifdef HAVE_HEADPHONE_DETECTION
bool headphones_inserted(void)
{
+#if (CONFIG_KEYPAD==IPOD_3G_PAD)
+ return (GPIOB_INPUT_VAL & 0x10)?true:false;
+#elif (CONFIG_KEYPAD==IPOD_4G_PAD)
return (GPIOA_INPUT_VAL & 0x80)?true:false;
+#endif
}
#endif
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h
index 2f008e17c8..94035069a5 100644
--- a/firmware/export/config-ipod3g.h
+++ b/firmware/export/config-ipod3g.h
@@ -108,6 +108,9 @@
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
+/* Define this if you can detect headphones */
+#define HAVE_HEADPHONE_DETECTION
+
#define BOOTFILE_EXT "ipod"
#define BOOTFILE "rockbox." BOOTFILE_EXT
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h
index f6d51aefaa..f2f96946c9 100644
--- a/firmware/export/config-ipodmini.h
+++ b/firmware/export/config-ipodmini.h
@@ -109,6 +109,9 @@
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
+/* Define this if you can detect headphones */
+#define HAVE_HEADPHONE_DETECTION
+
#define BOOTFILE_EXT "ipod"
#define BOOTFILE "rockbox." BOOTFILE_EXT
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h
index a7e1a3a5ee..342742ea43 100755
--- a/firmware/export/config-ipodmini2g.h
+++ b/firmware/export/config-ipodmini2g.h
@@ -112,6 +112,9 @@
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
+/* Define this if you can detect headphones */
+#define HAVE_HEADPHONE_DETECTION
+
#define BOOTFILE_EXT "ipod"
#define BOOTFILE "rockbox." BOOTFILE_EXT