diff options
Diffstat (limited to 'chip/stm32/usart-stm32f.c')
-rw-r--r-- | chip/stm32/usart-stm32f.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chip/stm32/usart-stm32f.c b/chip/stm32/usart-stm32f.c index 918b98b96e..276e1d7193 100644 --- a/chip/stm32/usart-stm32f.c +++ b/chip/stm32/usart-stm32f.c @@ -4,6 +4,7 @@ */ #include "usart-stm32f.h" +#include "clock.h" #include "common.h" #include "hooks.h" #include "registers.h" @@ -27,7 +28,7 @@ static void usart_variant_enable(struct usart_config const *config) */ configs[config->hw->index] = config; - usart_set_baud_f0_l(config); + usart_set_baud_f(config, clock_get_freq()); task_enable_irq(config->hw->irq); } @@ -50,7 +51,7 @@ static void freq_change(void) for (i = 0; i < ARRAY_SIZE(configs); ++i) if (configs[i]) - usart_set_baud_f(configs[i]); + usart_set_baud_f(configs[i], clock_get_freq()); } DECLARE_HOOK(HOOK_FREQ_CHANGE, freq_change, HOOK_PRIO_DEFAULT); |