Skip to content

Commit

Permalink
Updated platformio.ini to reference esp32_eth env
Browse files Browse the repository at this point in the history
change default ethernet type to none
add macro option to change default eth board at compile time
  • Loading branch information
k7bbr committed Feb 20, 2021
1 parent a09f64a commit f333f86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# ------------------------------------------------------------------------------

# 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
; 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
Expand All @@ -30,7 +30,7 @@
; default_envs = d1_mini_5CH_Shojo_PCB
; default_envs = wemos_shield_esp32
; default_envs = m5atom
default_envs = esp32_poe
; default_envs = esp32_eth

src_dir = ./wled00
data_dir = ./wled00/data
Expand Down Expand Up @@ -279,12 +279,12 @@ lib_ignore =
ESPAsyncTCP
ESPAsyncUDP

[env:esp32_poe]
[env:esp32_eth]
board = esp32-poe
platform = [email protected]
upload_speed = 921600
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 =
ESPAsyncTCP
ESPAsyncUDP
Expand Down
6 changes: 5 additions & 1 deletion wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
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

// LED CONFIG
Expand Down

0 comments on commit f333f86

Please sign in to comment.