home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / i8259.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  2.2 KB  |  90 lines

  1. /*
  2.  *    @(#) i8259.h 2.1 88/05/18 
  3.  *
  4.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987.
  5.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987.
  6.  *    This Module contains Proprietary Information of
  7.  *    The Santa Cruz Operation, Microsoft Corporation
  8.  *    and AT&T, and should be treated as Confidential.
  9.  */
  10.  
  11. /*
  12.  * THIS FILE CONTAINS CODE WHICH IS SPECIFIC TO THE
  13.  * GENERIC 286 COMPUTER AND MAY REQUIRE MODIFICATION
  14.  * WHEN ADAPTING XENIX TO NEW HARDWARE.
  15.  */
  16.  
  17.  
  18. /*
  19.  * i8259.h
  20.  *      definitions for interrupt control system on the 286.
  21.  *
  22.  */
  23.  
  24. /*
  25.  * PIC  Initialization Constants 
  26.  *     constants for ICW1 are defined in oem.c
  27.  */
  28. #define    PIC_VECT_BASE    0x40        /* start vectors at 64 */
  29. #define    PIC_SPF_MODE    0x10        /* special fully nested mode */
  30. #define    PIC_SLAVE_BUF    0x08        /* buffered mode, slave */
  31. #define    PIC_MASTER_BUF    0x0C        /* buffered mode, master */
  32. #define    PIC_AUTO_EOI    0x02        /* set to auto eoi */
  33. #define    PIC_86_MODE    0x01        /* MCS 86 mode */
  34. #define PIC_SINGLE    0x02        /* icw1 ( no cascade mode ) */
  35.  
  36. /*
  37.  * PIC commands
  38.  */
  39. #define    PIC_EOI        0x20        /* Non-specific EOI command */
  40. #define PIC_SEOI    0x60        /* Specific EOI command */
  41. #define    PIC_SET_PRI    0xC0        /* Set priority command */
  42. #define    PIC_ISR_READ    0x0B        /* Select ISR for input */
  43. #define    PIC_IRR_READ    0x0A        /* Select IRR for input */
  44.  
  45. /*
  46.  * Generate masks to turn on/off a given level.
  47.  * PIC_MASK: bit(i) = 1 ==> masked; 0 ==> enabled.
  48.  */
  49.  
  50. #define    PIC_MON(i)    (0xFF & ~(1<<(i)))
  51. #define    PIC_MOFF(i)    (1<<(i))
  52.  
  53. /*
  54.  * define master & slave levels
  55.  * encoding for master levels
  56.  *    lev = master#
  57.  * encoding for slave levels
  58.  *    lev = (master# + 1) * 8 + slave#
  59.  *
  60.  * or,
  61.  *       7   6   5   4   3   2   1   0
  62.  *    -----------------------------------
  63.  *    |      pic index     | active lev |
  64.  *    -----------------------------------
  65.  */
  66. #define PIC_ML0    0
  67. #define PIC_ML1    1
  68. #define PIC_ML2    2
  69. #define PIC_ML3    3
  70. #define PIC_ML4    4
  71. #define PIC_ML5    5
  72. #define PIC_ML6    6
  73. #define PIC_ML7    7
  74. #define PIC_MCL0    8
  75. #define PIC_MCL1    16
  76. #define PIC_MCL2    24
  77. #define PIC_MCL3    32
  78. #define PIC_MCL4    40
  79. #define PIC_MCL5    48
  80. #define PIC_MCL6    56
  81. #define PIC_MCL7    64
  82. #define PIC_SL0    0
  83. #define PIC_SL1    1
  84. #define PIC_SL2    2
  85. #define PIC_SL3    3
  86. #define PIC_SL4    4
  87. #define PIC_SL5    5
  88. #define PIC_SL6    6
  89. #define PIC_SL7    7
  90.