1
0
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:
Peter Kietzmann 2018-09-10 08:42:30 +02:00 committed by GitHub
commit 25868d1e04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 */