Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-07

BUG:flush the serial in FPC2.6.0

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

kc87654321

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

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/BUG-flush-the-serial-in-FPC2-6-0-tp5710299.html Sent from the Free Pascal - General mailing list .

Reply by email

Mark Morgan Lloyd
to kc87654321
Show quoted text 6 lines
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]

Reply by email