> I have written a program which listens to the serial port and records > certain parts of the data that it receives. I have been testing this by > sending text files over the serial port via HyperTerminal. I suspect there > is a problem with how I am flushing the buffer upon opening. The situation > is that if I open a serial connection and then start streaming data > everything works perfectly. However if I start streaming data before > opening a serial connection, the code blocks at the SerReceiveFlush call and > only continues once there is a break in the data flow. Has anyone seen this > or know about a fix? I will include my OpenSerialPort() method to make this > question more clear. Thanks very much in advance.
According to the documentation, SerReceiveFlush blocks until X ticks elapse without a character arriving. You specify X via SerReceiveFlush's second parameter. If you specify too large a value, then yes it will block until there is a break in the data flow. Pass 0 if you don't want it to block at all. Eric W. Sirko Softworks Solutions, LLC -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
