Skip to content

Commit 28b7c88

Browse files
committed
[stm32][drv_spi] revert the typo
it shouldn't be a static variable.
1 parent 8d6e536 commit 28b7c88

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bsp/stm32/libraries/HAL_Drivers/drv_spi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ static rt_err_t stm32_spi_init(struct stm32_spi *spi_drv, struct rt_spi_configur
140140

141141
spi_handle->Init.NSS = SPI_NSS_SOFT;
142142

143-
static uint32_t SPI_CLOCK;
144-
145-
/* Some series may only have APBPERIPH_BASE, but don't have HAL_RCC_GetPCLK2Freq */
143+
uint32_t SPI_CLOCK = 0UL;
144+
/* Some series may only have APBPERIPH_BASE, but don't have HAL_RCC_GetPCLK2Freq */
146145
#if defined(APBPERIPH_BASE)
147146
SPI_CLOCK = HAL_RCC_GetPCLK1Freq();
148147
#elif defined(APB1PERIPH_BASE) || defined(APB2PERIPH_BASE)

0 commit comments

Comments
 (0)