x1000: Fix USB connection problems in bootloader

This problem actually had nothing to do with USB boot; it's
because the cable is plugged in when the USB mode menu item
is selected. The USB thread detected the select button press
and went into charge-only mode (as it usually does when you
hold down a key in Rockbox). This is fixed by having the USB
thread ignore most keys in the bootloader.

USB connect events are delivered via the button queue, and
there were also cases where the connection could be missed
if the event happened within another UI screen. This should
also be fixed.

Change-Id: I077d705a6ac845c8713219eee45d26aa6addfa61
This commit is contained in:
Aidan MacDonald 2022-01-02 13:09:08 +00:00
parent af872b54ec
commit 83c2398384
4 changed files with 41 additions and 28 deletions

View file

@ -122,6 +122,11 @@
#define USB_WRITE_BUFFER_SIZE (128 * 1024)
#endif
#ifdef BOOTLOADER
/* Ignore on any key can cause surprising USB issues in the bootloader */
# define USBPOWER_BTN_IGNORE (~(BUTTON_PREV|BUTTON_NEXT))
#endif
/* Rockbox capabilities */
#define HAVE_VOLUME_IN_LIST
#define HAVE_FAT16SUPPORT

View file

@ -123,6 +123,11 @@
#define USB_WRITE_BUFFER_SIZE (128 * 1024)
#endif
#ifdef BOOTLOADER
/* Ignore on any key can cause surprising USB issues in the bootloader */
# define USBPOWER_BTN_IGNORE (~(BUTTON_VOL_UP|BUTTON_VOL_DOWN))
#endif
/* Rockbox capabilities */
#define HAVE_FAT16SUPPORT
#define HAVE_ALBUMART

View file

@ -113,6 +113,11 @@
#define USB_WRITE_BUFFER_SIZE (128 * 1024)
#endif
#ifdef BOOTLOADER
/* Ignore on any key can cause surprising USB issues in the bootloader */
# define USBPOWER_BTN_IGNORE (~(BUTTON_PREV|BUTTON_NEXT))
#endif
/* Rockbox capabilities */
#define HAVE_FAT16SUPPORT
#define HAVE_ALBUMART