summaryrefslogtreecommitdiff
path: root/firmware/export/usb.h
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-11-02 08:10:15 -0500
committerSolomon Peachy <pizza@shaftnet.org>2020-11-13 16:44:01 -0500
commit60f581e8f52fa0f7355b80b38fc2d57e78634ae4 (patch)
tree4051cf647a687fdf7c58e21010654d87e96a7aa1 /firmware/export/usb.h
parentfc4fff0b819a492e57dde76020c5ec78e2f8f6cc (diff)
downloadrockbox-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/export/usb.h')
-rw-r--r--firmware/export/usb.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/export/usb.h b/firmware/export/usb.h
index b7b846d5b3..edc37bd5b6 100644
--- a/firmware/export/usb.h
+++ b/firmware/export/usb.h
@@ -131,6 +131,15 @@ enum
131#endif 131#endif
132}; 132};
133 133
134/* Supported usb modes. */
135enum
136{
137 USB_MODE_ASK = 0,
138 USB_MODE_MASS_STORAGE,
139 USB_MODE_CHARGE,
140 USB_MODE_ADB
141};
142
134#ifdef HAVE_USB_POWER 143#ifdef HAVE_USB_POWER
135/*allow people to define this in config-target.h if they need it*/ 144/*allow people to define this in config-target.h if they need it*/
136#if !defined(USBPOWER_BTN_IGNORE) 145#if !defined(USBPOWER_BTN_IGNORE)
@@ -215,6 +224,7 @@ void usb_charging_maxcurrent_change(int maxcurrent);
215/* returns the maximum allowed USB current, based on USB charging mode and state */ 224/* returns the maximum allowed USB current, based on USB charging mode and state */
216int usb_charging_maxcurrent(void); 225int usb_charging_maxcurrent(void);
217#endif /* HAVE_USB_CHARGING_ENABLE */ 226#endif /* HAVE_USB_CHARGING_ENABLE */
227void usb_set_mode(int mode);
218#endif /* HAVE_USB_POWER */ 228#endif /* HAVE_USB_POWER */
219#ifdef HAVE_USBSTACK 229#ifdef HAVE_USBSTACK
220/* USB driver call this function to notify that a transfer has completed */ 230/* USB driver call this function to notify that a transfer has completed */