[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 COM_MCR()
 Reads or sets the Modem Control Register (MCR)
------------------------------------------------------------------------------
 Syntax

     COM_MCR(<nComPort>,[<nMCR>]) --> nMCR

 Arguments

     <nComPort>  Designates the port (1 to 4) for which the Modem Control
     Register (MCR) is read or set.

     <nMCR>  Designates a specified parameter between 0 and 255.  If this
     parameter is not specified, then MCR is read only.

 Returns

     COM_MCR() returns the contents of the Modem Control Register.

 Description

     The Modem Control Register can be read only and/or read and set.  The
     second optional parameter determines if a new value is set.  The bits
     have the following meaning:

     Table 3-4: MC Register Coding
     ------------------------------------------------------------------------
     Bit     Symb.Const.    Definition
     ------------------------------------------------------------------------
     0       MCR_ERROR      Parameter error
     1       MCR_DTR        Data terminal ready (DTR)
     2       MCR_RTS        Request to send (RTS)
     4       MCR_OUT_1      OUT 1
     8       MCR_OUT_2      OUT 2
     16      MCR_LOOP       LOOP
     ------------------------------------------------------------------------

 Note

     .  The OUT1, OUT2, and LOOP control bits can only be changed
        using this function.  Additional functions are available for DTR and
        RTS.

 Example

     nStatus  :=  COM_MCR(1)         // Port 1 MCR is read only

     IF NUMAND(nStatus, 3) = 3
        ? "DTR and RTS are active!"
     ENDIF


See Also: COM_DTR() COM_RTS()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson