Skip to content

Commit 18c0b66

Browse files
committed
Fix SPI mode and bit order settings
1 parent 149f78b commit 18c0b66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/SPI/SPI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ void ArduinoSPI::configSpi(arduino::SPISettings const & settings)
383383
spcmd0 |= (uint32_t) bit_order << 12;
384384

385385
/* Configure the Bit Rate Division Setting */
386-
spcmd0 &= !(((uint32_t)0xFF) << 2);
386+
spcmd0 &= ~(((uint32_t)0xFF) << 2);
387387
spcmd0 |= (uint32_t) spck_div.brdv << 2;
388388

389389
/* Update settings. */

0 commit comments

Comments
 (0)