Added 2 Ethernet boards and split Ethernet configs into separate file
This commit is contained in:
parent
1539e703e9
commit
c831d62bc3
@ -166,13 +166,15 @@
|
||||
#define BTN_TYPE_ANALOG 7
|
||||
|
||||
//Ethernet board types
|
||||
#define WLED_NUM_ETH_TYPES 5
|
||||
#define WLED_NUM_ETH_TYPES 7
|
||||
|
||||
#define WLED_ETH_NONE 0
|
||||
#define WLED_ETH_WT32_ETH01 1
|
||||
#define WLED_ETH_ESP32_POE 2
|
||||
#define WLED_ETH_WESP32 3
|
||||
#define WLED_ETH_QUINLED 4
|
||||
#define WLED_ETH_TWILIGHTLORD 5
|
||||
#define WLED_ETH_ESP32DEUX 6
|
||||
|
||||
//Hue error codes
|
||||
#define HUE_ERROR_INACTIVE 0
|
||||
|
@ -69,7 +69,9 @@
|
||||
<select name="ETH">
|
||||
<option value="0">None</option>
|
||||
<option value="2">ESP32-POE</option>
|
||||
<option value="6">ESP32Deux</option>
|
||||
<option value="4">QuinLED-ESP32</option>
|
||||
<option value="5">TwilightLord-ESP32</option>
|
||||
<option value="3">WESP32</option>
|
||||
<option value="1">WT32-ETH01</option>
|
||||
</select><br><br></div>
|
||||
|
@ -64,10 +64,12 @@ 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="4">QuinLED-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</button></form></body></html>)=====";
|
||||
</option><option value="2">ESP32-POE</option><option value="6">ESP32Deux
|
||||
</option><option value="4">QuinLED-ESP32</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</button></form>
|
||||
</body></html>)=====";
|
||||
|
||||
|
||||
// Autogenerated from wled00/data/settings_leds.htm, do not edit!!
|
||||
|
@ -1,5 +1,6 @@
|
||||
#define WLED_DEFINE_GLOBAL_VARS //only in one source file, wled.cpp!
|
||||
#include "wled.h"
|
||||
#include "wled_ethernet.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_DISABLE_BROWNOUT_DET)
|
||||
@ -15,68 +16,6 @@ WLED::WLED()
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef WLED_USE_ETHERNET
|
||||
// settings for various ethernet boards
|
||||
typedef struct EthernetSettings {
|
||||
uint8_t eth_address;
|
||||
int eth_power;
|
||||
int eth_mdc;
|
||||
int eth_mdio;
|
||||
eth_phy_type_t eth_type;
|
||||
eth_clock_mode_t eth_clk_mode;
|
||||
} ethernet_settings;
|
||||
|
||||
ethernet_settings ethernetBoards[] = {
|
||||
// None
|
||||
{
|
||||
},
|
||||
|
||||
// WT32-EHT01
|
||||
// Please note, from my testing only these pins work for LED outputs:
|
||||
// IO2, IO4, IO12, IO14, IO15
|
||||
// These pins do not appear to work from my testing:
|
||||
// IO35, IO36, IO39
|
||||
{
|
||||
1, // eth_address,
|
||||
16, // eth_power,
|
||||
23, // eth_mdc,
|
||||
18, // eth_mdio,
|
||||
ETH_PHY_LAN8720, // eth_type,
|
||||
ETH_CLOCK_GPIO0_IN // eth_clk_mode
|
||||
},
|
||||
|
||||
// ESP32-POE
|
||||
{
|
||||
0, // eth_address,
|
||||
12, // eth_power,
|
||||
23, // eth_mdc,
|
||||
18, // eth_mdio,
|
||||
ETH_PHY_LAN8720, // eth_type,
|
||||
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
|
||||
},
|
||||
|
||||
// WESP32
|
||||
{
|
||||
0, // eth_address,
|
||||
-1, // eth_power,
|
||||
16, // eth_mdc,
|
||||
17, // eth_mdio,
|
||||
ETH_PHY_LAN8720, // eth_type,
|
||||
ETH_CLOCK_GPIO0_IN // eth_clk_mode
|
||||
},
|
||||
|
||||
// QuinLed-ESP32-Ethernet
|
||||
{
|
||||
0, // eth_address,
|
||||
5, // eth_power,
|
||||
23, // eth_mdc,
|
||||
18, // eth_mdio,
|
||||
ETH_PHY_LAN8720, // eth_type,
|
||||
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
// turns all LEDs off and restarts ESP
|
||||
void WLED::reset()
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2106180
|
||||
#define VERSION 2106200
|
||||
|
||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||
//#define WLED_USE_MY_CONFIG
|
||||
|
86
wled00/wled_ethernet.h
Normal file
86
wled00/wled_ethernet.h
Normal file
@ -0,0 +1,86 @@
|
||||
#ifndef WLED_ETHERNET_H
|
||||
#define WLED_ETHERNET_H
|
||||
|
||||
#ifdef WLED_USE_ETHERNET
|
||||
// settings for various ethernet boards
|
||||
typedef struct EthernetSettings {
|
||||
uint8_t eth_address;
|
||||
int eth_power;
|
||||
int eth_mdc;
|
||||
int eth_mdio;
|
||||
eth_phy_type_t eth_type;
|
||||
eth_clock_mode_t eth_clk_mode;
|
||||
} ethernet_settings;
|
||||
|
||||
ethernet_settings ethernetBoards[] = {
|
||||
// None
|
||||
{
|
||||
},
|
||||
|
||||
// WT32-EHT01
|
||||
// Please note, from my testing only these pins work for LED outputs:
|
||||
// IO2, IO4, IO12, IO14, IO15
|
||||
// These pins do not appear to work from my testing:
|
||||
// IO35, IO36, IO39
|
||||
{
|
||||
1, // eth_address,
|
||||
16, // eth_power,
|
||||
23, // eth_mdc,
|
||||
18, // eth_mdio,
|
||||
ETH_PHY_LAN8720, // eth_type,
|
||||
ETH_CLOCK_GPIO0_IN // eth_clk_mode
|
||||
},
|
||||
|
||||
// ESP32-POE
|
||||
{
|
||||
0, // eth_address,
|
||||
12, // eth_power,
|
||||
23, // eth_mdc,
|
||||
18, // eth_mdio,
|
||||
ETH_PHY_LAN8720, // eth_type,
|
||||
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
|
||||
},
|
||||
|
||||
// WESP32
|
||||
{
|
||||
0, // eth_address,
|
||||
-1, // eth_power,
|
||||
16, // eth_mdc,
|
||||
17, // eth_mdio,
|
||||
ETH_PHY_LAN8720, // eth_type,
|
||||
ETH_CLOCK_GPIO0_IN // eth_clk_mode
|
||||
},
|
||||
|
||||
// QuinLed-ESP32-Ethernet
|
||||
{
|
||||
0, // eth_address,
|
||||
5, // eth_power,
|
||||
23, // eth_mdc,
|
||||
18, // eth_mdio,
|
||||
ETH_PHY_LAN8720, // eth_type,
|
||||
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
|
||||
},
|
||||
|
||||
// TwilightLord-ESP32 Ethernet Shield
|
||||
{
|
||||
0, // eth_address,
|
||||
5, // eth_power,
|
||||
23, // eth_mdc,
|
||||
18, // eth_mdio,
|
||||
ETH_PHY_LAN8720, // eth_type,
|
||||
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
|
||||
},
|
||||
|
||||
// ESP3DEUXQuattro
|
||||
{
|
||||
1, // eth_address,
|
||||
-1, // eth_power,
|
||||
23, // eth_mdc,
|
||||
18, // eth_mdio,
|
||||
ETH_PHY_LAN8720, // eth_type,
|
||||
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user