From 00fff87d7482c6a589bca32e98eaaa5658c87aec Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 20 Dec 2019 10:40:56 -0800 Subject: [PATCH] Revert SPIx_CR2 change. --- hal/spi/spi_drv_stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/spi/spi_drv_stm32.c b/hal/spi/spi_drv_stm32.c index ac9c8df6..c92ab05b 100644 --- a/hal/spi/spi_drv_stm32.c +++ b/hal/spi/spi_drv_stm32.c @@ -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; } }