diff options
| -rw-r--r-- | firmware/drivers/button.c | 4 | ||||
| -rw-r--r-- | firmware/export/config-ipod3g.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-ipodmini.h | 3 | ||||
| -rwxr-xr-x | firmware/export/config-ipodmini2g.h | 3 |
4 files changed, 13 insertions, 0 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 0042d9b..20b725c 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 2f008e1..9403506 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 f6d51ae..f2f9694 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 a7e1a3a..342742e 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 |