Updated platformio.ini to reference esp32_eth env

change default ethernet type to none
add macro option to change default eth board at compile time
This commit is contained in:
k7bbr 2021-02-20 01:54:54 -07:00
parent a09f64aee5
commit f333f867c5
2 changed files with 9 additions and 5 deletions

View File

@ -9,7 +9,7 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Travis CI binaries (comment this out with a ';' when building for your own board) # Travis CI binaries (comment this out with a ';' when building for your own board)
; default_envs = travis_esp8266, travis_esp32 default_envs = travis_esp8266, travis_esp32
# Release binaries # Release binaries
; default_envs = nodemcuv2, esp01_1m_full, esp32dev, custom_WS2801, custom_APA102, custom_LEDPIN_16, custom_LEDPIN_4, custom_LEDPIN_3, custom32_LEDPIN_16, custom32_APA102 ; default_envs = nodemcuv2, esp01_1m_full, esp32dev, custom_WS2801, custom_APA102, custom_LEDPIN_16, custom_LEDPIN_4, custom_LEDPIN_3, custom32_LEDPIN_16, custom32_APA102
@ -30,7 +30,7 @@
; default_envs = d1_mini_5CH_Shojo_PCB ; default_envs = d1_mini_5CH_Shojo_PCB
; default_envs = wemos_shield_esp32 ; default_envs = wemos_shield_esp32
; default_envs = m5atom ; default_envs = m5atom
default_envs = esp32_poe ; default_envs = esp32_eth
src_dir = ./wled00 src_dir = ./wled00
data_dir = ./wled00/data data_dir = ./wled00/data
@ -279,12 +279,12 @@ lib_ignore =
ESPAsyncTCP ESPAsyncTCP
ESPAsyncUDP ESPAsyncUDP
[env:esp32_poe] [env:esp32_eth]
board = esp32-poe board = esp32-poe
platform = espressif32@2.0 platform = espressif32@2.0
upload_speed = 921600 upload_speed = 921600
build_unflags = ${common.build_unflags} build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1
lib_ignore = lib_ignore =
ESPAsyncTCP ESPAsyncTCP
ESPAsyncUDP ESPAsyncUDP

View File

@ -205,7 +205,11 @@ WLED_GLOBAL IPAddress staticGateway _INIT_N((( 0, 0, 0, 0))); // gateway (r
WLED_GLOBAL IPAddress staticSubnet _INIT_N(((255, 255, 255, 0))); // most common subnet in home networks WLED_GLOBAL IPAddress staticSubnet _INIT_N(((255, 255, 255, 0))); // most common subnet in home networks
WLED_GLOBAL bool noWifiSleep _INIT(false); // disabling modem sleep modes will increase heat output and power usage, but may help with connection issues WLED_GLOBAL bool noWifiSleep _INIT(false); // disabling modem sleep modes will increase heat output and power usage, but may help with connection issues
#ifdef WLED_USE_ETHERNET #ifdef WLED_USE_ETHERNET
WLED_GLOBAL int ethernetType _INIT(WLED_ETH_ESP32_POE); // ethernet board type #ifdef WLED_ETH_DEFAULT // use none for ethernet board type if default not defined
WLED_GLOBAL int ethernetType _INIT(WLED_ETH_DEFAULT); // ethernet board type
#else
WLED_GLOBAL int ethernetType _INIT(WLED_ETH_NONE); //default ethernet board type if specified
#endif
#endif #endif
// LED CONFIG // LED CONFIG