[Lazarus] Using SdpoSerial, how to clear buffers?
Bo Berglund
bo.berglund at gmail.com
Thu Nov 4 23:43:11 CET 2010
On Thu, 04 Nov 2010 23:23:56 +0100, Bo Berglund
<bo.berglund at gmail.com> wrote:
>I have started to code using the SdpoSerial component and now I am in
>need of a way to clear the receive and transmit buffers.
>
>I have not found any useful method in the TSdpoSerial object but it
>exposes the underlying SynSer component so by testing this I found two
>candidates:
>var
> FComm: TSdpoSerial;
>begin
> ...
> FComm.SynSer.Flush
> FComm.SynSer.Purge
>
>What does these methods do? Are they useful to get rid of stuff in the
>comm buffers when starting over with the communication protocol?
>
Never mind,
I found the answer in the synaser sourcefile:
Purge will clear the buffers, Flush will not.
--
Bo Berglund
Developer in Sweden
More information about the Lazarus
mailing list