diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-15 14:11:41 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-15 14:11:41 -0400 |
commit | 2e072236908deb8b331d16b058c7294226422b67 (patch) | |
tree | 39ce68d108c186e0124dda81e91e855c3c14edbd | |
parent | 455a23bdabb544de6296f4be9d5a6d8363a3d9cf (diff) | |
download | rockbox-2e072236908deb8b331d16b058c7294226422b67.tar.gz rockbox-2e072236908deb8b331d16b058c7294226422b67.zip |
m3k: Fixes for the M3K.
* Cannot turn off the LCD directly (have to rely on backlight)
* Only insmod/rmmod the usb gadget modules if state changes
Change-Id: I9ea90177d496cd035ada93e04a93a7c6f2e84706
-rw-r--r-- | firmware/export/config/fiiom3k.h | 2 | ||||
-rw-r--r-- | firmware/target/hosted/fiio/usb-fiio.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/firmware/export/config/fiiom3k.h b/firmware/export/config/fiiom3k.h index 01fc19d542..ebf7117984 100644 --- a/firmware/export/config/fiiom3k.h +++ b/firmware/export/config/fiiom3k.h | |||
@@ -28,8 +28,6 @@ | |||
28 | /* define this if you have a colour LCD */ | 28 | /* define this if you have a colour LCD */ |
29 | #define HAVE_LCD_COLOR | 29 | #define HAVE_LCD_COLOR |
30 | 30 | ||
31 | #define HAVE_LCD_ENABLE | ||
32 | |||
33 | /* define this if you want album art for this target */ | 31 | /* define this if you want album art for this target */ |
34 | #define HAVE_ALBUMART | 32 | #define HAVE_ALBUMART |
35 | 33 | ||
diff --git a/firmware/target/hosted/fiio/usb-fiio.c b/firmware/target/hosted/fiio/usb-fiio.c index 76a0ec5a2b..3084ee0169 100644 --- a/firmware/target/hosted/fiio/usb-fiio.c +++ b/firmware/target/hosted/fiio/usb-fiio.c | |||
@@ -39,8 +39,14 @@ int usb_detect(void) | |||
39 | return present ? USB_INSERTED : USB_EXTRACTED; | 39 | return present ? USB_INSERTED : USB_EXTRACTED; |
40 | } | 40 | } |
41 | 41 | ||
42 | static bool usb_enabled = 0; | ||
43 | |||
42 | void usb_enable(bool on) | 44 | void usb_enable(bool on) |
43 | { | 45 | { |
46 | if (usb_enabled == on) | ||
47 | return; | ||
48 | |||
49 | usb_enabled = on; | ||
44 | if (on) | 50 | if (on) |
45 | { | 51 | { |
46 | system ("insmod /lib/modules/3.10.14/kernel/driver/usb/gadget/libcomposite.ko"); | 52 | system ("insmod /lib/modules/3.10.14/kernel/driver/usb/gadget/libcomposite.ko"); |