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_ast4()</b> - configure ast 4-port card. http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_ast4() - configure AST 4-port card.

   tp_ast4(nAddress, nIRQ)

   nAddress    Status port address.
   nIRQ        IRQ (interrupt request) number.

   Configures Telepathy to recognize an AST 4-port card (formally called
   the Async Cluster Adapter).  nAddress is the decimal I/O base address
   for the card's status port, and nIRQ is the card's IRQ number.  After
   calling tp_ast4(), you must set up each port on the card with
   tp_setport() before it can be used.

   The status port will be at address 703 (2BF hex) or 447 (2BF hex),
   depending on the setting of switch S3-2 on the card.  The addresses
   for the four ports, which you will supply to tp_setport(), will then
   be 672, 680, 688, and 696 (if the status port is at 703), or 416,
   424, 432, and 440 (status port at 447).

   If you use 'compatible mode', with the first two ports on the card
   acting as normal serial ports, tp_ast4() applies only to the other
   two ports.  In that case, you should not reconfigure ports 1 and 2.

   Examples:

       // AST 4-port card in enhanced mode: S3-1 off, S3-2 on.
       tp_ast4(703, 5)         // Status port at 2BFh, IRQ 5
       tp_setport(1, 672, 5, 0)
       tp_setport(2, 680, 5, 1)
       tp_setport(3, 688, 5, 2)
       tp_setport(4, 696, 5, 3)

       // AST 4-port card in compatible mode: S3-1 on, S3-2 on.
       tp_ast4(703, 5)         // Status port at 2BFh, IRQ 5
       // We don't touch ports 1 and 2, since they're already set
       // up correctly.
       tp_setport(3, 688, 5, 2)
       tp_setport(4, 696, 5, 3)

See Also: tp_pcserial() tp_setport()

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