I want to keep the ability to use a simple printf() for writing messages on stdio (serial), and use the terminal program also to send inputs to a main loop. The getchar() function can read, but it is a blocking function. Is there a simple way to read non-blocking from the stdin?
I have tried to add
static BufferedSerial serial(NC, STDIO_UART_RX);
But the result is a blocking printf, it is stuck in wait_writable.
Is there a way to read non-blocking or check if a char is available?