Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit 058cc62

Browse files
authored
v1.0.1
### New in v1.0.1 1. Add support to ENC28J60 Ethernet module/shield using UIPEthernet library. 2. Fix bugs 3. Optimize code 4. Enhance examples 5. Add UIPEthernet Library Patches for SAMD21/SAMD51
1 parent 2be15e2 commit 058cc62

File tree

3 files changed

+362
-252
lines changed

3 files changed

+362
-252
lines changed

LibraryPatches/UIPEthernet/utility/Enc28J60Network.h

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,33 @@
3838
defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) )
3939
#include <SPI.h>
4040
#define ENC28J60_USE_SPILIB 1
41-
// default to pin 10
42-
#define ENC28J60_CONTROL_CS 10
43-
#endif
41+
42+
#ifndef USE_THIS_SS_PIN
43+
// default to pin 10
44+
#define ENC28J60_CONTROL_CS 10
45+
#else
46+
#warning Using USE_THIS_SS_PIN in Enc28J60Network.h for nRF52
47+
#define ENC28J60_CONTROL_CS USE_THIS_SS_PIN
48+
#endif
49+
#endif
50+
51+
// KH, For SAMD21/SAMD51
52+
#if ( defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010) \
53+
|| defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRFox1200) || defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) \
54+
|| defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_SAMD_MKRVIDOR4000) || defined(__SAMD21G18A__) \
55+
|| defined(ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS) || defined(__SAMD21E18A__) || defined(__SAMD51__) || defined(__SAMD51J20A__) || defined(__SAMD51J19A__) \
56+
|| defined(__SAMD51G19A__) || defined(__SAMD51P19A__) || defined(__SAMD21G18A__) )
57+
#include <SPI.h>
58+
#define ENC28J60_USE_SPILIB 1
59+
60+
#ifndef USE_THIS_SS_PIN
61+
// default to pin 10
62+
#define ENC28J60_CONTROL_CS 10
63+
#else
64+
#warning Using USE_THIS_SS_PIN in Enc28J60Network.h for SAMD
65+
#define ENC28J60_CONTROL_CS USE_THIS_SS_PIN
66+
#endif
67+
#endif
4468

4569
#include "mempool.h"
4670
#if defined(__MBED__)

0 commit comments

Comments
 (0)