home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1067 / space-c1-2 < prev    next >
Encoding:
Text File  |  1990-12-28  |  4.5 KB  |  169 lines

  1. /* Async device configuration file for the FAS async driver. */
  2.  
  3. /* This version is for the standard COM1 and COM2 ports.
  4. */
  5.  
  6. /* Originally written by
  7. Jim Murray              encore!cloud9!jjmhome!jjm
  8. 2 Mohawk Circle         harvard!m2c!jjmhome!jjm
  9. Westboro Mass 01581     jjm%jjmhome@m2c.m2c.org
  10. USA                     voice (508) 366-2813
  11. */
  12.  
  13. /* Current author:
  14. Uwe Doering        gemini@geminix.mbx.sub.org
  15. Billstedter Pfad 17 B
  16. 1000 Berlin 20
  17. West Germany
  18. */
  19.  
  20. #ident    "@(#)space.c    2.06"
  21.  
  22. #include <sys/fas.h>
  23.  
  24. /* This is the number of devices to be handled by this driver.
  25.    You may define up to 16 devices.  If this number is changed
  26.    the arrays below must be filled in accordingly.
  27. */
  28. #define NUM_PHYSICAL_UNITS    2
  29.  
  30. #if NUM_PHYSICAL_UNITS > MAX_UNITS
  31. #undef NUM_PHYSICAL_UNITS
  32. #define NUM_PHYSICAL_UNITS    MAX_UNITS
  33. #endif
  34.  
  35. /* let the driver know the number of devices */
  36. uint    fas_physical_units = NUM_PHYSICAL_UNITS;
  37.  
  38. /* array of base port addresses */
  39. uint    fas_port [NUM_PHYSICAL_UNITS] =
  40. {
  41.     0x3f8,    0x2f8
  42. };
  43.  
  44. /* array of interrupt vectors */
  45. uint    fas_vec [NUM_PHYSICAL_UNITS] =
  46. {
  47.     0x4,    0x3
  48. };
  49.  
  50. /* initial modem control port info
  51.    This value is ored into the modem control value for each UART.  This is
  52.    normaly used to force out2 which is used to enable the interrupts of
  53.    the standard com1 and com2 ports.  Several brands of cards have modes
  54.    that allow them to work in compatible mode like com1 and com2 or as a
  55.    mux.  One of these cards is the MU-440 card by DFI.  When this card is
  56.    used with the common interrupt out2 must not be set or there will be
  57.    a fight on the bus.
  58.  
  59.    Note: This is one of the major trouble-spots with mux cards. Check
  60.          your manual.
  61. */
  62.  
  63. uint    fas_mcb [NUM_PHYSICAL_UNITS] =
  64. {
  65.     MC_SET_OUT2,    MC_SET_OUT2
  66. };
  67.  
  68. /* array of modem control flags
  69.    You can choose which signals to use for modem control. See fas.h
  70.    for possible names and values. Whether or not modem control is
  71.    used is determined by the minor device number at open time.
  72. */
  73. uint    fas_modem [NUM_PHYSICAL_UNITS] =
  74. {
  75.     EN_DTR | CA_DCD | UB_RING,
  76.     EN_DTR | CA_DCD | UB_RING
  77. };
  78.  
  79. /* array of hardware flow control flags
  80.    You can choose which signals to use for hardware handshake. See fas.h
  81.    for possible names and values. Whether or not hardware handshake is
  82.    used is determined by the minor device number at open time.
  83. */
  84. uint    fas_flow [NUM_PHYSICAL_UNITS] =
  85. {
  86.     HI_RTS | HO_CTS_ON_DSR,
  87.     HI_RTS | HO_CTS_ON_DSR
  88. };
  89.  
  90. /* additional configurations for multiplexed interrupt boards
  91.    If you have a mux board, you may have to acknowledge interrupts
  92.    by writing to a special register. There may be a separate register
  93.    for every single port or for every interrupt vector or both.
  94.    The following arrays contain the special register addresses and
  95.    the corresponding values that are written to them in response
  96.    to an interrupt.
  97. */
  98.  
  99. /* array of int ack register addresses
  100.    These registers are written to every time after all interrupt
  101.    sources in the corresponding UART have been cleared.
  102.    Enter the addresses on a per unit base. An address of zero
  103.    disables this feature.
  104. */
  105.  
  106. uint    fas_int_ack_port [NUM_PHYSICAL_UNITS] =
  107. {
  108.     0,    0
  109. };
  110.  
  111. /* array of int ack values
  112.    These values are written to the corresponding int ack register
  113.    in response to an interrupt.
  114. */
  115.  
  116. uint    fas_int_ack [NUM_PHYSICAL_UNITS] =
  117. {
  118.     0,    0
  119. };
  120.  
  121. /* array of int ack mux register addresses
  122.    These registers are written to every time after all interrupt
  123.    sources in all of the UARTs that are tied to the corresponding
  124.    interrupt vector have been cleared.
  125.    Enter the addresses on a per vector base. An address of zero
  126.    disables this feature.
  127. */
  128.  
  129. uint    fas_mux_ack_port [NUM_INT_VECTORS] =
  130. {
  131.     0,    0,    0,    0,
  132.     0,    0,    0,    0,
  133.     0,    0,    0,    0,
  134.     0,    0,    0,    0
  135. };
  136.  
  137. /* array of int ack mux values
  138.    These values are written to the corresponding int ack mux register
  139.    in response to an interrupt.
  140. */
  141.  
  142. uint    fas_mux_ack [NUM_INT_VECTORS] =
  143. {
  144.     0,    0,    0,    0,
  145.     0,    0,    0,    0,
  146.     0,    0,    0,    0,
  147.     0,    0,    0,    0
  148. };
  149.  
  150. /* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE.
  151.    ============================================
  152. */
  153.  
  154. /* array of structures to hold all info for a physical minor device */
  155. struct fas_info    fas_info [NUM_PHYSICAL_UNITS];
  156.  
  157. /* array of ttys for logical minor devices */
  158. struct tty    fas_tty [NUM_PHYSICAL_UNITS * 2];
  159.  
  160. /* array of pointers to fas_info structures
  161.    this prevents time consuming multiplications for index calculation
  162. */
  163. struct fas_info    *fas_info_ptr [NUM_PHYSICAL_UNITS];
  164.  
  165. /* array of pointers to fas_tty structures
  166.    this prevents time consuming multiplications for index calculation
  167. */
  168. struct tty    *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2];
  169.