summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-11-13 20:03:49 -0500
committerSolomon Peachy <pizza@shaftnet.org>2020-11-13 20:04:04 -0500
commit03cd7730510558d6434f205743d71c3e197df608 (patch)
tree910e1a83b01eded7efae0ff67b880841e0da90dc /firmware
parent43f90746d5610a36eaf7dc98b9fa3ca17ee6010e (diff)
downloadrockbox-03cd7730510558d6434f205743d71c3e197df608.tar.gz
rockbox-03cd7730510558d6434f205743d71c3e197df608.zip
ibasso: Hopefully hack usb into building again.
Change-Id: I6f369d60319704ab4d2c18b80ba6e78902630790
Diffstat (limited to 'firmware')
-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
4 files changed, 14 insertions, 10 deletions
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 @@
36#define MODEL_NAME "iBasso DX50" 36#define MODEL_NAME "iBasso DX50"
37 37
38#define USB_NONE 38#define USB_NONE
39#define HAVE_USB_POWER
39 40
40/* define this if you have a colour LCD */ 41/* define this if you have a colour LCD */
41#define HAVE_LCD_COLOR 42#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 @@
36#define MODEL_NAME "iBasso DX90" 36#define MODEL_NAME "iBasso DX90"
37 37
38#define USB_NONE 38#define USB_NONE
39#define HAVE_USB_POWER
39 40
40/* define this if you have a colour LCD */ 41/* define this if you have a colour LCD */
41#define HAVE_LCD_COLOR 42#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 @@
21 * 21 *
22 ****************************************************************************/ 22 ****************************************************************************/
23 23
24
25#include <stdlib.h> 24#include <stdlib.h>
26 25
27#include "config.h" 26#include "config.h"
@@ -31,7 +30,6 @@
31#include "debug-ibasso.h" 30#include "debug-ibasso.h"
32#include "usb-ibasso.h" 31#include "usb-ibasso.h"
33 32
34
35static void usb_enable_adb(void) 33static void usb_enable_adb(void)
36{ 34{
37 TRACE; 35 TRACE;
@@ -46,7 +44,6 @@ static void usb_enable_adb(void)
46 DEBUGF("ERROR %s: No command processor available.", __func__); 44 DEBUGF("ERROR %s: No command processor available.", __func__);
47} 45}
48 46
49
50static void usb_enable_mass_storage(void) 47static void usb_enable_mass_storage(void)
51{ 48{
52 TRACE; 49 TRACE;
@@ -89,3 +86,8 @@ void ibasso_set_usb_mode(int mode)
89 } 86 }
90 } 87 }
91} 88}
89
90bool usb_powered_only(void)
91{
92 return false;
93}
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)
817 return bccount; 817 return bccount;
818} 818}
819 819
820#ifdef HAVE_USB_POWER
821bool usb_powered_only(void)
822{
823 return usb_state == USB_POWERED;
824}
825#endif /* HAVE_USB_POWER */
826
827#ifdef USB_ENABLE_HID 820#ifdef USB_ENABLE_HID
828void usb_set_hid(bool enable) 821void usb_set_hid(bool enable)
829{ 822{
@@ -832,6 +825,13 @@ void usb_set_hid(bool enable)
832} 825}
833#endif /* USB_ENABLE_HID */ 826#endif /* USB_ENABLE_HID */
834 827
828#ifdef HAVE_USB_POWER
829bool usb_powered_only(void)
830{
831 return usb_state == USB_POWERED;
832}
833#endif /* HAVE_USB_POWER */
834
835#elif defined(USB_NONE) 835#elif defined(USB_NONE)
836/* Dummy functions for USB_NONE */ 836/* Dummy functions for USB_NONE */
837 837