DCD/DSR as event triggers

I am interested in using modem control lines (DCD, DSR) to provide a fairly
tight timing pulse. Is there a way within this OS to block execution of a
thread until a modem line changes?

James Dabbs <jdabbs@tga.com> wrote:

I am interested in using modem control lines (DCD, DSR) to provide a fairly
tight timing pulse. Is there a way within this OS to block execution of a
thread until a modem line changes?

Not directly – that is, there isn’t a library routine that is called:
block_me_until_modem_line_changes().

But… if you setup your uart to generate an interrupt on the change, and
you attach an event to that interrupt, then just block your thread in
an InterruptWait() you can do it.

-David

QNX Training Services
dagibbs@qnx.com

Thanks!

Any examples out there for Pentium’s and 8250-ish UARTs? I.e, a Motorola
MBX2000 motherboard…

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:9718dm$6s3$1@nntp.qnx.com

James Dabbs <> jdabbs@tga.com> > wrote:
I am interested in using modem control lines (DCD, DSR) to provide a
fairly
tight timing pulse. Is there a way within this OS to block execution of
a
thread until a modem line changes?

Not directly – that is, there isn’t a library routine that is called:
block_me_until_modem_line_changes().

But… if you setup your uart to generate an interrupt on the change, and
you attach an event to that interrupt, then just block your thread in
an InterruptWait() you can do it.

-David

QNX Training Services
dagibbs@qnx.com