diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-08-30 14:03:43 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-08-30 14:03:43 -0400 |
commit | 53053ad89ab38d79154c1edb6873d06651da730f (patch) | |
tree | b2d74b7c5b6c8177b77fa9e770b7e0fb434eb8b3 /watch-library/watch/watch_uart.c | |
parent | 27ce7003b3441b52df64a96312d96c284d964ac4 (diff) | |
download | Sensor-Watch-53053ad89ab38d79154c1edb6873d06651da730f.tar.gz Sensor-Watch-53053ad89ab38d79154c1edb6873d06651da730f.tar.bz2 Sensor-Watch-53053ad89ab38d79154c1edb6873d06651da730f.zip |
SIMPLIFY! Always run the main clock at 8 MHz
Diffstat (limited to 'watch-library/watch/watch_uart.c')
-rw-r--r-- | watch-library/watch/watch_uart.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/watch-library/watch/watch_uart.c b/watch-library/watch/watch_uart.c index 1ab888bd..a747e71b 100644 --- a/watch-library/watch/watch_uart.c +++ b/watch-library/watch/watch_uart.c @@ -53,8 +53,7 @@ #include "peripheral_clk_config.h" void watch_enable_debug_uart(uint32_t baud) { - uint32_t freq = watch_get_cpu_speed(); - uint64_t br = (uint64_t)65536 * ((freq * 4) - 16 * baud) / (freq * 4); + uint64_t br = (uint64_t)65536 * ((CONF_CPU_FREQUENCY * 4) - 16 * baud) / (CONF_CPU_FREQUENCY * 4); gpio_set_pin_direction(D1, GPIO_DIRECTION_IN); gpio_set_pin_function(D1, PINMUX_PB00C_SERCOM3_PAD2); |