mirror of https://github.com/wolfSSL/wolfBoot.git
surround faster speed in ifdef so it only gets used for STM32L0 platform
parent
579871f72e
commit
4e823af012
|
|
@ -155,7 +155,11 @@ void spi_init(int polarity, int phase)
|
|||
spi_tpm2_pin_setup();
|
||||
APB2_CLOCK_ER |= SPI1_APB2_CLOCK_ER_VAL;
|
||||
spi1_reset();
|
||||
#ifdef PLATFORM_stm32l0
|
||||
SPI1_CR1 = SPI_CR1_MASTER | (polarity << 1) | (phase << 0);
|
||||
#else
|
||||
SPI1_CR1 = SPI_CR1_MASTER | (5 << 3) | (polarity << 1) | (phase << 0);
|
||||
#endif
|
||||
SPI1_CR2 |= SPI_CR2_SSOE;
|
||||
SPI1_CR1 |= SPI_CR1_SPI_EN;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue