[stm32][drv_spi] revert the typo

it shouldn't be a static variable.
This commit is contained in:
Meco Man 2023-06-10 15:27:53 -04:00 committed by Man, Jianting (Meco)
parent 8d6e536e88
commit 28b7c88269
1 changed files with 2 additions and 3 deletions

View File

@ -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)