From 64c8b89b5f4cb73f86e11da26840f065633a3445 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Thu, 15 Dec 2011 15:33:47 -0500 Subject: [PATCH] Fixing ethernet library on Leonardo (correcting SS pin for 32U4). --- libraries/Ethernet/utility/w5100.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/Ethernet/utility/w5100.h b/libraries/Ethernet/utility/w5100.h index 153aedbc6..8dccd9f29 100755 --- a/libraries/Ethernet/utility/w5100.h +++ b/libraries/Ethernet/utility/w5100.h @@ -327,7 +327,11 @@ private: inline static void initSS() { DDRB |= _BV(4); }; inline static void setSS() { PORTB &= ~_BV(4); }; inline static void resetSS() { PORTB |= _BV(4); }; -#elif defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB162__) +#elif defined(__AVR_ATmega32U4__) + inline static void initSS() { DDRB |= _BV(6); }; + inline static void setSS() { PORTB &= ~_BV(6); }; + inline static void resetSS() { PORTB |= _BV(6); }; +#elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB162__) inline static void initSS() { DDRB |= _BV(0); }; inline static void setSS() { PORTB &= ~_BV(0); }; inline static void resetSS() { PORTB |= _BV(0); };