We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1796f4 commit 77451d6Copy full SHA for 77451d6
libraries/SPI/SPI.cpp
@@ -161,6 +161,11 @@ void SPIClass::setDataMode(uint8_t dataMode) {
161
bool CPOL = (dataMode & 0x10); ///< CPOL (Clock Polarity)
162
bool CPHA = (dataMode & 0x01); ///< CPHA (Clock Phase)
163
164
+ // https://github.com/esp8266/Arduino/issues/2416
165
+ // https://github.com/esp8266/Arduino/pull/2418
166
+ if(CPOL) // Ensure same behavior as
167
+ CPHA ^= 1; // SAM, AVR and Intel Boards
168
+
169
if(CPHA) {
170
SPI1U |= (SPIUSME);
171
} else {
0 commit comments