1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Miika Pekkarinen 2006-08-11 19:59:16 +00:00
parent 3491147fd0
commit 22860a910a
2 changed files with 23 additions and 23 deletions

View file

@ -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;

View file

@ -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);