Skip to content

Commit f465a7c

Browse files
committed
- fix for arduino#244, byte-order wrong for LSBFIRST buffer transfers
1 parent d0c5148 commit f465a7c

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
@@ -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)