summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/menus/settings_menu.c1
-rw-r--r--firmware/export/config/ibassodx50.h1
-rw-r--r--firmware/export/config/ibassodx90.h1
-rw-r--r--firmware/target/hosted/ibasso/usb-ibasso.c8
-rw-r--r--firmware/usb.c14
5 files changed, 14 insertions, 11 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index 159ad08a44..96ad8009d3 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -393,7 +393,6 @@ MAKE_MENU(sel_softlock, ID2P(LANG_SOFTLOCK_SELECTIVE),
#if defined(DX50) || defined(DX90)
MENUITEM_SETTING(governor, &global_settings.governor, NULL);
-MENUITEM_SETTING(usb_mode, &global_settings.usb_mode, NULL);
#endif
MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
diff --git a/firmware/export/config/ibassodx50.h b/firmware/export/config/ibassodx50.h
index 22215ef9e4..0a7c04a739 100644
--- a/firmware/export/config/ibassodx50.h
+++ b/firmware/export/config/ibassodx50.h
@@ -36,6 +36,7 @@
#define MODEL_NAME "iBasso DX50"
#define USB_NONE
+#define HAVE_USB_POWER
/* define this if you have a colour LCD */
#define HAVE_LCD_COLOR
diff --git a/firmware/export/config/ibassodx90.h b/firmware/export/config/ibassodx90.h
index b0cff1a8d0..7071f50959 100644
--- a/firmware/export/config/ibassodx90.h
+++ b/firmware/export/config/ibassodx90.h
@@ -36,6 +36,7 @@
#define MODEL_NAME "iBasso DX90"
#define USB_NONE
+#define HAVE_USB_POWER
/* define this if you have a colour LCD */
#define HAVE_LCD_COLOR
diff --git a/firmware/target/hosted/ibasso/usb-ibasso.c b/firmware/target/hosted/ibasso/usb-ibasso.c
index c1ac7b222a..9889318cf2 100644
--- a/firmware/target/hosted/ibasso/usb-ibasso.c
+++ b/firmware/target/hosted/ibasso/usb-ibasso.c
@@ -21,7 +21,6 @@
*
****************************************************************************/
-
#include <stdlib.h>
#include "config.h"
@@ -31,7 +30,6 @@
#include "debug-ibasso.h"
#include "usb-ibasso.h"
-
static void usb_enable_adb(void)
{
TRACE;
@@ -46,7 +44,6 @@ static void usb_enable_adb(void)
DEBUGF("ERROR %s: No command processor available.", __func__);
}
-
static void usb_enable_mass_storage(void)
{
TRACE;
@@ -89,3 +86,8 @@ void ibasso_set_usb_mode(int mode)
}
}
}
+
+bool usb_powered_only(void)
+{
+ return false;
+}
diff --git a/firmware/usb.c b/firmware/usb.c
index 8443ffed3a..aca2683d58 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -817,13 +817,6 @@ int usb_release_exclusive_storage(void)
return bccount;
}
-#ifdef HAVE_USB_POWER
-bool usb_powered_only(void)
-{
- return usb_state == USB_POWERED;
-}
-#endif /* HAVE_USB_POWER */
-
#ifdef USB_ENABLE_HID
void usb_set_hid(bool enable)
{
@@ -832,6 +825,13 @@ void usb_set_hid(bool enable)
}
#endif /* USB_ENABLE_HID */
+#ifdef HAVE_USB_POWER
+bool usb_powered_only(void)
+{
+ return usb_state == USB_POWERED;
+}
+#endif /* HAVE_USB_POWER */
+
#elif defined(USB_NONE)
/* Dummy functions for USB_NONE */