Commit 74cd0a9d authored by Declan Snyder's avatar Declan Snyder Committed by Benjamin Cabé
Browse files

spi_nxp_lpspi: Fix TX word formation for multibyte

For multi-byte word, there is clearly a bug in that the same byte is
written to each spot in the word instead of writing all the bytes
properly.

Signed-off-by: default avatarDeclan Snyder <declan.snyder@nxp.com>
(cherry picked from commit 97e29a9f)
parent 8da58ff5
Loading
Loading
Loading
Loading
+1 −1
Changes for drivers/spi/spi_nxp_lpspi/spi_nxp_lpspi.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ static inline uint32_t lpspi_next_tx_word(const struct device *dev, int offset)
	uint32_t next_word = 0;

	for (uint8_t i = 0; i < num_bytes; i++) {
		next_word |= *byte << (BITS_PER_BYTE * i);
		next_word |= byte[i] << (BITS_PER_BYTE * i);
	}

	return next_word;