diff options
author | David Crocker <dcrocker@eschertech.com> | 2022-02-08 22:31:24 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2022-02-08 22:31:24 +0300 |
commit | c7cf6d7d730b0f7b887b308e63c7e82b3fd2f9cf (patch) | |
tree | 232f84df976fb2261e5f8921634e54b629a0e7e3 | |
parent | 97afd197eb780889d6b5fbba5808a59e92d4ec84 (diff) |
Fixed network startup on MB6HC
-rw-r--r-- | src/Networking/Network.cpp | 13 | ||||
-rw-r--r-- | src/Platform/Platform.cpp | 4 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/Networking/Network.cpp b/src/Networking/Network.cpp index cded2e3d..415aeea8 100644 --- a/src/Networking/Network.cpp +++ b/src/Networking/Network.cpp @@ -83,13 +83,12 @@ Network::Network(Platform& p) noexcept : platform(p) #endif { #if HAS_NETWORKING -#if defined(DUET3_V03) +#if defined(DUET3_MB6HC) || defined(DUET3_MB6XD) interfaces[0] = new LwipEthernetInterface(p); - interfaces[1] = new WiFiInterface(p); -#elif defined(DUET3_MB6HC) || defined(DUET3_MB6XD) - interfaces[0] = new LwipEthernetInterface(p); -#elif defined(DUET_NG) || defined(DUET3MINI) +#elif defined(DUET_NG) || defined(DUET3MINI_V04) interfaces[0] = nullptr; // we set this up in Init() +#elif defined(DUET3MINI4) + interfaces[0] = new WiFiInterface(p); #elif defined(DUET_M) interfaces[0] = new W5500Interface(p); #elif defined(__LPC17xx__) @@ -101,7 +100,7 @@ Network::Network(Platform& p) noexcept : platform(p) #else # error Unknown board #endif -#endif // HAS_NETWORK +#endif // HAS_NETWORKING } #if SUPPORT_OBJECT_MODEL @@ -176,7 +175,7 @@ void Network::Init() noexcept # endif # endif -# if defined(DUET3MINI) +# if defined(DUET3MINI_V04) # if HAS_WIFI_NETWORKING && HAS_LWIP_NETWORKING interfaces[0] = (platform.IsDuetWiFi()) ? static_cast<NetworkInterface*>(new WiFiInterface(platform)) : static_cast<NetworkInterface*>(new LwipEthernetInterface(platform)); # elif HAS_WIFI_NETWORKING diff --git a/src/Platform/Platform.cpp b/src/Platform/Platform.cpp index bad21c1b..7f1ecc1b 100644 --- a/src/Platform/Platform.cpp +++ b/src/Platform/Platform.cpp @@ -429,6 +429,10 @@ Platform::Platform() noexcept : // Initialise the Platform. Note: this is the first module to be initialised, so don't call other modules from here! void Platform::Init() noexcept { +#if HAS_LWIP_NETWORKING + pinMode(EthernetPhyResetPin, OUTPUT_LOW); // reset the Ethernet Phy chip +#endif + // Make sure the on-board drivers are disabled #if defined(DUET_NG) || defined(PCCB_10) pinMode(GlobalTmc2660EnablePin, OUTPUT_HIGH); |