Skip to content

Commit 260c24b

Browse files
committed
added vbus_monitor files in tinyusb.c
1 parent 1164cd9 commit 260c24b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

device/esp_tinyusb/tinyusb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "esp_private/usb_phy.h"
1212
#include "tinyusb.h"
1313
#include "tinyusb_task.h"
14+
#include "tinyusb_vbus_monitor.h"
1415
#include "tusb.h"
1516

1617
#if (CONFIG_TINYUSB_MSC_ENABLED)
@@ -133,9 +134,8 @@ esp_err_t tinyusb_driver_install(const tinyusb_config_t *config)
133134
#endif // (SOC_USB_OTG_PERIPH_NUM > 1)
134135

135136
// OTG IOs config
136-
const usb_phy_otg_io_conf_t otg_io_conf = USB_PHY_SELF_POWERED_DEVICE(config->phy.vbus_monitor_io);
137137
if (config->phy.self_powered) {
138-
phy_conf.otg_io_conf = &otg_io_conf;
138+
tinyusb_vbus_monitor_init(config->phy.vbus_monitor_io);
139139
}
140140
ESP_RETURN_ON_ERROR(usb_new_phy(&phy_conf, &phy_hdl), TAG, "Install USB PHY failed");
141141
}

0 commit comments

Comments
 (0)