mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 11:17:20 +02:00
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:
@ -15,11 +15,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* GPIOs used to connect an external USB PHY */
|
/* GPIOs used to connect an external USB PHY */
|
||||||
#define USBPHY_VP_NUM 33
|
#define USBPHY_VP_NUM 42
|
||||||
#define USBPHY_VM_NUM 34
|
#define USBPHY_VM_NUM 41
|
||||||
#define USBPHY_RCV_NUM 35
|
#define USBPHY_RCV_NUM 21
|
||||||
#define USBPHY_OEN_NUM 36
|
#define USBPHY_OEN_NUM 40
|
||||||
#define USBPHY_VPO_NUM 37
|
#define USBPHY_VPO_NUM 39
|
||||||
#define USBPHY_VMO_NUM 38
|
#define USBPHY_VMO_NUM 38
|
||||||
|
|
||||||
/* GPIOs corresponding to the pads of the internal USB PHY */
|
/* GPIOs corresponding to the pads of the internal USB PHY */
|
||||||
|
@ -37,16 +37,16 @@ esp_err_t tinyusb_driver_install(const tinyusb_config_t *config)
|
|||||||
.controller = USB_PHY_CTRL_OTG,
|
.controller = USB_PHY_CTRL_OTG,
|
||||||
.otg_mode = USB_OTG_MODE_DEVICE,
|
.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) {
|
if (config->external_phy) {
|
||||||
phy_conf.target = USB_PHY_TARGET_EXT;
|
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;
|
phy_conf.gpio_conf = &gpio_conf;
|
||||||
} else {
|
} else {
|
||||||
phy_conf.target = USB_PHY_TARGET_INT;
|
phy_conf.target = USB_PHY_TARGET_INT;
|
||||||
|
Reference in New Issue
Block a user