[En-Nut-Discussion] How to write character filter with timeout?
uprinz2 at netscape.net
Wed Aug 19 22:36:01 CEST 2009
I need to wait for a specific character on a USART and there must be a
timeout available. To simply wait for a character isn't a problem as one
_ioctl(_fileno(dev), UART_SETREADTIMEOUT, &t);
In my case lots of characters can come in and I have to wait on that
specific one... So I have to read every character until I found 'the
one' or time is over.
Is there a non-blocking function for fgetc() or do I have to do stream
parsing or is there any easier way?
More information about the En-Nut-Discussion