/* * Copyright (c) 2008-2014 Travis Geiselbrecht * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT */ #include #include #include #include #include #include #include void platform_dputc(char c) { if (c == '\n') uart_putc(DEBUG_UART, '\r'); uart_putc(DEBUG_UART, c); } int platform_dgetc(char *c, bool wait) { int ret = uart_getc(DEBUG_UART, wait); if (ret == -1) return -1; *c = ret; return 0; }