diff options
-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 1ac8e8f7e3..d3e0f44063 100644 --- a/bootloader/common.c +++ b/bootloader/common.c | |||
@@ -30,8 +30,8 @@ | |||
30 | 30 | ||
31 | /* TODO: Other bootloaders need to be adjusted to set this variable to true | 31 | /* TODO: Other bootloaders need to be adjusted to set this variable to true |
32 | on a button press - currently only the ipod, H10 and Sansa versions do. */ | 32 | on a button press - currently only the ipod, H10 and Sansa versions do. */ |
33 | #if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || \ | 33 | #if (defined(IPOD_ARCH) && !defined(IPOD_1G2G)) || defined(IRIVER_H10) \ |
34 | defined(SANSA_E200) || defined(GIGABEAT_F) | 34 | || defined(IRIVER_H10_5GB) || defined(SANSA_E200) || defined(GIGABEAT_F) |
35 | bool verbose = false; | 35 | bool verbose = false; |
36 | #else | 36 | #else |
37 | bool verbose = true; | 37 | bool verbose = true; |
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) | |||
165 | if ((state & 0x8) == 0) return BUTTON_PLAY; | 165 | if ((state & 0x8) == 0) return BUTTON_PLAY; |
166 | if ((state & 0x2) == 0) return BUTTON_RIGHT; | 166 | if ((state & 0x2) == 0) return BUTTON_RIGHT; |
167 | #endif | 167 | #endif |
168 | #elif CONFIG_KEYPAD == IPOD_3G_PAD | 168 | #elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_1G2G_PAD) |
169 | state = inb(0xcf000030); | 169 | state = GPIOA_INPUT_VAL; |
170 | if (((state & 0x20) == 0)) return BUTTON_HOLD; /* hold on */ | ||
171 | if ((state & 0x08) == 0) return BUTTON_LEFT; | 170 | if ((state & 0x08) == 0) return BUTTON_LEFT; |
172 | if ((state & 0x10) == 0) return BUTTON_MENU; | 171 | if ((state & 0x10) == 0) return BUTTON_MENU; |
173 | if ((state & 0x04) == 0) return BUTTON_PLAY; | 172 | if ((state & 0x04) == 0) return BUTTON_PLAY; |
@@ -176,10 +175,13 @@ static int key_pressed(void) | |||
176 | return 0; | 175 | return 0; |
177 | } | 176 | } |
178 | 177 | ||
179 | /* This function is the same on all ipods */ | ||
180 | bool button_hold(void) | 178 | bool button_hold(void) |
181 | { | 179 | { |
182 | return (GPIOA_INPUT_VAL & 0x20)?false:true; | 180 | #if CONFIG_KEYPAD == IPOD_1G2G_PAD |
181 | return (GPIOA_INPUT_VAL & 0x20); | ||
182 | #else | ||
183 | return !(GPIOA_INPUT_VAL & 0x20); | ||
184 | #endif | ||
183 | } | 185 | } |
184 | 186 | ||
185 | void fatal_error(void) | 187 | void fatal_error(void) |
@@ -188,7 +190,11 @@ void fatal_error(void) | |||
188 | bool holdstatus=false; | 190 | bool holdstatus=false; |
189 | 191 | ||
190 | /* System font is 6 pixels wide */ | 192 | /* System font is 6 pixels wide */ |
191 | #if LCD_WIDTH >= (30*6) | 193 | #if defined(IPOD_1G2G) || defined(IPOD_3G) |
194 | printf("Hold MENU+PLAY to"); | ||
195 | printf("reboot then REW+FF"); | ||
196 | printf("for disk mode"); | ||
197 | #elif LCD_WIDTH >= (30*6) | ||
192 | printf("Hold MENU+SELECT to reboot"); | 198 | printf("Hold MENU+SELECT to reboot"); |
193 | printf("then SELECT+PLAY for disk mode"); | 199 | printf("then SELECT+PLAY for disk mode"); |
194 | #else | 200 | #else |