mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
h1x0/h300: consolidate a few code paths to logical equivalents
This saves a few bytes of precious space by consolidating paths where they can be combined with no change to the underlying algorithm. Change-Id: Ie6b7ead190a87d66fcbdcf2e351010bab751d952
This commit is contained in:
parent
3ef8455626
commit
29a20bd209
2 changed files with 18 additions and 16 deletions
|
@ -216,18 +216,17 @@ void try_flashboot(void)
|
||||||
|
|
||||||
case BOOT_ROM:
|
case BOOT_ROM:
|
||||||
start_flashed_romimage();
|
start_flashed_romimage();
|
||||||
recovery_mode = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BOOT_RAM:
|
case BOOT_RAM:
|
||||||
start_flashed_ramimage();
|
start_flashed_ramimage();
|
||||||
recovery_mode = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
case BOOT_RECOVERY:
|
||||||
recovery_mode = true;
|
break;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
recovery_mode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void failsafe_menu(void)
|
void failsafe_menu(void)
|
||||||
|
@ -451,10 +450,12 @@ void main(void)
|
||||||
|
|
||||||
/* Power on the hard drive early, to speed up the loading. */
|
/* Power on the hard drive early, to speed up the loading. */
|
||||||
if (!hold_status && !recovery_mode)
|
if (!hold_status && !recovery_mode)
|
||||||
|
{
|
||||||
ide_power_enable(true);
|
ide_power_enable(true);
|
||||||
|
|
||||||
if (!hold_status && (usb_detect() != USB_INSERTED) && !recovery_mode)
|
if (usb_detect() != USB_INSERTED)
|
||||||
try_flashboot();
|
try_flashboot();
|
||||||
|
}
|
||||||
|
|
||||||
lcd_init();
|
lcd_init();
|
||||||
|
|
||||||
|
|
|
@ -218,18 +218,17 @@ void try_flashboot(void)
|
||||||
|
|
||||||
case BOOT_ROM:
|
case BOOT_ROM:
|
||||||
start_flashed_romimage();
|
start_flashed_romimage();
|
||||||
recovery_mode = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BOOT_RAM:
|
case BOOT_RAM:
|
||||||
start_flashed_ramimage();
|
start_flashed_ramimage();
|
||||||
recovery_mode = true;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
case BOOT_RECOVERY:
|
||||||
recovery_mode = true;
|
break;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
recovery_mode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void failsafe_menu(void)
|
void failsafe_menu(void)
|
||||||
|
@ -429,10 +428,12 @@ void main(void)
|
||||||
|
|
||||||
/* Power on the hard drive early, to speed up the loading. */
|
/* Power on the hard drive early, to speed up the loading. */
|
||||||
if (!hold_status && !recovery_mode)
|
if (!hold_status && !recovery_mode)
|
||||||
|
{
|
||||||
ide_power_enable(true);
|
ide_power_enable(true);
|
||||||
|
|
||||||
if (!hold_status && (usb_detect() != USB_INSERTED) && !recovery_mode)
|
if (usb_detect() != USB_INSERTED)
|
||||||
try_flashboot();
|
try_flashboot();
|
||||||
|
}
|
||||||
|
|
||||||
lcd_init();
|
lcd_init();
|
||||||
lcd_remote_init();
|
lcd_remote_init();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue