Add support for WT32-ETH01 ethernet board and make ethernet support configurable (#1583)

* Initial support for WT32-ETH01 board

* Initial ethernet config option, doesn't save yet

* Fixed saving/restoring ethernet option, works now!

* Fixed ESP32-POE pin config (thanks to tbnobody)

* Remove esp32_eth target (use poe), minor cleanup

* Fix BTNPIN for WT32-ETH01, as found by @k7bbr

* Various fixes to ethernet option

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
This commit is contained in:
lonestriker
2021-01-15 03:37:45 -06:00
committed by GitHub
parent d6b366c77f
commit 82e7328903
10 changed files with 96 additions and 7 deletions

View File

@@ -71,6 +71,11 @@ void deserializeConfig() {
if (apHide > 1) apHide = 1;
CJSON(apBehavior, ap[F("behav")]);
#ifdef WLED_USE_ETHERNET
JsonObject ethernet = doc[F("eth")];
CJSON(ethernetType, ethernet[F("type")]);
#endif
/*
JsonArray ap_ip = ap[F("ip")];
@@ -383,6 +388,11 @@ void serializeConfig() {
wifi[F("sleep")] = !noWifiSleep;
wifi[F("phy")] = 1;
#ifdef WLED_USE_ETHERNET
JsonObject ethernet = doc.createNestedObject("eth");
ethernet[F("type")] = ethernetType;
#endif
JsonObject hw = doc.createNestedObject("hw");
JsonObject hw_led = hw.createNestedObject("led");