Skip to content

Commit 76e269e

Browse files
authored
Merge pull request wled#1764 from k7bbr/master
Add support for WESP32 board, change default Ethernet type to none, add macro to specify default Ethernet type at compile time
2 parents 3103939 + e4cda4b commit 76e269e

File tree

8 files changed

+31
-2889
lines changed

8 files changed

+31
-2889
lines changed

package-lock.json

Lines changed: 6 additions & 2881 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

platformio.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ default_envs = travis_esp8266, travis_esp32
3030
; default_envs = d1_mini_5CH_Shojo_PCB
3131
; default_envs = wemos_shield_esp32
3232
; default_envs = m5atom
33-
; default_envs = esp32_poe
33+
; default_envs = esp32_eth
3434

3535
src_dir = ./wled00
3636
data_dir = ./wled00/data
@@ -279,12 +279,12 @@ lib_ignore =
279279
ESPAsyncTCP
280280
ESPAsyncUDP
281281

282-
[env:esp32_poe]
282+
[env:esp32_eth]
283283
board = esp32-poe
284284
285285
upload_speed = 921600
286286
build_unflags = ${common.build_unflags}
287-
build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1
287+
build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1
288288
lib_ignore =
289289
ESPAsyncTCP
290290
ESPAsyncUDP

wled00/const.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
#define WLED_ETH_NONE 0
132132
#define WLED_ETH_WT32_ETH01 1
133133
#define WLED_ETH_ESP32_POE 2
134+
#define WLED_ETH_WESP32 3
134135

135136
//Hue error codes
136137
#define HUE_ERROR_INACTIVE 0

wled00/data/settings_wifi.htm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ <h3>Ethernet Type</h3>
6969
<select name="ETH">
7070
<option value="0">None</option>
7171
<option value="1">WT32-ETH01</option>
72-
<option value="2">ESP32-POE</option></select><br><br></div>
72+
<option value="2">ESP32-POE</option>
73+
<option value="3">WESP32</option></select><br><br></div>
7374
<hr>
7475
<button type="button" onclick="B()">Back</button><button type="submit">Save & Connect</button>
7576
</form>

wled00/html_settings.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ Can help with connectivity issues.<br>
6464
Do not enable if WiFi is working correctly, increases power consumption.</i><div
6565
id="ethd"><h3>Ethernet Type</h3><select name="ETH"><option value="0">None
6666
</option><option value="1">WT32-ETH01</option><option value="2">ESP32-POE
67-
</option></select><br><br></div><hr><button type="button" onclick="B()">Back
68-
</button><button type="submit">Save & Connect</button></form></body></html>)=====";
67+
</option><option value="3">WESP32</option></select><br><br></div><hr><button
68+
type="button" onclick="B()">Back</button><button type="submit">Save & Connect
69+
</button></form></body></html>)=====";
6970
7071
7172
// Autogenerated from wled00/data/settings_leds.htm, do not edit!!

wled00/html_ui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// Autogenerated from wled00/data/index.htm, do not edit!!
1010
const uint16_t PAGE_index_L = 32717;
1111
const uint8_t PAGE_index[] PROGMEM = {
12-
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xcc, 0xbd, 0x69, 0x7b, 0xe2, 0x48,
12+
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0xcc, 0xbd, 0x69, 0x7b, 0xe2, 0x48,
1313
0xb2, 0x28, 0xfc, 0xbd, 0x7e, 0x05, 0x45, 0x4d, 0x57, 0x43, 0x21, 0x40, 0xac, 0xc6, 0xb8, 0x68,
1414
0x1f, 0xb1, 0x19, 0x6c, 0x83, 0xcd, 0xea, 0x6d, 0x3c, 0xe7, 0x11, 0x42, 0x08, 0xd9, 0xb2, 0x84,
1515
0x25, 0xb1, 0xda, 0xdc, 0xdf, 0xfe, 0x46, 0x64, 0xa6, 0x16, 0x36, 0xdb, 0x3d, 0x77, 0xe6, 0x3e,

wled00/wled.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ ethernet_settings ethernetBoards[] = {
4848
18, // eth_mdio,
4949
ETH_PHY_LAN8720, // eth_type,
5050
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
51+
},
52+
53+
// WESP32
54+
{
55+
0, // eth_address,
56+
-1, // eth_power,
57+
16, // eth_mdc,
58+
17, // eth_mdio,
59+
ETH_PHY_LAN8720, // eth_type,
60+
ETH_CLOCK_GPIO0_IN // eth_clk_mode
5161
}
5262
};
5363

wled00/wled.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,11 @@ WLED_GLOBAL IPAddress staticGateway _INIT_N((( 0, 0, 0, 0))); // gateway (r
205205
WLED_GLOBAL IPAddress staticSubnet _INIT_N(((255, 255, 255, 0))); // most common subnet in home networks
206206
WLED_GLOBAL bool noWifiSleep _INIT(false); // disabling modem sleep modes will increase heat output and power usage, but may help with connection issues
207207
#ifdef WLED_USE_ETHERNET
208-
WLED_GLOBAL int ethernetType _INIT(WLED_ETH_ESP32_POE); // ethernet board type
208+
#ifdef WLED_ETH_DEFAULT // default ethernet board type if specified
209+
WLED_GLOBAL int ethernetType _INIT(WLED_ETH_DEFAULT); // ethernet board type
210+
#else
211+
WLED_GLOBAL int ethernetType _INIT(WLED_ETH_NONE); // use none for ethernet board type if default not defined
212+
#endif
209213
#endif
210214

211215
// LED CONFIG

0 commit comments

Comments
 (0)