Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telepathy Communications Library - <b>tp_hshk()</b> - get or set handshake settings http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_hshk() - get or set handshake settings

   nOldHshk := tp_hshk(nPort, [nNewHshk])

   nPort       Serial port number.
   nNewHshk    New handshake settings.

   Returns     Original handshake settings.

   Gets or sets the handshake flags for a serial port.  Handshake flags
   control both hardware handshaking and software XON/XOFF flow control.
   The flags, nOldHshk and nNewHshk, are integers produced by adding
   together zero or more of the following values:

       Value       Name            Meaning
       ----------------------------------------------------------------
          1        THS_RDSR        DSR (Data Set Ready) required to send
                                   characters.
          2        THS_RCTS        CTS (Clear To Send) required to send
                                   characters.
          4        THS_RXOFF       Received XON and XOFF control output
                                   data flow.
          8        THS_RDCD        DCD (Data Carrier Detect) required to
                                   send or receive characters.
         16        THS_ADTR        Turn on DTR (Data Terminal Ready).
         32        THS_CDTR        Turn off DTR when input buffer
                                   reaches high-water mark.
         64        THS_ARTS        Turn on RTS (Request To Send).
        128        THS_CRTS        Turn on RTS only when waiting to
                                   send.
        256        THS_SXOFF       Send XON and XOFF to control input
                                   data flow.

   [5.0] In Clipper 5.0, the constants in the "Name" column are defined
   in the telepath.ch header file.

   if nNewHshk is omitted, tp_hshk() just returns the current handshake
   settings.  If nNewHshk is specified, it changes the settings and
   returns the original value.

   tp_hshk() is useful for setting, saving, and restoring the entire
   handshake setup in a single function.  To change individual settings,
   use these functions:

       tp_ctrlcts()    tp_ctrldcd()    tp_ctrldsr()
       tp_ctrldtr()    tp_ctrlrts()    tp_ctrlx()

   Example:

       tp_hshk(1, 1+2+4+16+64+256)     // Set DTR/DSR, RTS/CTS, and
                                       // XON/XOFF handshaking.

See Also: tp_himark() tp_lomark() tp_ctrlcts() tp_ctrlrts()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson