isar.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. /* $Id: isar.h,v 1.11.2.2 2004/01/12 22:52:27 keil Exp $
  2. *
  3. * ISAR (Siemens PSB 7110) specific defines
  4. *
  5. * Author Karsten Keil
  6. * Copyright by Karsten Keil <keil@isdn4linux.de>
  7. *
  8. * This software may be used and distributed according to the terms
  9. * of the GNU General Public License, incorporated herein by reference.
  10. *
  11. */
  12. #define ISAR_IRQMSK 0x04
  13. #define ISAR_IRQSTA 0x04
  14. #define ISAR_IRQBIT 0x75
  15. #define ISAR_CTRL_H 0x61
  16. #define ISAR_CTRL_L 0x60
  17. #define ISAR_IIS 0x58
  18. #define ISAR_IIA 0x58
  19. #define ISAR_HIS 0x50
  20. #define ISAR_HIA 0x50
  21. #define ISAR_MBOX 0x4c
  22. #define ISAR_WADR 0x4a
  23. #define ISAR_RADR 0x48
  24. #define ISAR_HIS_VNR 0x14
  25. #define ISAR_HIS_DKEY 0x02
  26. #define ISAR_HIS_FIRM 0x1e
  27. #define ISAR_HIS_STDSP 0x08
  28. #define ISAR_HIS_DIAG 0x05
  29. #define ISAR_HIS_WAITSTATE 0x27
  30. #define ISAR_HIS_TIMERIRQ 0x25
  31. #define ISAR_HIS_P0CFG 0x3c
  32. #define ISAR_HIS_P12CFG 0x24
  33. #define ISAR_HIS_SARTCFG 0x25
  34. #define ISAR_HIS_PUMPCFG 0x26
  35. #define ISAR_HIS_PUMPCTRL 0x2a
  36. #define ISAR_HIS_IOM2CFG 0x27
  37. #define ISAR_HIS_IOM2REQ 0x07
  38. #define ISAR_HIS_IOM2CTRL 0x2b
  39. #define ISAR_HIS_BSTREQ 0x0c
  40. #define ISAR_HIS_PSTREQ 0x0e
  41. #define ISAR_HIS_SDATA 0x20
  42. #define ISAR_HIS_DPS1 0x40
  43. #define ISAR_HIS_DPS2 0x80
  44. #define SET_DPS(x) ((x << 6) & 0xc0)
  45. #define ISAR_CMD_TIMERIRQ_OFF 0x20
  46. #define ISAR_CMD_TIMERIRQ_ON 0x21
  47. #define ISAR_IIS_MSCMSD 0x3f
  48. #define ISAR_IIS_VNR 0x15
  49. #define ISAR_IIS_DKEY 0x03
  50. #define ISAR_IIS_FIRM 0x1f
  51. #define ISAR_IIS_STDSP 0x09
  52. #define ISAR_IIS_DIAG 0x25
  53. #define ISAR_IIS_GSTEV 0x00
  54. #define ISAR_IIS_BSTEV 0x28
  55. #define ISAR_IIS_BSTRSP 0x2c
  56. #define ISAR_IIS_PSTRSP 0x2e
  57. #define ISAR_IIS_PSTEV 0x2a
  58. #define ISAR_IIS_IOM2RSP 0x27
  59. #define ISAR_IIS_RDATA 0x20
  60. #define ISAR_IIS_INVMSG 0x3f
  61. #define ISAR_CTRL_SWVER 0x10
  62. #define ISAR_CTRL_STST 0x40
  63. #define ISAR_MSG_HWVER {0x20, 0, 1}
  64. #define ISAR_DP1_USE 1
  65. #define ISAR_DP2_USE 2
  66. #define ISAR_RATE_REQ 3
  67. #define PMOD_DISABLE 0
  68. #define PMOD_FAX 1
  69. #define PMOD_DATAMODEM 2
  70. #define PMOD_HALFDUPLEX 3
  71. #define PMOD_V110 4
  72. #define PMOD_DTMF 5
  73. #define PMOD_DTMF_TRANS 6
  74. #define PMOD_BYPASS 7
  75. #define PCTRL_ORIG 0x80
  76. #define PV32P2_V23R 0x40
  77. #define PV32P2_V22A 0x20
  78. #define PV32P2_V22B 0x10
  79. #define PV32P2_V22C 0x08
  80. #define PV32P2_V21 0x02
  81. #define PV32P2_BEL 0x01
  82. // LSB MSB in ISAR doc wrong !!! Arghhh
  83. #define PV32P3_AMOD 0x80
  84. #define PV32P3_V32B 0x02
  85. #define PV32P3_V23B 0x01
  86. #define PV32P4_48 0x11
  87. #define PV32P5_48 0x05
  88. #define PV32P4_UT48 0x11
  89. #define PV32P5_UT48 0x0d
  90. #define PV32P4_96 0x11
  91. #define PV32P5_96 0x03
  92. #define PV32P4_UT96 0x11
  93. #define PV32P5_UT96 0x0f
  94. #define PV32P4_B96 0x91
  95. #define PV32P5_B96 0x0b
  96. #define PV32P4_UTB96 0xd1
  97. #define PV32P5_UTB96 0x0f
  98. #define PV32P4_120 0xb1
  99. #define PV32P5_120 0x09
  100. #define PV32P4_UT120 0xf1
  101. #define PV32P5_UT120 0x0f
  102. #define PV32P4_144 0x99
  103. #define PV32P5_144 0x09
  104. #define PV32P4_UT144 0xf9
  105. #define PV32P5_UT144 0x0f
  106. #define PV32P6_CTN 0x01
  107. #define PV32P6_ATN 0x02
  108. #define PFAXP2_CTN 0x01
  109. #define PFAXP2_ATN 0x04
  110. #define PSEV_10MS_TIMER 0x02
  111. #define PSEV_CON_ON 0x18
  112. #define PSEV_CON_OFF 0x19
  113. #define PSEV_V24_OFF 0x20
  114. #define PSEV_CTS_ON 0x21
  115. #define PSEV_CTS_OFF 0x22
  116. #define PSEV_DCD_ON 0x23
  117. #define PSEV_DCD_OFF 0x24
  118. #define PSEV_DSR_ON 0x25
  119. #define PSEV_DSR_OFF 0x26
  120. #define PSEV_REM_RET 0xcc
  121. #define PSEV_REM_REN 0xcd
  122. #define PSEV_GSTN_CLR 0xd4
  123. #define PSEV_RSP_READY 0xbc
  124. #define PSEV_LINE_TX_H 0xb3
  125. #define PSEV_LINE_TX_B 0xb2
  126. #define PSEV_LINE_RX_H 0xb1
  127. #define PSEV_LINE_RX_B 0xb0
  128. #define PSEV_RSP_CONN 0xb5
  129. #define PSEV_RSP_DISC 0xb7
  130. #define PSEV_RSP_FCERR 0xb9
  131. #define PSEV_RSP_SILDET 0xbe
  132. #define PSEV_RSP_SILOFF 0xab
  133. #define PSEV_FLAGS_DET 0xba
  134. #define PCTRL_CMD_FTH 0xa7
  135. #define PCTRL_CMD_FRH 0xa5
  136. #define PCTRL_CMD_FTM 0xa8
  137. #define PCTRL_CMD_FRM 0xa6
  138. #define PCTRL_CMD_SILON 0xac
  139. #define PCTRL_CMD_CONT 0xa2
  140. #define PCTRL_CMD_ESC 0xa4
  141. #define PCTRL_CMD_SILOFF 0xab
  142. #define PCTRL_CMD_HALT 0xa9
  143. #define PCTRL_LOC_RET 0xcf
  144. #define PCTRL_LOC_REN 0xce
  145. #define SMODE_DISABLE 0
  146. #define SMODE_V14 2
  147. #define SMODE_HDLC 3
  148. #define SMODE_BINARY 4
  149. #define SMODE_FSK_V14 5
  150. #define SCTRL_HDMC_BOTH 0x00
  151. #define SCTRL_HDMC_DTX 0x80
  152. #define SCTRL_HDMC_DRX 0x40
  153. #define S_P1_OVSP 0x40
  154. #define S_P1_SNP 0x20
  155. #define S_P1_EOP 0x10
  156. #define S_P1_EDP 0x08
  157. #define S_P1_NSB 0x04
  158. #define S_P1_CHS_8 0x03
  159. #define S_P1_CHS_7 0x02
  160. #define S_P1_CHS_6 0x01
  161. #define S_P1_CHS_5 0x00
  162. #define S_P2_BFT_DEF 0x10
  163. #define IOM_CTRL_ENA 0x80
  164. #define IOM_CTRL_NOPCM 0x00
  165. #define IOM_CTRL_ALAW 0x02
  166. #define IOM_CTRL_ULAW 0x04
  167. #define IOM_CTRL_RCV 0x01
  168. #define IOM_P1_TXD 0x10
  169. #define HDLC_FED 0x40
  170. #define HDLC_FSD 0x20
  171. #define HDLC_FST 0x20
  172. #define HDLC_ERROR 0x1c
  173. #define HDLC_ERR_FAD 0x10
  174. #define HDLC_ERR_RER 0x08
  175. #define HDLC_ERR_CER 0x04
  176. #define SART_NMD 0x01
  177. #define BSTAT_RDM0 0x1
  178. #define BSTAT_RDM1 0x2
  179. #define BSTAT_RDM2 0x4
  180. #define BSTAT_RDM3 0x8
  181. #define BSTEV_TBO 0x1f
  182. #define BSTEV_RBO 0x2f
  183. /* FAX State Machine */
  184. #define STFAX_NULL 0
  185. #define STFAX_READY 1
  186. #define STFAX_LINE 2
  187. #define STFAX_CONT 3
  188. #define STFAX_ACTIV 4
  189. #define STFAX_ESCAPE 5
  190. #define STFAX_SILDET 6
  191. #define ISDN_FAXPUMP_HALT 100
  192. extern int ISARVersion(struct IsdnCardState *cs, char *s);
  193. extern void isar_int_main(struct IsdnCardState *cs);
  194. extern void initisar(struct IsdnCardState *cs);
  195. extern void isar_fill_fifo(struct BCState *bcs);
  196. extern int isar_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic);