Skip to content

Commit 4d14289

Browse files
committed
Fixing ethernet library on Leonardo (correcting SS pin for 32U4).
1 parent 0a56592 commit 4d14289

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

utility/w5100.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,11 @@ class W5100Class {
327327
inline static void initSS() { DDRB |= _BV(4); };
328328
inline static void setSS() { PORTB &= ~_BV(4); };
329329
inline static void resetSS() { PORTB |= _BV(4); };
330-
#elif defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB162__)
330+
#elif defined(__AVR_ATmega32U4__)
331+
inline static void initSS() { DDRB |= _BV(6); };
332+
inline static void setSS() { PORTB &= ~_BV(6); };
333+
inline static void resetSS() { PORTB |= _BV(6); };
334+
#elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB162__)
331335
inline static void initSS() { DDRB |= _BV(0); };
332336
inline static void setSS() { PORTB &= ~_BV(0); };
333337
inline static void resetSS() { PORTB |= _BV(0); };

0 commit comments

Comments
 (0)