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_ctrldtr()</b> - get or set dtr handshake setting http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_ctrldtr() - get or set DTR handshake setting

   nOldCtrl := tp_ctrldtr(nPort, [nNewCtrl])

   nPort       Serial port number.
   nNewCtrl    New DTR control setting.

   Returns     Original DTR control setting.

   Gets or sets the DTR handshake setting.  This setting may be one of:

       0   Turn DTR off.
       1   Turn DTR on.
       2   Turn DTR on normally, off when the input buffer fills up to
           the high-water mark.

   If nNewCtrl is omitted, tp_ctrldtr() just returns the current
   setting.  If nNewCtrl is specified, it changes the setting and
   returns the original value.

   The default setting when a port is opened is 1.

   Example:

       tp_ctrldtr(1, 0)    // Turn DTR off...
       tp_delay(1)         // ...wait one second...
       tp_ctrldtr(1, 1)    // ...and turn it back on.

See Also: tp_hshk() tp_lomark() tp_himark()

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