summaryrefslogtreecommitdiffstats
path: root/watch-library/watch/watch_uart.c
diff options
context:
space:
mode:
authorJoey Castillo <jose.castillo@gmail.com>2021-08-28 13:35:52 -0400
committerJoey Castillo <jose.castillo@gmail.com>2021-08-28 13:55:17 -0400
commit3e45de7deade177b5caa921ee72a0e36300474c7 (patch)
treea93006c058d0efeb50353227a06eedb240005060 /watch-library/watch/watch_uart.c
parent39a5c822a2a2e798e2e39ff8a98b7af84253026c (diff)
downloadSensor-Watch-3e45de7deade177b5caa921ee72a0e36300474c7.tar.gz
Sensor-Watch-3e45de7deade177b5caa921ee72a0e36300474c7.tar.bz2
Sensor-Watch-3e45de7deade177b5caa921ee72a0e36300474c7.zip
implement USB console
Diffstat (limited to 'watch-library/watch/watch_uart.c')
-rw-r--r--watch-library/watch/watch_uart.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/watch-library/watch/watch_uart.c b/watch-library/watch/watch_uart.c
index 4cbac89b..68ac872e 100644
--- a/watch-library/watch/watch_uart.c
+++ b/watch-library/watch/watch_uart.c
@@ -53,6 +53,7 @@
#include "peripheral_clk_config.h"
void watch_enable_debug_uart(uint32_t baud) {
+ /// FIXME: UART baud rate calculation will be incorrect if plugged into USB / running at 16 MHz
uint64_t br = (uint64_t)65536 * (CONF_CPU_FREQUENCY - 16 * baud) / CONF_CPU_FREQUENCY;
gpio_set_pin_direction(D1, GPIO_DIRECTION_IN);