Skip to content

Commit

Permalink
additional ETH boards (from upstream)
Browse files Browse the repository at this point in the history
back-ported from upstream.

* ABC! WLED V43 & compatible
* QuinLED-Dig-Octa & T-ETH-POE
* Serg74-ETH32
  • Loading branch information
softhack007 committed Aug 30, 2023
1 parent b038508 commit af1d65d
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
## WLED upstream changelog

### Upstream changes backported to WLED-SR
- Additonal Ethernet boards: ABC! WLED V43, QuinLED-Dig-Octa + T-ETH-POE, Serg74-ETH32
- bugfix for large presets files (>64Kb)
- updated NeoPixelBus to 2.7.1
- Fixed APA102 output on Ethernet enabled controllers
Expand Down
6 changes: 5 additions & 1 deletion wled00/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
#define BTN_TYPE_ANALOG_INVERTED 8

//Ethernet board types
#define WLED_NUM_ETH_TYPES 8
#define WLED_NUM_ETH_TYPES 11

#define WLED_ETH_NONE 0
#define WLED_ETH_WT32_ETH01 1
Expand All @@ -209,6 +209,10 @@
#define WLED_ETH_QUINLED 4
#define WLED_ETH_TWILIGHTLORD 5
#define WLED_ETH_ESP32DEUX 6
#define WLED_ETH_ESP32ETHKITVE 7
#define WLED_ETH_QUINLED_OCTA 8
#define WLED_ETH_ABCWLEDV43ETH 9
#define WLED_ETH_SERG74 10

//Hue error codes
#define HUE_ERROR_INACTIVE 0
Expand Down
3 changes: 3 additions & 0 deletions wled00/data/settings_wifi.htm
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ <h3>Experimental</h3>
<h3>Ethernet Type</h3>
<select name="ETH">
<option value="0">None</option>
<option value="9">ABC! WLED V43 &amp; compatible</option>
<option value="2">ESP32-POE</option>
<option value="6">ESP32Deux</option>
<option value="7">KIT-VE</option>
<option value="8">QuinLED-Dig-Octa &amp; T-ETH-POE</option>
<option value="4">QuinLED-ESP32</option>
<option value="10">Serg74-ETH32</option>
<option value="5">TwilightLord-ESP32</option>
<option value="3">WESP32</option>
<option value="1">WT32-ETH01</option>
Expand Down
6 changes: 4 additions & 2 deletions wled00/html_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ Disable WiFi sleep: <input type="checkbox" name="WS"><br><i>
Can help with connectivity issues.<br>
Do not enable if WiFi is working correctly, increases power consumption.</i><div
id="ethd"><h3>Ethernet Type</h3><select name="ETH"><option value="0">None
</option><option value="2">ESP32-POE</option><option value="6">ESP32Deux
</option><option value="7">KIT-VE</option><option value="4">QuinLED-ESP32
</option><option value="9">ABC! WLED V43 &amp; compatible</option><option
value="2">ESP32-POE</option><option value="6">ESP32Deux</option><option
value="7">KIT-VE</option><option value="8">QuinLED-Dig-Octa &amp; T-ETH-POE
</option><option value="4">QuinLED-ESP32</option><option value="10">Serg74-ETH32
</option><option value="5">TwilightLord-ESP32</option><option value="3">WESP32
</option><option value="1">WT32-ETH01</option></select><br><br></div><hr><button
type="button" onclick="B()">Back</button><button type="submit">Save & Connect
Expand Down
18 changes: 18 additions & 0 deletions wled00/wled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,24 @@ bool WLED::initEthernet()
return false;
}

/*
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
/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]
*/
#if ESP_IDF_VERSION_MAJOR==3
if(es.eth_power>0 && es.eth_type==ETH_PHY_LAN8720) {
pinMode(es.eth_power, OUTPUT);
digitalWrite(es.eth_power, 0);
delayMicroseconds(150);
digitalWrite(es.eth_power, 1);
delayMicroseconds(10);
}
#endif

if (!ETH.begin(
(uint8_t) es.eth_address,
(int) es.eth_power,
Expand Down
2 changes: 1 addition & 1 deletion wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// version code in format yymmddb (b = daily build)
#define VERSION 2308061 // WLEDSR specific version
#define VERSION 2308301 // WLEDSR specific version
#define SR_VERSION_NAME "0.13.4-beta" // WLEDSR version name --> some files need manual updating: package.json, package-lock.json, improv.cpp

#define AC_VERSION 2208222 // AC WLED base version; last updated by PR #239 -> Merge AC-0.13.3 into dev
Expand Down
40 changes: 35 additions & 5 deletions wled00/wled_ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,42 @@ const ethernet_settings ethernetBoards[] = {

// ESP32-ETHERNET-KIT-VE
{
0, // eth_address,
5, // eth_power,
0, // eth_address,
5, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
ETH_PHY_IP101, // eth_type,
ETH_CLOCK_GPIO0_IN // eth_clk_mode
},

// QuinLed-Dig-Octa Brainboard-32-8L and LilyGO-T-ETH-POE
{
0, // eth_address,
-1, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
},

// ABC! WLED Controller V43 + Ethernet Shield & compatible
{
1, // eth_address,
5, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
ETH_PHY_IP101, // eth_type,
ETH_CLOCK_GPIO0_IN // eth_clk_mode
33, // eth_mdio,
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
},

// Serg74-ESP32 Ethernet Shield
{
1, // eth_address,
5, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
}
};
#endif
Expand Down

0 comments on commit af1d65d

Please sign in to comment.