1
0
Fork 0
forked from len0rd/rockbox

H300: Bootloader USB mode detection on EXTON wakeup

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8326 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2006-01-10 23:11:57 +00:00
parent befd0ac3a6
commit 54da924e43
3 changed files with 6 additions and 4 deletions

View file

@ -175,7 +175,7 @@ void main(void)
power_init();
/* Turn off if neither ON button is pressed */
if(!(on_button || rc_on_button))
if(!(on_button || rc_on_button || usb_detect()))
power_off();
/* Backlight ON */
@ -243,8 +243,8 @@ void main(void)
/* Don't start if the Hold button is active on the device you
are starting with */
if((on_button && button_hold()) ||
(rc_on_button && remote_button_hold())) {
if(!usb_detect() && ((on_button && button_hold()) ||
(rc_on_button && remote_button_hold()))) {
lcd_puts(0, 8, "HOLD switch on, power off...");
lcd_update();
sleep(HZ*2);