s68155.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:4k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* s68155.h - Signetics 68155 Interrupt Handler header file */
  2. /* Copyright 1984-1992 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01e,22sep92,rrr  added support for c++
  7. 01d,26may92,rrr  the tree shuffle
  8. 01c,04oct91,rrr  passed through the ansification filter
  9.   -changed copyright notice
  10. 01b,05oct90,shl  added copyright notice.
  11.                  made #endif ANSI style.
  12. 01a,05Dec88,jcf   written.
  13. */
  14. #ifndef __INCs68155h
  15. #define __INCs68155h
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /* IRHDL addresses */
  20. #define IHDL_PTR(base) ((char *) ((base) + 0x01)) /* pointer -> CRn */
  21. #define IHDL_CR(base) ((char *) ((base) + 0x03)) /* control reg */
  22. #define IHDL_VEC(base) ((char *) ((base) + 0x05)) /* interrupt vec. */
  23. #define IHDL_LOCAL_MASK(base) ((char *) ((base) + 0x07)) /* local int. mask */
  24. #define IHDL_LOCAL_STATUS(base) ((char *) ((base) + 0x09)) /* local status */
  25. #define IHDL_BUS_MASK(base) ((char *) ((base) + 0x0b)) /* system bus mask */
  26. #define IHDL_BUS_STATUS(base) ((char *) ((base) + 0x0d)) /* system bus stat */
  27. #define IHDL_LAST_ACK(base) ((char *) ((base) + 0x0f)) /* last acknowledge*/
  28. /* control registers */
  29. #define IHDL_CR1 0x1 /* local interrupt level 1 */
  30. #define IHDL_CR2 0x2 /* local interrupt level 2 */
  31. #define IHDL_CR3 0x3 /* local interrupt level 3 */
  32. #define IHDL_CR4 0x4 /* local interrupt level 4 */
  33. #define IHDL_CR5 0x5 /* local interrupt level 5 */
  34. #define IHDL_CR6 0x6 /* local interrupt level 6 */
  35. /* equates for control register */
  36. #define IHDL_CR_HIGH 0x1 /* interrupt asserted high (unlikely) */
  37. #define IHDL_CR_EDGE 0x2 /* input is edge sensitive (likely) */
  38. #define IHDL_CR_VECTOR 0x4 /* IRHDL provides vector */
  39. /* equates for vector register */
  40. #define IHDL_VEC_MASK 0xf8 /* low three bits always read as zero */
  41. /* equates for local mask */
  42. #define IHDL_LOCAL_MASK_NMI_VEC 0x1 /* 1 = active high */
  43. #define IHDL_LOCAL_MASK_1 0x2 /* 1 = local interrupt 1 enabled */
  44. #define IHDL_LOCAL_MASK_2 0x4 /* 1 = local interrupt 2 enabled */
  45. #define IHDL_LOCAL_MASK_3 0x8 /* 1 = local interrupt 3 enabled */
  46. #define IHDL_LOCAL_MASK_4 0x10 /* 1 = local interrupt 4 enabled */
  47. #define IHDL_LOCAL_MASK_5 0x20 /* 1 = local interrupt 5 enabled */
  48. #define IHDL_LOCAL_MASK_6 0x40 /* 1 = local interrupt 6 enabled */
  49. #define IHDL_LOCAL_MASK_NMI 0x80 /* 1 = NMI enabled */
  50. /* equates for local status */
  51. #define IHDL_LOCAL_STATUS_1 0x2 /* 1 = local interrupt 1 */
  52. #define IHDL_LOCAL_STATUS_2 0x4 /* 1 = local interrupt 2 */
  53. #define IHDL_LOCAL_STATUS_3 0x8 /* 1 = local interrupt 3 */
  54. #define IHDL_LOCAL_STATUS_4 0x10 /* 1 = local interrupt 4 */
  55. #define IHDL_LOCAL_STATUS_5 0x20 /* 1 = local interrupt 5 */
  56. #define IHDL_LOCAL_STATUS_6 0x40 /* 1 = local interrupt 6 */
  57. #define IHDL_LOCAL_STATUS_NMI 0x80 /* 1 = NMI */
  58. /* equates for bus mask */
  59. /* low bit always reads as zero */
  60. #define IHDL_BUS_MASK_1 0x2 /* 1 = bus interrupt 1 enabled */
  61. #define IHDL_BUS_MASK_2 0x4 /* 1 = bus interrupt 2 enabled */
  62. #define IHDL_BUS_MASK_3 0x8 /* 1 = bus interrupt 3 enabled */
  63. #define IHDL_BUS_MASK_4 0x10 /* 1 = bus interrupt 4 enabled */
  64. #define IHDL_BUS_MASK_5 0x20 /* 1 = bus interrupt 5 enabled */
  65. #define IHDL_BUS_MASK_6 0x40 /* 1 = bus interrupt 6 enabled */
  66. #define IHDL_BUS_MASK_7 0x80 /* 1 = bus interrupt 7 enabled */
  67. /* equates for bus status */
  68. /* low bit always reads as zero */
  69. #define IHDL_BUS_STATUS_1 0x2 /* 1 = bus interrupt 1 */
  70. #define IHDL_BUS_STATUS_2 0x4 /* 1 = bus interrupt 2 */
  71. #define IHDL_BUS_STATUS_3 0x8 /* 1 = bus interrupt 3 */
  72. #define IHDL_BUS_STATUS_4 0x10 /* 1 = bus interrupt 4 */
  73. #define IHDL_BUS_STATUS_5 0x20 /* 1 = bus interrupt 5 */
  74. #define IHDL_BUS_STATUS_6 0x40 /* 1 = bus interrupt 6 */
  75. #define IHDL_BUS_STATUS_7 0x80 /* 1 = bus interrupt 7 */
  76. /* equates for last acknowledge */
  77. #define IHDL_LAST_ACK_BUS_1 0x1
  78. #define IHDL_LAST_ACK_BUS_2 0x2
  79. #define IHDL_LAST_ACK_BUS_3 0x3
  80. #define IHDL_LAST_ACK_BUS_4 0x4
  81. #define IHDL_LAST_ACK_BUS_5 0x5
  82. #define IHDL_LAST_ACK_BUS_6 0x6
  83. #define IHDL_LAST_ACK_BUS_7 0x7
  84. #define IHDL_LAST_ACK_LOCAL_1 0x9
  85. #define IHDL_LAST_ACK_LOCAL_2 0xa
  86. #define IHDL_LAST_ACK_LOCAL_3 0xb
  87. #define IHDL_LAST_ACK_LOCAL_4 0xc
  88. #define IHDL_LAST_ACK_LOCAL_5 0xd
  89. #define IHDL_LAST_ACK_LOCAL_6 0xe
  90. #define IHDL_LAST_ACK_NMI 0xf
  91. #ifdef __cplusplus
  92. }
  93. #endif
  94. #endif /* __INCs68155h */