Skip to content

Commit 5020fd4

Browse files
authored
Merge pull request #246 from RudolphRiedel/main
- fix for #244, byte-order wrong for LSBFIRST buffer transfers
2 parents d0c5148 + f465a7c commit 5020fd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/SPI/SPI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ void ArduinoSPI::configSpi(arduino::SPISettings const & settings)
444444

445445
/* register undocumented for the RA4M1 but found to be working and necessary */
446446
/* BYSW - Byte Swap Operating Mode Select - 1 = Byte Swap ON - essential for 32 bit transfers */
447-
_spi_ctrl.p_regs->SPDCR2_b.BYSW = 1;
447+
_spi_ctrl.p_regs->SPDCR2_b.BYSW = ~bit_order;
448448

449449
_spi_ctrl.p_regs->SPCKD = 0;
450450

0 commit comments

Comments
 (0)