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_setport()</b> - configure special port http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_setport() - configure special port

   tp_setport(nPort, nAddress, nIRQ, nUnit)

   nPort       Serial port number.
   nAddress    I/O address.
   nIRQ        IRQ number.
   nUnit       Unit number for multi-port cards.

   Changes I/O address and IRQ number assignments for a serial port.
   The default assignments are:

       nPort       nAddress        nIRQ
       --------------------------------
         1         1016 (3F8h)       4
         2          760 (2F8h)       3
         3         1000 (3E8h)       4
         4          744 (2E8h)       3

   Ports 5 through 8 are initially unassigned.  If port nPort is open
   when tp_setport() is called, it is closed.

   The fourth parameter, nUnit, is required only when the IRQ has been
   assigned to a multi-port serial card.  In that case, it identifies
   which of the physical ports on the card is to be assigned to this
   logical port number.  Unit numbers start from 0, so a four-port card
   has unit numbers 0 to 3, an eight-port card has 0 to 7, and so on.

   Example:

       tp_setport(3, 1000, 5)      // Set COM3 to use IRQ5.
       tp_open(3,,,9600, 8, "N", 1)

See Also: tp_open()

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