|
22 | 22 | //////////////////////////////////////////////////////////
|
23 | 23 |
|
24 | 24 | // Optional values to override default settings
|
25 |
| -//#define SPI_HOST 1 |
26 |
| -//#define SPI_CLOCK_MHZ 8 |
| 25 | +//#define ETH_SPI_HOST SPI2_HOST |
| 26 | +//#define SPI_CLOCK_MHZ 20 |
27 | 27 |
|
28 | 28 | // Must connect INT to GPIOxx or not working
|
29 | 29 | //#define INT_GPIO 4
|
@@ -134,16 +134,14 @@ void setup()
|
134 | 134 |
|
135 | 135 | // start the ethernet connection and the server:
|
136 | 136 | // Use DHCP dynamic IP and random mac
|
137 |
| - uint16_t index = millis() % NUMBER_OF_MAC; |
138 |
| - |
139 | 137 | //bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
|
140 |
| - // int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac); |
141 |
| - //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); |
142 |
| - ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] ); |
| 138 | + // int SPI_HOST, uint8_t *W6100_Mac = W6100_Default_Mac); |
| 139 | + ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); |
| 140 | + //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[millis() % NUMBER_OF_MAC] ); |
143 | 141 |
|
144 | 142 | // Static IP, leave without this line to get IP via DHCP
|
145 | 143 | //bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);
|
146 |
| - ETH.config(myIP, myGW, mySN, myDNS); |
| 144 | + //ETH.config(myIP, myGW, mySN, myDNS); |
147 | 145 |
|
148 | 146 | ESP32_ENC_waitForConnect();
|
149 | 147 |
|
|
0 commit comments