Skip to content

Commit 929ee98

Browse files
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.
1 parent 88ccf0c commit 929ee98

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

libraries/lwIP_w5100/examples/WiFiClient-W5100/WiFiClient-W5100.ino

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@
88
const char* host = "djxmmx.net";
99
const uint16_t port = 17;
1010

11-
Wiznet5100lwIP eth(1 /* chip select */);
11+
#ifdef ARDUINO_WIZNET_5100S_EVB_PICO
1212
// To use Interrupt-driven mode, pass in an SPI object and an IRQ pin like so:
13-
// Wiznet5100lwIP eth(17, SPI, 21);
13+
Wiznet5100lwIP eth(17, SPI, 21);
14+
#else
15+
Wiznet5100lwIP eth(1 /* chip select */);
16+
#endif
1417

1518
void setup() {
19+
#ifndef ARDUINO_WIZNET_5100S_EVB_PICO
1620
// Set up SPI pinout to match your HW
1721
SPI.setRX(0);
1822
SPI.setCS(1);
1923
SPI.setSCK(2);
2024
SPI.setTX(3);
25+
#endif
2126

2227
Serial.begin(115200);
2328
delay(5000);

0 commit comments

Comments
 (0)