diff --git a/build_flags_template.sh b/build_flags_template.sh index 8c1c2ab..395d0b4 100644 --- a/build_flags_template.sh +++ b/build_flags_template.sh @@ -24,5 +24,6 @@ # export FLAGS="$FLAGS -DRESET_PIN=5" # export FLAGS="$FLAGS -DDHCP_RETRY_INTERVAL=60000" # export FLAGS="$FLAGS -DRESTART_LAN_ON_MQTT_ERRORS" +# export FLAGS="$FLAGS -DW5500_CS_PIN=53" export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short) echo $FLAGS \ No newline at end of file diff --git a/lighthub/main.cpp b/lighthub/main.cpp index d31a027..5d3fafe 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -493,6 +493,11 @@ void onInitialStateInitLAN() { #endif #if defined(__AVR__) || defined(__SAM3X8E__)||defined(ARDUINO_ARCH_STM32F1) +#ifdef W5500_CS_PIN + Ethernet.w5500_cspin = W5500_CS_PIN; + debugSerial.print(F("Use W5500 pin: ")); + debugSerial.println(Ethernet.w5500_cspin); +#endif IPAddress ip, dns, gw, mask; int res = 1; debugSerial.println(F("Starting lan"));