mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-28 16:01:18 +01:00
Merge pull request #9885 from dylad/sam0_fix_spi_mode
sam0/spi: fix SPI mode assignment
This commit is contained in:
commit
25868d1e04
@ -137,7 +137,7 @@ int spi_acquire(spi_t bus, spi_cs_t cs, spi_mode_t mode, spi_clk_t clk)
|
||||
dev(bus)->CTRLA.reg = (SERCOM_SPI_CTRLA_MODE(0x3) | /* 0x3 -> master */
|
||||
SERCOM_SPI_CTRLA_DOPO(spi_config[bus].mosi_pad) |
|
||||
SERCOM_SPI_CTRLA_DIPO(spi_config[bus].miso_pad) |
|
||||
(mode << SERCOM_SPI_CTRLA_CPOL_Pos));
|
||||
(mode << SERCOM_SPI_CTRLA_CPHA_Pos));
|
||||
/* also no synchronization needed here, as CTRLA is write-synchronized */
|
||||
|
||||
/* finally enable the device */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user