spi: Fix mcux dspi driver to parse lsb transfer mode correctly
The mcux dspi driver was incorrectly using the macro SPI_MODE_GET() to parse the operation for SPI_TRANSFER_LSB. The effect of this bug was that the driver would quietly always operate in SPI_TRANSFER_MSB mode. Coverity-CID: 185401 Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
6b11106440
commit
c6f2b4ccb8
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ static int spi_mcux_configure(struct device *dev,
|
|||
: kDSPI_ClockPhaseFirstEdge;
|
||||
|
||||
master_config.ctarConfig.direction =
|
||||
(SPI_MODE_GET(spi_cfg->operation) & SPI_TRANSFER_LSB)
|
||||
(spi_cfg->operation & SPI_TRANSFER_LSB)
|
||||
? kDSPI_LsbFirst
|
||||
: kDSPI_MsbFirst;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue