From: Yves R. <y.r...@in...> - 2003-05-15 09:30:54
|
Hello people, I find the timeout code in lib/command.c function GetCommand works much better with this patch. Otherwise, it hangs if a character is already present in the uart, and doesn't timeout if there is none. While I am at it, why is GetCommand weak? Cheers, Y. diff -u -r1.1.1.1 command.c --- command.c 2002/11/05 13:32:25 1.1.1.1 +++ command.c 2003/05/14 16:34:11 @@ -275,7 +275,7 @@ for(numRead = 0, i = 0; numRead < maxRead;) { /* try to get a byte from the serial port */ - while(serial_poll() != 0) { + while(serial_poll() == 0) { currentTime = TimerGetTime(); /* check timeout value */ |