> On Tue, Sep 28, 2010 at 9:08 PM, Bo Berglund 
> <[email protected]> wrote:
> > 1) Is serial communication with events not possible in FPC on Linux?
> 
> Of course it is possible. You just have to write your own library to
> do it. One possibility would be adapting lNet, like Synaser adapts
> Synapse.

I had hoped there would be ready-made code for such common things as
using serial communications....
 
> > 2) How can one use blocking reads when there is no way to 
> know exactly when
> > data will arrive? Everything else will stop when waiting 
> for data, right?
> 
> By using a timeout. Timeout = 0 returns immediately, so you can use
> this to check periodicaly if data comes.

Where is the timeout? Here is the serial.SerRead function:

function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt):
LongInt;

AFAICS there is only a Count parameter specifying the number of bytes to
read.

--
Bo B


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to