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_close()</b> - close serial port http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_close() - close serial port

   nError := tp_close([nPort], [nTimeout], [lNoReset])

   nPort       Serial port number, default 0 to close all ports.
   nTimeout    Output buffer flush time (seconds), default 0.
   lNoReset    Specify TRUE to leave DTR and RTS unchanged on close.

   Returns     Error code.

   Closes a serial port.  Optionally, if nTimeout is specified, waits
   for the output buffer to empty before closing the port.  Discards any
   buffered input or output data, and turns off DTR and RTS.

   If lNoReset is present and true, tp_close() does not turn off DTR or
   RTS.  This allows you to close a port without hanging up an attached
   modem.

   If nPort is omitted, closes all open serial ports.

   Examples:

       tp_close(1, 2)      // Close port 1, wait up to two seconds to
                           //   flush output buffer.

       tp_close()          // Close all ports.

See Also: tp_flush() tp_open() tp_uninstall() Error Codes

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