Merge branch 'bugfix/tinyusb_prs_v4.4' into 'release/v4.4'

Fix tinyusb_driver_install (dangling pointer) and ESP32S3 USB external PHY pinout (backport v4.4)

See merge request espressif/esp-idf!18978
This commit is contained in:
Jiang Jiang Jian 2022-07-12 10:31:14 +08:00
commit b3e8d0f7bf
2 changed files with 13 additions and 13 deletions

View File

@ -15,11 +15,11 @@
#pragma once
/* GPIOs used to connect an external USB PHY */
#define USBPHY_VP_NUM 33
#define USBPHY_VM_NUM 34
#define USBPHY_RCV_NUM 35
#define USBPHY_OEN_NUM 36
#define USBPHY_VPO_NUM 37
#define USBPHY_VP_NUM 42
#define USBPHY_VM_NUM 41
#define USBPHY_RCV_NUM 21
#define USBPHY_OEN_NUM 40
#define USBPHY_VPO_NUM 39
#define USBPHY_VMO_NUM 38
/* GPIOs corresponding to the pads of the internal USB PHY */

View File

@ -37,16 +37,16 @@ esp_err_t tinyusb_driver_install(const tinyusb_config_t *config)
.controller = USB_PHY_CTRL_OTG,
.otg_mode = USB_OTG_MODE_DEVICE,
};
usb_phy_gpio_conf_t gpio_conf = {
.vp_io_num = USBPHY_VP_NUM,
.vm_io_num = USBPHY_VM_NUM,
.rcv_io_num = USBPHY_RCV_NUM,
.oen_io_num = USBPHY_OEN_NUM,
.vpo_io_num = USBPHY_VPO_NUM,
.vmo_io_num = USBPHY_VMO_NUM,
};
if (config->external_phy) {
phy_conf.target = USB_PHY_TARGET_EXT;
usb_phy_gpio_conf_t gpio_conf = {
.vp_io_num = USBPHY_VP_NUM,
.vm_io_num = USBPHY_VM_NUM,
.rcv_io_num = USBPHY_RCV_NUM,
.oen_io_num = USBPHY_OEN_NUM,
.vpo_io_num = USBPHY_VPO_NUM,
.vmo_io_num = USBPHY_VMO_NUM,
};
phy_conf.gpio_conf = &gpio_conf;
} else {
phy_conf.target = USB_PHY_TARGET_INT;