diff options
| author | Meco Man <[email protected]> | 2023-06-10 15:27:53 -0400 |
|---|---|---|
| committer | Man, Jianting (Meco) <[email protected]> | 2023-06-10 19:00:08 -0400 |
| commit | 28b7c88269b8b48a017b870f2b49ae27dffeacb3 (patch) | |
| tree | 8551c497fce22711cce3ed7a88af3959b99aa310 | |
| parent | 8d6e536e88bd85ff5698b692c2e616b56863e6dd (diff) | |
[stm32][drv_spi] revert the typo
it shouldn't be a static variable.
| -rw-r--r-- | bsp/stm32/libraries/HAL_Drivers/drv_spi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_spi.c b/bsp/stm32/libraries/HAL_Drivers/drv_spi.c index 0762b9bf2a..da85f183b6 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_spi.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_spi.c @@ -140,9 +140,8 @@ static rt_err_t stm32_spi_init(struct stm32_spi *spi_drv, struct rt_spi_configur spi_handle->Init.NSS = SPI_NSS_SOFT; - static uint32_t SPI_CLOCK; - -/* Some series may only have APBPERIPH_BASE, but don't have HAL_RCC_GetPCLK2Freq */ + uint32_t SPI_CLOCK = 0UL; + /* Some series may only have APBPERIPH_BASE, but don't have HAL_RCC_GetPCLK2Freq */ #if defined(APBPERIPH_BASE) SPI_CLOCK = HAL_RCC_GetPCLK1Freq(); #elif defined(APB1PERIPH_BASE) || defined(APB2PERIPH_BASE) |
