Mail Archives: djgpp/1996/07/17/05:15:19
Firstly, thankyou very much for svasync; it's very nice :-)
I've got a horrible feeling I'm being stupid here, but it seems to have
problems with reading `\0' from the serial port.
Using it the lazy way, as suggested is possible in the docs, (using the
return value of SVAsyncIn()) there is no way of discriminating between a
failed call and reading 0.
> unsigned char SVAsyncIn(void);
> Returns the next character in the buffer or a NULL upon an empty buffer.
> Use SVAsyncInStat() to check for the number of characters in the buffer.
I am now checking SVASyncStat() before each read :-)
Perhaps a note in the docs concerning this pitfall, or a more foolproof
SVASyncIn() (trivial) is required. There are a lot of us fools around!
..splitbung
--
* TQ 1.0 * The 'Just So Quotes'.
"Never put off until run time what you can do at compile time."
-- David Gries, in "Compiler Construction for Digital
Computers", circa 1969.
- Raw text -