Skip to content

Commit e705959

Browse files
committed
include: drivers: spi.h: Get bit ordering from DT
Get bit ordering from DT property in SPI_CONFIG_DT. More precisely, set LSB first if set in DT. Signed-off-by: Declan Snyder <[email protected]>
1 parent ac1ec61 commit e705959

File tree

1 file changed

+1
-0
lines changed
  • include/zephyr/drivers

1 file changed

+1
-0
lines changed

include/zephyr/drivers/spi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ struct spi_config {
480480
COND_CODE_1(DT_PROP(node_id, spi_cpol), SPI_MODE_CPOL, (0)) | \
481481
COND_CODE_1(DT_PROP(node_id, spi_cpha), SPI_MODE_CPHA, (0)) | \
482482
COND_CODE_1(DT_PROP(node_id, spi_hold_cs), SPI_HOLD_ON_CS, (0)), \
483+
COND_CODE_1(DT_PROP(node_id, spi_lsb_first), SPI_TRANSFER_LSB, (0)), \
483484
.slave = DT_REG_ADDR(node_id), \
484485
.cs = SPI_CS_CONTROL_INIT(node_id), \
485486
}

0 commit comments

Comments
 (0)