Add configuration for CS pin for Ethernet W5500

This commit is contained in:
Mykhailo Khulap
2018-09-24 08:13:55 +03:00
parent 4875136ebc
commit ba34596c08
2 changed files with 6 additions and 0 deletions

View File

@@ -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

View File

@@ -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"));