diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-11-02 08:10:15 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-11-13 16:44:01 -0500 |
commit | 60f581e8f52fa0f7355b80b38fc2d57e78634ae4 (patch) | |
tree | 4051cf647a687fdf7c58e21010654d87e96a7aa1 /firmware/target | |
parent | fc4fff0b819a492e57dde76020c5ec78e2f8f6cc (diff) | |
download | rockbox-60f581e8f52fa0f7355b80b38fc2d57e78634ae4.tar.gz rockbox-60f581e8f52fa0f7355b80b38fc2d57e78634ae4.zip |
usb: Add ability to prompt user about what to do upon usb insertion
v3: Add in config option
v4: Bugfixes
v5: Force a redraw upon exiting
v6: keypress-in-chargeonly mode enables mass storage (and vice versa)
v7: Fix bootloader builds
v8: Update manual, and have bootloader respect keypresses
v9: Change default to mass storage (ie no change in behavior)
todo:
* test-build dx50/dx90
* Switch from yes/no to proper menu?
* prevent WPS progress bar from drawing over us
Change-Id: I82e0ccb08497b7a5aa756ce77f1332ee963703a7
...
Change-Id: I7946cf240b18a4fa8ace5e25e1eb6e97b8b12d7c
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/hosted/ibasso/usb-ibasso.c | 2 | ||||
-rw-r--r-- | firmware/target/hosted/ibasso/usb-ibasso.h | 20 |
2 files changed, 0 insertions, 22 deletions
diff --git a/firmware/target/hosted/ibasso/usb-ibasso.c b/firmware/target/hosted/ibasso/usb-ibasso.c index e1b134e545..9af932f94f 100644 --- a/firmware/target/hosted/ibasso/usb-ibasso.c +++ b/firmware/target/hosted/ibasso/usb-ibasso.c | |||
@@ -60,11 +60,9 @@ static void usb_enable_mass_storage(void) | |||
60 | DEBUGF("ERROR %s: No command processor available.", __func__); | 60 | DEBUGF("ERROR %s: No command processor available.", __func__); |
61 | } | 61 | } |
62 | 62 | ||
63 | |||
64 | /* Default at boot not known. */ | 63 | /* Default at boot not known. */ |
65 | static int _last_usb_mode = -1; | 64 | static int _last_usb_mode = -1; |
66 | 65 | ||
67 | |||
68 | void ibasso_set_usb_mode(int mode) | 66 | void ibasso_set_usb_mode(int mode) |
69 | { | 67 | { |
70 | DEBUGF("DEBUG %s: _last_usb_mode: %d, mode: %d.", __func__, _last_usb_mode, mode); | 68 | DEBUGF("DEBUG %s: _last_usb_mode: %d, mode: %d.", __func__, _last_usb_mode, mode); |
diff --git a/firmware/target/hosted/ibasso/usb-ibasso.h b/firmware/target/hosted/ibasso/usb-ibasso.h index f509d43038..6cd31134b6 100644 --- a/firmware/target/hosted/ibasso/usb-ibasso.h +++ b/firmware/target/hosted/ibasso/usb-ibasso.h | |||
@@ -25,30 +25,10 @@ | |||
25 | #ifndef _USB_DX50_H_ | 25 | #ifndef _USB_DX50_H_ |
26 | #define _USB_DX50_H_ | 26 | #define _USB_DX50_H_ |
27 | 27 | ||
28 | |||
29 | /* Supported usb modes. */ | ||
30 | enum ibasso_usb_mode | ||
31 | { | ||
32 | /* | ||
33 | USB mass storage mode. On USB connection, Rockbox will terminate and the internel and | ||
34 | external storage gets exported to the connected client. | ||
35 | */ | ||
36 | USB_MODE_MASS_STORAGE = 0, | ||
37 | |||
38 | /* | ||
39 | Actually the same, since we to not have proper USB detection. | ||
40 | Starts the adb server and enables adb connection over USB. Rockbox will continue to run. | ||
41 | */ | ||
42 | USB_MODE_CHARGE, | ||
43 | USB_MODE_ADB | ||
44 | }; | ||
45 | |||
46 | |||
47 | /* | 28 | /* |
48 | Set the usb mode. | 29 | Set the usb mode. |
49 | mode: ibasso_usb_mode | 30 | mode: ibasso_usb_mode |
50 | */ | 31 | */ |
51 | void ibasso_set_usb_mode(int mode); | 32 | void ibasso_set_usb_mode(int mode); |
52 | 33 | ||
53 | |||
54 | #endif | 34 | #endif |