From b4c3086d2e42d43c31d10f2c0ad2b1eb4c92705d Mon Sep 17 00:00:00 2001 From: lxqyyds Date: Wed, 5 Apr 2023 15:09:35 +0800 Subject: [PATCH] [bsp] Add another fix similar to checking for I2Cx --- bsp/CME_M7/StdPeriph_Driver/src/cmem7_uart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bsp/CME_M7/StdPeriph_Driver/src/cmem7_uart.c b/bsp/CME_M7/StdPeriph_Driver/src/cmem7_uart.c index 8ddf5bd9f8..77def84d8f 100644 --- a/bsp/CME_M7/StdPeriph_Driver/src/cmem7_uart.c +++ b/bsp/CME_M7/StdPeriph_Driver/src/cmem7_uart.c @@ -37,7 +37,8 @@ static uint32_t UART_GetClock(UART0_Type* UARTx) { uint32_t dividor; - + assert_param(IS_UART_ALL_PERIPH(UARTx)); + if ((uint32_t)UARTx == (uint32_t)UART0) { dividor = GLOBAL_CTRL->CLK_SEL_0_b.UART0_CLK; } else if ((uint32_t)UARTx == (uint32_t)UART1) {