Does anybody know of any way of interrogating a serial (com) port to see if there is anything to read, before attempting a read, using dio_read or something similar?

I can do all the setting, writing and reading of a serial port OK, but dio_read, fread etc hang if there is nothing to read. I need to avoid the hang. Is there some way of finding out if there is anything to read before attempting to read it?

tia.

    Write a Reply...