increase spi speed

pull/77/head
Liam 2020-09-21 15:35:23 +02:00 committed by Daniele Lacamera
parent 2e440b7b24
commit 579871f72e
1 changed files with 1 additions and 1 deletions

View File

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