We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 285b435 commit 7f2f41bCopy full SHA for 7f2f41b
libraries/USBHOST/src/USBHost.cpp
@@ -3,6 +3,10 @@
3
4
static rtos::Thread t(osPriorityHigh);
5
6
+void USBHost::supplyPowerOnVBUS(bool enable){
7
+ mbed::DigitalOut otg(PJ_6, enable ? 0 : 1);
8
+}
9
+
10
void USBHost::InternalTask() {
11
while (1) {
12
tusbh_msg_loop(mq);
libraries/USBHOST/src/USBHost.h
@@ -26,6 +26,12 @@ class USBHost {
26
return _hs;
27
};
28
29
+ /**
30
+ * Allows to provide power to USB devices on VBUS when powered through VIN.
31
+ * @param enable A flag to indicate whether power is supplied on VBUS.
32
+ */
33
+ void supplyPowerOnVBUS(bool enable);
34
35
private:
36
37
void InternalTask();
0 commit comments