diff options
-rw-r--r-- | apps/settings_list.c | 8 | ||||
-rw-r--r-- | firmware/export/config/erosqnative.h | 1 | ||||
-rw-r--r-- | firmware/export/config/fiiom3k.h | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c index 4c92bb4322..d9ffd8cf3e 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -345,6 +345,12 @@ static const char graphic_numeric[] = "graphic,numeric"; #endif #endif /* HAVE_BACKLIGHT */ +#if defined(HAVE_USB_CHARGING_ENABLE) +# if !defined(TARGET_USB_CHARGING_DEFAULT) +# define TARGET_USB_CHARGING_DEFAULT USB_CHARGING_ENABLE +# endif +#endif + #if LCD_DEPTH > 1 static const char* list_pad_formatter(char *buffer, size_t buffer_size, int val, const char *unit) @@ -1827,7 +1833,7 @@ const struct settings_list settings[] = { #endif TEXT_SETTING(0,kbd_file,"kbd","-",ROCKBOX_DIR "/",".kbd"), #ifdef HAVE_USB_CHARGING_ENABLE - CHOICE_SETTING(0, usb_charging, LANG_USB_CHARGING, 1, "usb charging", + CHOICE_SETTING(0, usb_charging, LANG_USB_CHARGING, TARGET_USB_CHARGING_DEFAULT, "usb charging", "off,on,force", NULL, 3, ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES), ID2P(LANG_FORCE)), #endif diff --git a/firmware/export/config/erosqnative.h b/firmware/export/config/erosqnative.h index b2b6f3f89e..e0a668d82d 100644 --- a/firmware/export/config/erosqnative.h +++ b/firmware/export/config/erosqnative.h @@ -114,6 +114,7 @@ #define USB_DEVBSS_ATTR __attribute__((aligned(32))) #define HAVE_USB_POWER #define HAVE_USB_CHARGING_ENABLE +#define TARGET_USB_CHARGING_DEFAULT USB_CHARGING_FORCE #define HAVE_BOOTLOADER_USB_MODE #endif diff --git a/firmware/export/config/fiiom3k.h b/firmware/export/config/fiiom3k.h index 849aa9c0a6..dc56f0a5cc 100644 --- a/firmware/export/config/fiiom3k.h +++ b/firmware/export/config/fiiom3k.h @@ -114,6 +114,7 @@ #define USB_DEVBSS_ATTR __attribute__((aligned(32))) #define HAVE_USB_POWER #define HAVE_USB_CHARGING_ENABLE +#define TARGET_USB_CHARGING_DEFAULT USB_CHARGING_FORCE #define HAVE_BOOTLOADER_USB_MODE #endif |