fix(uart): Fixed C++ type conversion compile error in uart_ll_get_sclk

Closes https://github.com/espressif/esp-idf/issues/11813
This commit is contained in:
Song Ruo Jing
2023-07-11 11:13:15 +08:00
parent a9523b2cef
commit b60f4a6f37
7 changed files with 24 additions and 25 deletions

View File

@@ -169,13 +169,13 @@ static inline void uart_ll_get_sclk(uart_dev_t *hw, soc_module_clk_t *source_clk
switch (UART_LL_PCR_REG_GET(hw, sclk_conf, sclk_sel)) {
default:
case 1:
*source_clk = UART_SCLK_PLL_F48M;
*source_clk = (soc_module_clk_t)UART_SCLK_PLL_F48M;
break;
case 2:
*source_clk = UART_SCLK_RTC;
*source_clk = (soc_module_clk_t)UART_SCLK_RTC;
break;
case 3:
*source_clk = UART_SCLK_XTAL;
*source_clk = (soc_module_clk_t)UART_SCLK_XTAL;
break;
}
}