mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-11 16:37:45 -04:00
usb: finally get rid of USE_ROCKBOX_USB in Sansa bootloader, use bootloader usb
For some reason, the bootloader and config files didn't define HAVE_BOOTLOADER_USB_MODE, also remove the special cases in usb.c which they implied. Change-Id: I68c29be7d03627e64cac4ff7678e0c211e087a8c
This commit is contained in:
parent
246026cfcc
commit
761e7987c8
11 changed files with 18 additions and 13 deletions
|
|
@ -29,10 +29,10 @@
|
|||
#include "gcc_extensions.h"
|
||||
#include "../kernel-internal.h"
|
||||
#include "lcd.h"
|
||||
#ifdef USE_ROCKBOX_USB
|
||||
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||
#include "usb.h"
|
||||
#include "sysfont.h"
|
||||
#endif /* USE_ROCKBOX_USB */
|
||||
#endif /* HAVE_BOOTLOADER_USB_MODE */
|
||||
#include "backlight.h"
|
||||
#include "button-target.h"
|
||||
#include "common.h"
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
void show_logo(void);
|
||||
|
||||
#ifdef USE_ROCKBOX_USB
|
||||
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||
static void usb_mode(void)
|
||||
{
|
||||
if(usb_detect() != USB_INSERTED)
|
||||
|
|
@ -73,7 +73,7 @@ static void usb_mode(void)
|
|||
reset_screen();
|
||||
lcd_update();
|
||||
}
|
||||
#endif /* USE_ROCKBOX_USB */
|
||||
#endif /* HAVE_BOOTLOADER_USB_MODE */
|
||||
|
||||
void main(void) NORETURN_ATTR;
|
||||
void main(void)
|
||||
|
|
@ -122,7 +122,7 @@ void main(void)
|
|||
|
||||
filesystem_init();
|
||||
|
||||
#ifdef USE_ROCKBOX_USB
|
||||
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||
usb_init();
|
||||
|
||||
/* Enter USB mode if USB is plugged and SELECT button is pressed */
|
||||
|
|
@ -131,11 +131,11 @@ void main(void)
|
|||
if(usb_detect() == USB_INSERTED)
|
||||
usb_mode();
|
||||
}
|
||||
#endif /* USE_ROCKBOX_USB */
|
||||
#endif /* HAVE_BOOTLOADER_USB_MODE */
|
||||
|
||||
while((ret = disk_mount_all()) <= 0)
|
||||
{
|
||||
#ifdef USE_ROCKBOX_USB
|
||||
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||
error(EDISK, ret, false);
|
||||
usb_mode();
|
||||
#else
|
||||
|
|
@ -150,7 +150,7 @@ void main(void)
|
|||
|
||||
while((ret = load_firmware(loadbuffer, BOOTFILE, buffer_size)) <= EFILE_EMPTY)
|
||||
{
|
||||
#ifdef USE_ROCKBOX_USB
|
||||
#ifdef HAVE_BOOTLOADER_USB_MODE
|
||||
error(EBOOTFILE, ret, false);
|
||||
usb_mode();
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue