Skip to content
Snippets Groups Projects
Unverified Commit 25868d1e authored by Peter Kietzmann's avatar Peter Kietzmann Committed by GitHub
Browse files

Merge pull request #9885 from dylad/sam0_fix_spi_mode

sam0/spi: fix SPI mode assignment
parents 04a6b754 4e6d3d1f
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment