1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Ethernet lib: move AVR defines into a specific section

This commit is contained in:
Cristian Maglie 2014-09-07 16:54:07 +02:00
parent 6d3e8c7f0f
commit ed8cdcc48f

View File

@ -326,6 +326,7 @@ private:
private:
#if !defined(SPI_HAS_EXTENDED_CS_PIN_HANDLING)
#define SPI_ETHERNET_SETTINGS SPISettings(4000000, MSBFIRST, SPI_MODE0)
#if defined(ARDUINO_ARCH_AVR)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
inline static void initSS() { DDRB |= _BV(4); };
inline static void setSS() { PORTB &= ~_BV(4); };
@ -343,6 +344,7 @@ private:
inline static void setSS() { PORTB &= ~_BV(2); };
inline static void resetSS() { PORTB |= _BV(2); };
#endif
#endif
#else
#define SPI_ETHERNET_SETTINGS ETHERNET_SHIELD_SPI_CS,SPISettings(4000000, MSBFIRST, SPI_MODE0)
// initSS(), setSS(), resetSS() not needed with EXTENDED_CS_PIN_HANDLING