I have a GPS which continuously send info on the RX pin.
What is the best way/practice to read from leuart ?
I think i should implement a buffer, then read it when it is full.
Found the declaration in the examples :
- Code: Select all
init_printf(TD_UART_Init(9600, true, false), TD_UART_Putc, TD_UART_Start,
TD_UART_Stop);
Then, I found this on the web :
- Code: Select all
while ((c = TD_UART_GetChar()) >= 0) {
//...
}
But in my case, it will never stop if i use it like this.
Thanks in advance,
Arnaud.