[bit.listserv.i-amiga] Detecting Carrier Detect Signal in C

A0NJ@UNB.CA (Greg Patterson) (02/04/90)

Hi people, could some kind soul show me some code to detect the status
of the CD line (carrier detect) on the modem/serial port.

I've looked in the RKM: libraries and devices V1.2 but haven't been
able to find anything that would work. At least I don't think I have.
Does the io_SerFlags have anything to do with it? Seems that these
only set it????

Thanks!

A0NJ@UNB.CA

svermeulen@JANUS.MTROYAL.AB.CA (02/05/90)

Greg,

    Funny you should ask about how to detect the CD line through
    the serial device, I too am about to do it....  Anyway, it looks
    like you need to send the serial device a CMD_QUERY command
    and then look at the io_Status word when the command completes.
    Bit 5 is the Carrier Detect (active low).

Regards,
Stephen Vermeulen                                             PO Box 3295
Author: Express Paint, Spritz and Fusion Paint                Station B
Newsletter Editor of AMUC (the AMiga Users of Calgary)        Calgary, Alberta
SVermeulen % Janus.MtRoyal.AB.CA @ UncaNet.BITnet ...or...    CANADA
SVermeulen % Janus.MRC.AdhocNet.CA @ UncaEdu.BITnet           T2M 4L8