implement USB console

This commit is contained in:
Joey Castillo
2021-08-28 13:35:52 -04:00
parent 39a5c822a2
commit 3e45de7dea
9 changed files with 356 additions and 2 deletions

View File

@@ -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);