diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2006-08-11 19:59:16 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-08-11 19:59:16 +0000 |
| commit | 22860a910a7ddbb9b811fce4cf971e097c8e6eac (patch) | |
| tree | 022ce2ca2e0c09561d60295fe1c9c2df1f3e3c62 | |
| parent | 3491147fd0be9684261b1cd8e8e9c909a8fb26ce (diff) | |
| download | rockbox-22860a910a7ddbb9b811fce4cf971e097c8e6eac.zip rockbox-22860a910a7ddbb9b811fce4cf971e097c8e6eac.tar.gz rockbox-22860a910a7ddbb9b811fce4cf971e097c8e6eac.tar.bz2 rockbox-22860a910a7ddbb9b811fce4cf971e097c8e6eac.tar.xz | |
Fixed hold switch detection from bootloader when rockbox has been
flashed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10533 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/plugins/iriver_flash.c | 2 | ||||
| -rw-r--r-- | bootloader/main.c | 44 |
2 files changed, 23 insertions, 23 deletions
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c index 40c9a29..f919a0d 100644 --- a/apps/plugins/iriver_flash.c +++ b/apps/plugins/iriver_flash.c @@ -404,7 +404,7 @@ int flash_bootloader(const char *filename) rb->snprintf(buf, sizeof buf, "crc32 = 0x%08x", crc32); rb->splash(HZ*10, true, buf); #else - if (crc32 != 0xa930906d) + if (crc32 != 0x77395351) { rb->splash(HZ*3, true, "Untested bootloader"); return -2; diff --git a/bootloader/main.c b/bootloader/main.c index 0ef6d89..0b05827 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -334,6 +334,28 @@ void main(void) rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC) || ((button_status() & BUTTON_RC_REC) == BUTTON_RC_REC); + /* Don't start if the Hold button is active on the device you + are starting with */ + if (!usb_detect() && ((on_button && button_hold()) || + (rc_on_button && remote_button_hold()))) + { + printf("HOLD switch on, power off..."); + lcd_update(); + sleep(HZ*2); + + /* Backlight OFF */ +#ifdef HAVE_REMOTE_LCD +#ifdef IRIVER_H300_SERIES + or_l(0x00000002, &GPIO1_OUT); +#else + or_l(0x00000800, &GPIO_OUT); +#endif +#endif + /* Reset the cookie for the crt0 crash check */ + asm(" move.l #0,%d0"); + asm(" move.l %d0,0x10017ffc"); + power_off(); + } #ifdef HAVE_EEPROM firmware_settings.initialized = false; @@ -393,28 +415,6 @@ void main(void) } } - /* Don't start if the Hold button is active on the device you - are starting with */ - if(!usb_detect() && ((on_button && button_hold()) || - (rc_on_button && remote_button_hold()))) { - printf("HOLD switch on, power off..."); - lcd_update(); - sleep(HZ*2); - - /* Backlight OFF */ -#ifdef HAVE_REMOTE_LCD -#ifdef IRIVER_H300_SERIES - or_l(0x00000002, &GPIO1_OUT); -#else - or_l(0x00000800, &GPIO_OUT); -#endif -#endif - /* Reset the cookie for the crt0 crash check */ - asm(" move.l #0,%d0"); - asm(" move.l %d0,0x10017ffc"); - power_off(); - } - usb_init(); adc_battery = adc_read(ADC_BATTERY); |