Unverified Commit 929ee98a authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

Make W5100 example run on Wiznet w/no changes (#1994)

Use the #define board name to identify when building for the
WIZnet W5100s-EVB-Pico and assign the proper pins and IRQs.
parent 88ccf0c2
...@@ -8,16 +8,21 @@ ...@@ -8,16 +8,21 @@
const char* host = "djxmmx.net"; const char* host = "djxmmx.net";
const uint16_t port = 17; const uint16_t port = 17;
Wiznet5100lwIP eth(1 /* chip select */); #ifdef ARDUINO_WIZNET_5100S_EVB_PICO
// To use Interrupt-driven mode, pass in an SPI object and an IRQ pin like so: // To use Interrupt-driven mode, pass in an SPI object and an IRQ pin like so:
// Wiznet5100lwIP eth(17, SPI, 21); Wiznet5100lwIP eth(17, SPI, 21);
#else
Wiznet5100lwIP eth(1 /* chip select */);
#endif
void setup() { void setup() {
#ifndef ARDUINO_WIZNET_5100S_EVB_PICO
// Set up SPI pinout to match your HW // Set up SPI pinout to match your HW
SPI.setRX(0); SPI.setRX(0);
SPI.setCS(1); SPI.setCS(1);
SPI.setSCK(2); SPI.setSCK(2);
SPI.setTX(3); SPI.setTX(3);
#endif
Serial.begin(115200); Serial.begin(115200);
delay(5000); delay(5000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment