drivers: serial: Add clock source selection feature to MAX32 UART
This commit adds clock source selection feature to UART of MAX32 MCUs. Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
This commit is contained in:
parent
8cd0c6893e
commit
b0672f8237
@ -293,6 +293,12 @@ static int uart_max32_init(const struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = Wrap_MXC_UART_SetClockSource(regs, cfg->perclk.clk_src);
|
||||
if (ret != 0) {
|
||||
LOG_ERR("Cannot set UART clock source");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = pinctrl_apply_state(cfg->pctrl, PINCTRL_STATE_DEFAULT);
|
||||
if (ret) {
|
||||
return ret;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user