I am trying to "echo" any input over the UART, back to the console, as it is entered.
So I am trying to use getchar(). However, when I step through it on the debugger, I see that I don't have anything in the buffer for getchat() to pull out, until I hit enter in the terminal. Then the buffer is full of everything I just typed, and getchar() will go through and pull them out one at a time.
However I know that my terminal is sending every character as I type it.
I have read on this forum that the UART has a buffer. Is it storing up my input until I hit enter, and thus preventing getchar() from getting it as I type it?
Any help would be really helpful. Is there maybe a way to disable the UART buffer? Or to flush it every time a character is received?