Revert SPIx_CR2 change.

pull/31/head
David Garske 2019-12-20 10:40:56 -08:00
parent a342b7824f
commit 00fff87d74
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ void spi_init(int polarity, int phase)
APB2_CLOCK_ER |= SPI1_APB2_CLOCK_ER_VAL;
spi1_reset();
SPI1_CR1 = SPI_CR1_MASTER | (5 << 3) | (polarity << 1) | (phase << 0);
SPI1_CR2 = SPI_CR2_SSOE | (0x07 << 8);
SPI1_CR2 |= SPI_CR2_SSOE;
SPI1_CR1 |= SPI_CR1_SPI_EN;
}
}