Skip to content

Commit a3a9d0b

Browse files
Deomid Ryabkovcesantabot
authored andcommitted
Add clock mode selection knob for ESP32
See https://github.com/cesanta/esp-idf/blob/master/examples/ethernet/ethernet/README.md#phy-clock-wiring for details CL: Add clock mode selection knob for ESP32 PUBLISHED_FROM=d93bb909ccdc1c1236f9cba01313577391c5b395
1 parent bf979d2 commit a3a9d0b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mos_esp32.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ cdefs:
77
# MGOS_ETH_PHY_TLK110: 1
88

99
config_schema:
10+
- ["eth.clk_mode", "i", 0, {title: "50 MHz clock source: 0 in <- GPIO0, 1 out -> GPIO0, 2 out -> GPIO16, 3 out -> GPIO17 (inverted)"}]
1011
- ["eth.mdc_gpio", "i", 23, {title: "GPIO to use for RMII MDC signal"}]
1112
- ["eth.mdio_gpio", "i", 18, {title: "GPIO to use for RMII MDIO signal"}]

src/esp32/esp32_eth.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ bool mgos_ethernet_init(void) {
5353

5454
/* Set the PHY address in the example configuration */
5555
config.phy_addr = mgos_sys_config_get_eth_phy_addr();
56+
config.clock_mode = mgos_sys_config_get_eth_clk_mode();
5657
config.gpio_config = eth_config_pins;
5758
config.tcpip_input = tcpip_adapter_eth_input;
5859

0 commit comments

Comments
 (0)