Skip to content

Commit 5130454

Browse files
committed
1 parent 497d19d commit 5130454

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/SPI/SPI.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ void SPIClass::setDataMode(uint8_t dataMode) {
9393
bool CPOL = (dataMode & 0x10); ///< CPOL (Clock Polarity)
9494
bool CPHA = (dataMode & 0x01); ///< CPHA (Clock Phase)
9595

96+
if ( CPOL ) // Ensure same behavior as
97+
CPHA ^= 1; // SAM, AVR and Intel Boards
98+
9699
if(CPHA) {
97100
SPI1U |= (SPIUSME);
98101
} else {

0 commit comments

Comments
 (0)