Skip to content

Commit fbb44b6

Browse files
authored
Merge pull request #13 from trevor-makes/main
Fix SPI mode and bit order settings
2 parents dbceb1e + 1c26024 commit fbb44b6

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) 3) << 2);
387387
spcmd0 |= (uint32_t) spck_div.brdv << 2;
388388

389389
/* Update settings. */

0 commit comments

Comments
 (0)