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 | |
| parent | ee7caed7d95e209361406735805dc66718575ea7 (diff) | |
| download | rockbox-90eacb26164598ae7e13074071836d6100a045a7.zip rockbox-90eacb26164598ae7e13074071836d6100a045a7.tar.gz rockbox-90eacb26164598ae7e13074071836d6100a045a7.tar.bz2 rockbox-90eacb26164598ae7e13074071836d6100a045a7.tar.xz | |
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')
| -rw-r--r-- | bootloader/common.c | 4 | ||||
| -rw-r--r-- | bootloader/ipod.c | 18 |
2 files changed, 14 insertions, 8 deletions
diff --git a/bootloader/common.c b/bootloader/common.c index 1ac8e8f..d3e0f44 100644 --- a/bootloader/common.c +++ b/bootloader/common.c @@ -30,8 +30,8 @@ /* TODO: Other bootloaders need to be adjusted to set this variable to true on a button press - currently only the ipod, H10 and Sansa versions do. */ -#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || \ - defined(SANSA_E200) || defined(GIGABEAT_F) +#if (defined(IPOD_ARCH) && !defined(IPOD_1G2G)) || defined(IRIVER_H10) \ + || defined(IRIVER_H10_5GB) || defined(SANSA_E200) || defined(GIGABEAT_F) bool verbose = false; #else bool verbose = true; diff --git a/bootloader/ipod.c b/bootloader/ipod.c index a35dd33..d308e3e 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 |