gpakenum.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /*
  2. * Copyright (c) 2005, Adaptive Digital Technologies, Inc.
  3. *
  4. * File Name: gpakenum.h
  5. *
  6. * Description:
  7. * This file contains common enumerations related to G.PAK application
  8. * software.
  9. *
  10. * Version: 1.0
  11. *
  12. * Revision History:
  13. * 06/15/05 - Initial release.
  14. *
  15. * This program has been released under the terms of the GPL version 2 by
  16. * permission of Adaptive Digital Technologies, Inc.
  17. *
  18. */
  19. /*
  20. * See http://www.asterisk.org for more information about
  21. * the Asterisk project. Please do not directly contact
  22. * any of the maintainers of this project for assistance;
  23. * the project provides a web site, mailing lists and IRC
  24. * channels for your use.
  25. *
  26. * This program is free software, distributed under the terms of
  27. * the GNU General Public License Version 2 as published by the
  28. * Free Software Foundation. See the LICENSE file included with
  29. * this program for more details.
  30. */
  31. #ifndef _GPAKENUM_H /* prevent multiple inclusion */
  32. #define _GPAKENUM_H
  33. /* G.PAK Serial Port Word Size */
  34. typedef enum
  35. {
  36. SerWordSize8 = 0, // 8-bit seial word
  37. SerWordSize16 = 1 // 16-bit serial word
  38. } GpakSerWordSize_t;
  39. /* G.PAK Serial Port FrameSync Polarity */
  40. typedef enum
  41. {
  42. FrameSyncActLow = 0, // active low frame sync signal
  43. FrameSyncActHigh = 1 // active high frame sync signal
  44. } GpakSerFrameSyncPol_t;
  45. /* G.PAK Serial Port Clock Polarity */
  46. typedef enum
  47. {
  48. SerClockActLow = 0, // active low serial clock
  49. SerClockActHigh = 1 // active high serial clock
  50. } GpakSerClockPol_t;
  51. /* G.PAK Serial Port Data Delay */
  52. typedef enum
  53. {
  54. DataDelay0 = 0, // no data delay
  55. DataDelay1 = 1, // 1-bit data delay
  56. DataDelay2 = 2 // 2-bit data delay
  57. } GpakSerDataDelay_t;
  58. /* G.PAK Serial Port Ids. */
  59. typedef enum
  60. {
  61. SerialPortNull = 0, // null serial port
  62. SerialPort1 = 1, // first PCM serial stream port (McBSP0)
  63. SerialPort2 = 2, // second PCM serial stream port (McBSP1)
  64. SerialPort3 = 3 // third PCM serial stream port (McBSP2)
  65. } GpakSerialPort_t;
  66. /* G.PAK serial port Slot Configuration selection codes. */
  67. typedef enum
  68. {
  69. SlotCfgNone = 0, // no time slots used
  70. SlotCfg2Groups = 2, // 2 groups of 16 time slots used, 32 Channels system
  71. SlotCfg8Groups = 8 // 8-partition mode for 128-channel system
  72. } GpakSlotCfg_t;
  73. /* G.PAK serial port Companding Mode codes. */
  74. typedef enum
  75. {
  76. cmpPCMU=0, // u-Law
  77. cmpPCMA=1, // A-Law
  78. cmpNone=2 // none
  79. } GpakCompandModes;
  80. /* G.PAK Active/Inactive selection codes. */
  81. typedef enum
  82. {
  83. Disabled=0, // Inactive
  84. Enabled=1 // Active
  85. } GpakActivation;
  86. /* G.PAK Channel Type codes. */
  87. typedef enum
  88. {
  89. inactive=0, // channel inactive
  90. tdmToTdm = 1, /* tdmToTdm */
  91. tdmToTdmDebug = 2 /* tdmToTdm */
  92. } GpakChanType;
  93. /* G.PAK Algorithm control commands */
  94. typedef enum
  95. {
  96. EnableEcanA = 0, // Enable A side echo canceller
  97. BypassEcanA = 1, // Bypass A side echo canceller
  98. ResetEcanA = 2, // Reset A side echo canceller
  99. EnableEcanB = 3, // Enable B side echo canceller
  100. BypassEcanB = 4, // Bypass B side echo canceller
  101. ResetEcanB = 5, // Reset B side echo canceller
  102. EnableMuLawSwCompanding = 6,// Enable Mu-law Software companding
  103. EnableALawSwCompanding = 7, // Enable Mu-law Software companding
  104. BypassSwCompanding = 8, // Bypass Software companding
  105. EnableDTMFMuteA = 9, // Mute A side Dtmf digit after tone detected
  106. DisableDTMFMuteA = 10, // Do not mute A side Dtmf digit once tone detected
  107. EnableDTMFMuteB = 11, // Mute B side Dtmf digit after tone detected
  108. DisableDTMFMuteB = 12, // Do not mute B side Dtmf digit once tone detected
  109. EnableFaxCngDetectA = 13, // Enable A side Fax CNG detector, channel must be configed already
  110. DisableFaxCngDetectA = 14, // Disable A side Fax CNG detector, channel must be configed already
  111. EnableFaxCngDetectB = 15, // Enable B side Fax CNG detector, channel must be configed already
  112. DisableFaxCngDetectB = 16 // Disable B side Fax CNG detector, channel must be configed already
  113. } GpakAlgCtrl_t;
  114. /* G.PAK Tone types. */
  115. typedef enum
  116. {
  117. Null_tone = 0, // no tone detection
  118. DTMF_tone = 1 // DTMF tone
  119. } GpakToneTypes;
  120. /* G.PAK direction. */
  121. typedef enum
  122. {
  123. TDMAToB = 0, // A to B
  124. TDMBToA = 1 // B to A
  125. } GpakTdmDirection;
  126. typedef enum
  127. {
  128. rate1ms=0,
  129. rate2ms=1,
  130. rate10ms=2
  131. } GpakRate_t;
  132. /* G.PAK Asynchronous Event Codes */
  133. typedef enum
  134. {
  135. EventToneDetect = 0, // Tone detection event
  136. EventDSPDebug = 7 // DSP debug data event
  137. } GpakAsyncEventCode_t;
  138. /* G.PAK MF Tone Code Indices */
  139. typedef enum
  140. {
  141. DtmfDigit1 = 0, // DTMF Digit 1
  142. DtmfDigit2 = 1, // DTMF Digit 2
  143. DtmfDigit3 = 2, // DTMF Digit 3
  144. DtmfDigitA = 3, // DTMF Digit A
  145. DtmfDigit4 = 4, // DTMF Digit 4
  146. DtmfDigit5 = 5, // DTMF Digit 5
  147. DtmfDigit6 = 6, // DTMF Digit 6
  148. DtmfDigitB = 7, // DTMF Digit B
  149. DtmfDigit7 = 8, // DTMF Digit 7
  150. DtmfDigit8 = 9, // DTMF Digit 8
  151. DtmfDigit9 = 10, // DTMF Digit 9
  152. DtmfDigitC = 11, // DTMF Digit C
  153. DtmfDigitSt = 12, // DTMF Digit *
  154. DtmfDigit0 = 13, // DTMF Digit 0
  155. DtmfDigitPnd = 14, // DTMF Digit #
  156. DtmfDigitD = 15, // DTMF Digit D
  157. FaxCngDigit = 90, // Fax Calling Tone (1100 Hz)
  158. EndofMFDigit = 100, // End of MF digit
  159. EndofCngDigit = 101 // End of Cng Digit
  160. } GpakToneCodes_t;
  161. /* GPIO control code*/
  162. typedef enum
  163. {
  164. GPIO_READ = 0,
  165. GPIO_WRITE = 1,
  166. GPIO_DIR = 2
  167. } GpakGPIOCotrol_t;
  168. #endif // end multiple inclusion