falc-lh.h
Upload User: jlfgdled
Upload Date: 2013-04-10
Package Size: 33168k
Code Size: 3k
Development Platform:

Unix_Linux

  1. /*
  2.  * Defines for comx-hw-slicecom.c - FALC-LH specific
  3.  *
  4.  * Author: Bartok Istvan <bartoki@itc.hu>
  5.  * Last modified: Mon Feb  7 20:00:38 CET 2000
  6.  *
  7.  * :set tabstop=6
  8.  */
  9. /*
  10.  * Control register offsets on the LBI (page 90)
  11.  * use it like:
  12.  * lbi[ MODE ] = 0x34;
  13.  */
  14. #define MODE 0x03
  15. #define IPC 0x08
  16. #define IMR0 0x14 /* Interrupt Mask Register 0 */
  17. #define IMR1 0x15
  18. #define IMR2 0x16
  19. #define IMR3 0x17
  20. #define IMR4 0x18
  21. #define IMR5 0x19
  22. #define FMR0 0x1a /* Framer Mode Register 0 */
  23. #define FMR1 0x1b
  24. #define FMR2 0x1c
  25. #define XSW 0x1e
  26. #define XSP 0x1f
  27. #define XC0 0x20
  28. #define XC1 0x21
  29. #define RC0 0x22
  30. #define RC1 0x23
  31. #define XPM0 0x24
  32. #define XPM1 0x25
  33. #define XPM2 0x26
  34. #define TSWM 0x27
  35. #define IDLE 0x29 /* Idle Code */
  36. #define LIM0 0x34
  37. #define LIM1 0x35
  38. #define PCD 0x36
  39. #define PCR 0x37
  40. #define LIM2 0x38
  41. /*
  42.  * Status registers on the LBI (page 134)
  43.  * these are read-only, use it like:
  44.  * if( lbi[ FRS0 ] ) ...
  45.  */
  46. #define FRS0 0x4c /* Framer Receive Status register 0 */
  47. #define FRS1 0x4d /* Framer Receive Status register 1 */
  48. #define FECL 0x50 /* Framing Error Counter low byte */ /* Counts FAS word receive errors */
  49. #define FECH 0x51 /*                       high byte */
  50. #define CVCL 0x52 /* Code Violation Counter low byte */ /* Counts bipolar and HDB3 code violations */
  51. #define CVCH 0x53 /*                        high byte */
  52. #define CEC1L 0x54 /* CRC4 Error Counter 1 low byte */ /* Counts CRC4 errors in the incoming stream */
  53. #define CEC1H 0x55 /*                      high byte */
  54. #define EBCL 0x56 /* E Bit error Counter low byte */ /* E-bits: the remote end sends them, when */
  55. #define EBCH 0x57 /*                     high byte */ /* it detected a CRC4-error */
  56. #define ISR0 0x68 /* Interrupt Status Register 0 */
  57. #define ISR1 0x69 /* Interrupt Status Register 1 */
  58. #define ISR2 0x6a /* Interrupt Status Register 2 */
  59. #define ISR3 0x6b /* Interrupt Status Register 3 */
  60. #define ISR5 0x6c /* Interrupt Status Register 5 */
  61. #define GIS 0x6e /* Global Interrupt Status Register */
  62. #define VSTR 0x6f /* version information */
  63. /*
  64.  * Bit fields
  65.  */
  66. #define FRS0_LOS (1 << 7)
  67. #define FRS0_AIS (1 << 6)
  68. #define FRS0_LFA (1 << 5)
  69. #define FRS0_RRA (1 << 4)
  70. #define FRS0_AUXP (1 << 3)
  71. #define FRS0_NMF (1 << 2)
  72. #define FRS0_LMFA (1 << 1)
  73. #define FRS1_XLS (1 << 1)
  74. #define FRS1_XLO (1)
  75. #define ISR2_FAR (1 << 7)
  76. #define ISR2_LFA (1 << 6)
  77. #define ISR2_MFAR (1 << 5)
  78. #define ISR2_T400MS (1 << 4)
  79. #define ISR2_AIS (1 << 3)
  80. #define ISR2_LOS (1 << 2)
  81. #define ISR2_RAR (1 << 1)
  82. #define ISR2_RA (1)
  83. #define ISR3_ES (1 << 7)
  84. #define ISR3_SEC (1 << 6)
  85. #define ISR3_LMFA16 (1 << 5)
  86. #define ISR3_AIS16 (1 << 4)
  87. #define ISR3_RA16 (1 << 3)
  88. #define ISR3_API (1 << 2)
  89. #define ISR3_RSN (1 << 1)
  90. #define ISR3_RSP (1)
  91. #define ISR5_XSP (1 << 7)
  92. #define ISR5_XSN (1 << 6)