View Single Post
  #13   Report Post  
Old October 8th 05, 12:41 PM
Dave
 
Posts: n/a
Default NEW ICom CIV Test Tool (need help if you have an icom radio)

On Sat, 08 Oct 2005 00:47:33 -0400, Al Klein
wrote:

Seems like plain old polled I/O - you can cancel any time the I/O
routine is still in the wait loop. The last time I did that, though,
was under DOS 2.1, so I have no idea if it can still be done in a
Windows API.


You can poll the serial port in Windows but it's not as
efficient as waiting for an event to happen while sleeping.
Normally, Windows wakes you up when the char arrives at the
serial port.

The way I set mine up is to issue a read of one byte while
in a loop. The loop is sleeping on the read command until
the char arrives. There is no CPU needed to poll since the
loop is asleep.

It's not a very easy to use API as I just found out but I
only have to write it and debug it once. Now that I have
something that works, I could send yo the source (in C++) if
you want to see what it looks like. It's a C++ class called
CComPort and it has 2 commands, ReadRxBuffer and
TransmitData. Both can be used simultaneously from different
threads without interfering with each other. It's quite nice
because I can use it for anything that needs to access the
serial ports without having to rewrite anything.

Well, it's late. I better try to get to sleep now. (4:40 am
Pacific time). I'm up late as usual.