mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
usb: Allow settings of all signals in usb_phy
Until now, only usb_phy signals for external PHY were defined. This is now extended with all OTG signals.
This commit is contained in:
@@ -18,7 +18,7 @@ set(srcs
|
||||
"uart_periph.c"
|
||||
"usb_periph.c"
|
||||
"temperature_sensor_periph.c"
|
||||
"usb_phy_periph.c")
|
||||
"usb_otg_periph.c")
|
||||
|
||||
add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" "${srcs}")
|
||||
|
||||
|
34
components/soc/esp32s2/usb_otg_periph.c
Normal file
34
components/soc/esp32s2/usb_otg_periph.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/usb_otg_periph.h"
|
||||
#include "soc/gpio_sig_map.h"
|
||||
|
||||
/*
|
||||
Bunch of constants for USB peripheral: GPIO signals
|
||||
*/
|
||||
const usb_phy_signal_conn_t usb_otg_periph_signal = {
|
||||
.extphy_vp_in = USB_EXTPHY_VP_IDX,
|
||||
.extphy_vm_in = USB_EXTPHY_VM_IDX,
|
||||
.extphy_rcv_in = USB_EXTPHY_RCV_IDX,
|
||||
.extphy_oen_out = USB_EXTPHY_OEN_IDX,
|
||||
.extphy_vpo_out = USB_EXTPHY_VPO_IDX,
|
||||
.extphy_vmo_out = USB_EXTPHY_VMO_IDX,
|
||||
.extphy_suspend_in = USB_EXTPHY_SUSPND_IDX,
|
||||
.extphy_speed_in = USB_EXTPHY_SPEED_IDX,
|
||||
.srp_bvalid_in = USB_SRP_BVALID_IN_IDX,
|
||||
.srp_sessend_in = USB_SRP_SESSEND_IN_IDX,
|
||||
.srp_chrgvbus_out = USB_SRP_CHRGVBUS_IDX,
|
||||
.srp_dischrgvbus_out = USB_SRP_DISCHRGVBUS_IDX,
|
||||
.otg_iddig_in = USB_OTG_IDDIG_IN_IDX,
|
||||
.otg_avalid_in = USB_OTG_AVALID_IN_IDX,
|
||||
.otg_vbusvalid_in = USB_OTG_VBUSVALID_IN_IDX,
|
||||
.otg_idpullup_out = USB_OTG_IDPULLUP_IDX,
|
||||
.otg_dppulldown_out = USB_OTG_DPPULLDOWN_IDX,
|
||||
.otg_dmpulldown_out = USB_OTG_DMPULLDOWN_IDX,
|
||||
.otg_drvvbus_out = USB_OTG_DRVVBUS_IDX,
|
||||
.module = PERIPH_USB_MODULE
|
||||
};
|
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/usb_phy_periph.h"
|
||||
#include "soc/gpio_sig_map.h"
|
||||
|
||||
/*
|
||||
Bunch of constants for USB peripheral: GPIO signals
|
||||
*/
|
||||
const usb_phy_signal_conn_t usb_phy_periph_signal = {
|
||||
.extphy_vp_in = USB_EXTPHY_VP_IDX,
|
||||
.extphy_vm_in = USB_EXTPHY_VM_IDX,
|
||||
.extphy_rcv_in = USB_EXTPHY_RCV_IDX,
|
||||
.extphy_oen_out = USB_EXTPHY_OEN_IDX,
|
||||
.extphy_vpo_out = USB_EXTPHY_VPO_IDX,
|
||||
.extphy_vmo_out = USB_EXTPHY_VMO_IDX,
|
||||
.extphy_suspend_in = USB_EXTPHY_SUSPND_IDX,
|
||||
.extphy_speed_in = USB_EXTPHY_SPEED_IDX,
|
||||
.module = PERIPH_USB_MODULE
|
||||
};
|
Reference in New Issue
Block a user