From 83c23983841fd363a5a2c0e5cbd194110025226c Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sun, 2 Jan 2022 13:09:08 +0000 Subject: 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 --- firmware/export/config/shanlingq1.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'firmware/export/config/shanlingq1.h') diff --git a/firmware/export/config/shanlingq1.h b/firmware/export/config/shanlingq1.h index 18786e9a4b..1355c1824e 100644 --- a/firmware/export/config/shanlingq1.h +++ b/firmware/export/config/shanlingq1.h @@ -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 -- cgit v1.2.3