mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
Merge branch 'bugfix/ethernet_mdc_mdio_config' into 'master'
Ethernet: set direction of SMI pins MDC and MDIO correctly See merge request idf/esp-idf!1939
This commit is contained in:
@ -40,8 +40,12 @@ void phy_rmii_configure_data_interface_pins(void)
|
||||
|
||||
void phy_rmii_smi_configure_pins(uint8_t mdc_gpio, uint8_t mdio_gpio)
|
||||
{
|
||||
// setup SMI MDC pin
|
||||
gpio_set_direction(mdc_gpio, GPIO_MODE_OUTPUT);
|
||||
gpio_matrix_out(mdc_gpio, EMAC_MDC_O_IDX, 0, 0);
|
||||
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[mdc_gpio], PIN_FUNC_GPIO);
|
||||
// setup SMI MDIO pin
|
||||
gpio_set_direction(mdio_gpio, GPIO_MODE_INPUT_OUTPUT);
|
||||
gpio_matrix_out(mdio_gpio, EMAC_MDO_O_IDX, 0, 0);
|
||||
gpio_matrix_in(mdio_gpio, EMAC_MDI_I_IDX, 0);
|
||||
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[mdio_gpio], PIN_FUNC_GPIO);
|
||||
|
Reference in New Issue
Block a user