diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-07-27 07:32:55 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-07-27 07:32:55 +0000 |
commit | 90eacb26164598ae7e13074071836d6100a045a7 (patch) | |
tree | 75de352f360067658978ccca134a741c88e7cee2 /bootloader/ipod.c | |
parent | ee7caed7d95e209361406735805dc66718575ea7 (diff) |
G1/G2 bootloader working (always in verbose mode for now). Corrected fatal error help text for G1..G3.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14020 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/ipod.c')
-rw-r--r-- | bootloader/ipod.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bootloader/ipod.c b/bootloader/ipod.c index a35dd33cf1..d308e3e9c5 100644 --- a/bootloader/ipod.c +++ b/bootloader/ipod.c @@ -165,9 +165,8 @@ static int key_pressed(void) if ((state & 0x8) == 0) return BUTTON_PLAY; if ((state & 0x2) == 0) return BUTTON_RIGHT; #endif -#elif CONFIG_KEYPAD == IPOD_3G_PAD - state = inb(0xcf000030); - if (((state & 0x20) == 0)) return BUTTON_HOLD; /* hold on */ +#elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_1G2G_PAD) + state = GPIOA_INPUT_VAL; if ((state & 0x08) == 0) return BUTTON_LEFT; if ((state & 0x10) == 0) return BUTTON_MENU; if ((state & 0x04) == 0) return BUTTON_PLAY; @@ -176,10 +175,13 @@ static int key_pressed(void) return 0; } -/* This function is the same on all ipods */ bool button_hold(void) { - return (GPIOA_INPUT_VAL & 0x20)?false:true; +#if CONFIG_KEYPAD == IPOD_1G2G_PAD + return (GPIOA_INPUT_VAL & 0x20); +#else + return !(GPIOA_INPUT_VAL & 0x20); +#endif } void fatal_error(void) @@ -188,7 +190,11 @@ void fatal_error(void) bool holdstatus=false; /* System font is 6 pixels wide */ -#if LCD_WIDTH >= (30*6) +#if defined(IPOD_1G2G) || defined(IPOD_3G) + printf("Hold MENU+PLAY to"); + printf("reboot then REW+FF"); + printf("for disk mode"); +#elif LCD_WIDTH >= (30*6) printf("Hold MENU+SELECT to reboot"); printf("then SELECT+PLAY for disk mode"); #else |