[fpc-pascal] BUG:flush the serial in FPC2.6.0
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Thu Jul 12 09:55:05 CEST 2012
kc87654321 wrote:
> I am trying to flush the serial incom on Linux with no success.
> So far I have: serial.pp in fpc 2.6.0
> is SerFlush, which calls fpfsync, intended to discard input data, no work.
>
> it is patch as 0018946 but for fpc 2.4.2 no 2.6.0
> http://free-pascal-general.1045716.n5.nabble.com/Unix-serial-port-handling-td3413763.html#a3415365
That patch should be good all the way to 2.7.1- I'm using it here as
routine.
SerFlush() was discussed in the list a few months ago, and the consensus
was that it was probably inappropriate which is why I've marked it as
deprecated. Try SerFlushInput() which goes straight to the operating system.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal
mailing list