From b357999c2bb6d0d94fc461b80c003fc641fbe056 Mon Sep 17 00:00:00 2001 From: thirstyice Date: Tue, 25 Feb 2025 19:56:13 -0700 Subject: [PATCH 1/2] Add ethernet option I figure I can't be the only one to do ethernet like this --- wled00/data/settings_wifi.htm | 3 ++- wled00/network.cpp | 24 +++++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/wled00/data/settings_wifi.htm b/wled00/data/settings_wifi.htm index 1531d161fc..2099ae45b1 100644 --- a/wled00/data/settings_wifi.htm +++ b/wled00/data/settings_wifi.htm @@ -80,7 +80,7 @@ select.appendChild(option); if (input.value === "" || input.value === "Your_Network" || found) input.replaceWith(select); - else select.remove(); + else select.remove(); } } @@ -225,6 +225,7 @@

Ethernet Type

+


diff --git a/wled00/network.cpp b/wled00/network.cpp index 79209ff5e9..57d33c1b19 100644 --- a/wled00/network.cpp +++ b/wled00/network.cpp @@ -107,10 +107,10 @@ const ethernet_settings ethernetBoards[] = { // ABC! WLED Controller V43 + Ethernet Shield & compatible { - 1, // eth_address, - 5, // eth_power, - 23, // eth_mdc, - 33, // eth_mdio, + 1, // eth_address, + 5, // eth_power, + 23, // eth_mdc, + 33, // eth_mdio, ETH_PHY_LAN8720, // eth_type, ETH_CLOCK_GPIO17_OUT // eth_clk_mode }, @@ -134,7 +134,7 @@ const ethernet_settings ethernetBoards[] = { ETH_PHY_LAN8720, // eth_type, ETH_CLOCK_GPIO0_OUT // eth_clk_mode }, - + // LILYGO T-POE Pro // https://github.com/Xinyuan-LilyGO/LilyGO-T-ETH-Series/blob/master/schematic/T-POE-PRO.pdf { @@ -144,6 +144,17 @@ const ethernet_settings ethernetBoards[] = { 18, // eth_mdio, ETH_PHY_LAN8720, // eth_type, ETH_CLOCK_GPIO0_OUT // eth_clk_mode + }, + + // Thirstyice's ethernet hookup + // (Same as Quinled-Dig-Octa, but uses GPIO0 instead of GPIO17) + { + 1, // eth_address, + -1, // eth_power, + 23, // eth_mdc, + 18, // eth_mdio, + ETH_PHY_LAN8720, // eth_type, + ETH_CLOCK_GPIO0_OUT // eth_clk_mode } }; @@ -206,7 +217,7 @@ bool initEthernet() /* For LAN8720 the most correct way is to perform clean reset each time before init applying LOW to power or nRST pin for at least 100 us (please refer to datasheet, page 59) - ESP_IDF > V4 implements it (150 us, lan87xx_reset_hw(esp_eth_phy_t *phy) function in + ESP_IDF > V4 implements it (150 us, lan87xx_reset_hw(esp_eth_phy_t *phy) function in /components/esp_eth/src/esp_eth_phy_lan87xx.c, line 280) but ESP_IDF < V4 does not. Lets do it: [not always needed, might be relevant in some EMI situations at startup and for hot resets] @@ -425,4 +436,3 @@ void WiFiEvent(WiFiEvent_t event) break; } } - From b3cc62a9c2132ea84ef9a28a886873cbe58342b0 Mon Sep 17 00:00:00 2001 From: thirstyice Date: Wed, 26 Feb 2025 12:21:23 -0700 Subject: [PATCH 2/2] Add new ethernet option to const.h --- wled00/const.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wled00/const.h b/wled00/const.h index b830bed74d..e215e52132 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -371,7 +371,7 @@ #define BTN_TYPE_TOUCH_SWITCH 9 //Ethernet board types -#define WLED_NUM_ETH_TYPES 13 +#define WLED_NUM_ETH_TYPES 14 #define WLED_ETH_NONE 0 #define WLED_ETH_WT32_ETH01 1 @@ -386,6 +386,7 @@ #define WLED_ETH_SERG74 10 #define WLED_ETH_ESP32_POE_WROVER 11 #define WLED_ETH_LILYGO_T_POE_PRO 12 +#define WLED_ETH_THIRSTYICE 13 //Hue error codes #define HUE_ERROR_INACTIVE 0