diff --git a/platform/lpc43xx/debug.c b/platform/lpc43xx/debug.c index e3ccbf98..26f5fb4f 100644 --- a/platform/lpc43xx/debug.c +++ b/platform/lpc43xx/debug.c @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -105,13 +106,16 @@ int platform_dgetc(char *c, bool wait) if (!wait) { return -1; } + thread_yield(); } *c = readl(UART_BASE + REG_RBR); return 0; #else if (wait) { - for (;;) ; + for (;;) { + thread_yield(); + } } return -1; #endif