mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-25 13:41:23 +01:00
STM32Ethernet lib for onboard ethernet is different
This commit is contained in:
parent
7ae6ff27f5
commit
ba3d29e4b5
@ -100,7 +100,7 @@ EthernetInterface::EthernetInterface()
|
|||||||
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
|
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
|
||||||
DIAG(F("Ethernet shield not found or W5100"));
|
DIAG(F("Ethernet shield not found or W5100"));
|
||||||
}
|
}
|
||||||
#endif STM32_ETHERNET
|
#endif // STM32_ETHERNET
|
||||||
|
|
||||||
uint32_t startmilli = millis();
|
uint32_t startmilli = millis();
|
||||||
while ((millis() - startmilli) < 5500) { // Loop to give time to check for cable connection
|
while ((millis() - startmilli) < 5500) { // Loop to give time to check for cable connection
|
||||||
@ -166,8 +166,10 @@ bool EthernetInterface::checkLink() {
|
|||||||
DIAG(F("Ethernet cable connected"));
|
DIAG(F("Ethernet cable connected"));
|
||||||
connected=true;
|
connected=true;
|
||||||
#ifdef IP_ADDRESS
|
#ifdef IP_ADDRESS
|
||||||
|
#ifndef STM32_ETHERNET
|
||||||
Ethernet.setLocalIP(myIP); // for static IP, set it again
|
Ethernet.setLocalIP(myIP); // for static IP, set it again
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
IPAddress ip = Ethernet.localIP(); // look what IP was obtained (dynamic or static)
|
IPAddress ip = Ethernet.localIP(); // look what IP was obtained (dynamic or static)
|
||||||
server = new EthernetServer(IP_PORT); // Ethernet Server listening on default port IP_PORT
|
server = new EthernetServer(IP_PORT); // Ethernet Server listening on default port IP_PORT
|
||||||
server->begin();
|
server->begin();
|
||||||
|
Loading…
Reference in New Issue
Block a user