Skip to content

Commit

Permalink
fix init of wt32-eth01 ethernet interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorsten Ludewig committed Mar 14, 2021
1 parent 038ed8a commit 8e71dcd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions boards/wt32-eth01.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"connectivity": [
"wifi",
"bluetooth",
"ethernet",
"can"
"ethernet"
],
"frameworks": [
"arduino",
Expand Down
4 changes: 4 additions & 0 deletions lib/App/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,11 @@ void appSetup()
digitalWrite(NRST, 1);
#endif

#if defined(ETH_ADDR) && defined(ETH_POWER_PIN) && defined(ETH_MDC_PIN) && defined(ETH_MDIO_PIN) && defined(ETH_TYPE) && defined(ETH_CLK_MODE)
ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE);
#else
ETH.begin();
#endif
ETH.setHostname(OTA_HOSTNAME);
#else
connectWiFi();
Expand Down
4 changes: 0 additions & 4 deletions variants/wt32-eth01/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

#include <stdint.h>

#define EXTERNAL_NUM_INTERRUPTS 16
#define NUM_DIGITAL_PINS 40
#define NUM_ANALOG_INPUTS 16

#define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN
#define ETH_POWER_PIN 16
#define ETH_TYPE ETH_PHY_LAN8720
Expand Down

0 comments on commit 8e71dcd

Please sign in to comment.