@@ -326,22 +326,24 @@ class W5100Class {
326
326
private:
327
327
#if !defined(SPI_HAS_EXTENDED_CS_PIN_HANDLING)
328
328
#define SPI_ETHERNET_SETTINGS SPISettings (4000000 , MSBFIRST, SPI_MODE0)
329
- #if defined (__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
330
- inline static void initSS() { DDRB |= _BV (4 ); };
331
- inline static void setSS () { PORTB &= ~_BV (4 ); };
332
- inline static void resetSS () { PORTB |= _BV (4 ); };
333
- #elif defined(__AVR_ATmega32U4__)
334
- inline static void initSS () { DDRB |= _BV (6 ); };
335
- inline static void setSS () { PORTB &= ~_BV (6 ); };
336
- inline static void resetSS () { PORTB |= _BV (6 ); };
337
- #elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB162__)
338
- inline static void initSS () { DDRB |= _BV (0 ); };
339
- inline static void setSS () { PORTB &= ~_BV (0 ); };
340
- inline static void resetSS () { PORTB |= _BV (0 ); };
341
- #else
342
- inline static void initSS () { DDRB |= _BV (2 ); };
343
- inline static void setSS () { PORTB &= ~_BV (2 ); };
344
- inline static void resetSS () { PORTB |= _BV (2 ); };
329
+ #if defined (ARDUINO_ARCH_AVR)
330
+ #if defined (__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
331
+ inline static void initSS() { DDRB |= _BV (4 ); };
332
+ inline static void setSS () { PORTB &= ~_BV (4 ); };
333
+ inline static void resetSS () { PORTB |= _BV (4 ); };
334
+ #elif defined(__AVR_ATmega32U4__)
335
+ inline static void initSS () { DDRB |= _BV (6 ); };
336
+ inline static void setSS () { PORTB &= ~_BV (6 ); };
337
+ inline static void resetSS () { PORTB |= _BV (6 ); };
338
+ #elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB162__)
339
+ inline static void initSS () { DDRB |= _BV (0 ); };
340
+ inline static void setSS () { PORTB &= ~_BV (0 ); };
341
+ inline static void resetSS () { PORTB |= _BV (0 ); };
342
+ #else
343
+ inline static void initSS () { DDRB |= _BV (2 ); };
344
+ inline static void setSS () { PORTB &= ~_BV (2 ); };
345
+ inline static void resetSS () { PORTB |= _BV (2 ); };
346
+ #endif
345
347
#endif
346
348
#else
347
349
#define SPI_ETHERNET_SETTINGS ETHERNET_SHIELD_SPI_CS,SPISettings(4000000 , MSBFIRST, SPI_MODE0)
0 commit comments