Make code that depends on HAVE_USB_CHARGING_ENABLE check HAVE_USBSTACK.
This fixes building without HAVE_USBSTACK Change-Id: If8fec87a3ed4de583864ed2bab69be1f2ad8ac52
This commit is contained in:
parent
5caaf70f34
commit
64d048be2b
4 changed files with 5 additions and 5 deletions
|
@ -173,7 +173,7 @@ MENUITEM_SETTING(battery_capacity, &global_settings.battery_capacity, NULL);
|
||||||
#if BATTERY_TYPES_COUNT > 1
|
#if BATTERY_TYPES_COUNT > 1
|
||||||
MENUITEM_SETTING(battery_type, &global_settings.battery_type, NULL);
|
MENUITEM_SETTING(battery_type, &global_settings.battery_type, NULL);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_USB_CHARGING_ENABLE
|
#if defined (HAVE_USBSTACK) && defined(HAVE_USB_CHARGING_ENABLE)
|
||||||
static int usbcharging_callback(int action,const struct menu_item_ex *this_item)
|
static int usbcharging_callback(int action,const struct menu_item_ex *this_item)
|
||||||
{
|
{
|
||||||
(void)this_item;
|
(void)this_item;
|
||||||
|
@ -194,7 +194,7 @@ MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON,
|
||||||
#if BATTERY_TYPES_COUNT > 1
|
#if BATTERY_TYPES_COUNT > 1
|
||||||
&battery_type,
|
&battery_type,
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_USB_CHARGING_ENABLE
|
#if defined (HAVE_USBSTACK) && defined(HAVE_USB_CHARGING_ENABLE)
|
||||||
&usb_charging,
|
&usb_charging,
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
|
@ -1020,7 +1020,7 @@ void settings_apply(bool read_disk)
|
||||||
touchpad_set_sensitivity(global_settings.touchpad_sensitivity);
|
touchpad_set_sensitivity(global_settings.touchpad_sensitivity);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_USB_CHARGING_ENABLE
|
#if defined (HAVE_USBSTACK) && defined(HAVE_USB_CHARGING_ENABLE)
|
||||||
usb_charging_enable(global_settings.usb_charging);
|
usb_charging_enable(global_settings.usb_charging);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -619,7 +619,7 @@ struct user_settings
|
||||||
#ifdef HAVE_SPDIF_POWER
|
#ifdef HAVE_SPDIF_POWER
|
||||||
bool spdif_enable; /* S/PDIF power on/off */
|
bool spdif_enable; /* S/PDIF power on/off */
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_USB_CHARGING_ENABLE
|
#if defined (HAVE_USBSTACK) && defined(HAVE_USB_CHARGING_ENABLE)
|
||||||
int usb_charging;
|
int usb_charging;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1690,7 +1690,7 @@ const struct settings_list settings[] = {
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
TEXT_SETTING(0,kbd_file,"kbd","-",ROCKBOX_DIR "/",".kbd"),
|
TEXT_SETTING(0,kbd_file,"kbd","-",ROCKBOX_DIR "/",".kbd"),
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_USB_CHARGING_ENABLE
|
#if defined (HAVE_USBSTACK) && defined(HAVE_USB_CHARGING_ENABLE)
|
||||||
CHOICE_SETTING(0, usb_charging, LANG_USB_CHARGING, 1, "usb charging",
|
CHOICE_SETTING(0, usb_charging, LANG_USB_CHARGING, 1, "usb charging",
|
||||||
"off,on,force", NULL, 3, ID2P(LANG_SET_BOOL_NO),
|
"off,on,force", NULL, 3, ID2P(LANG_SET_BOOL_NO),
|
||||||
ID2P(LANG_SET_BOOL_YES), ID2P(LANG_FORCE)),
|
ID2P(LANG_SET_BOOL_YES), ID2P(LANG_FORCE)),
|
||||||
|
|
Loading…
Reference in a new issue