cslr_ecap.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. /********************************************************************
  2. * Copyright (C) 2013-2014 Texas Instruments Incorporated.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. *
  8. * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. *
  11. * Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the
  14. * distribution.
  15. *
  16. * Neither the name of Texas Instruments Incorporated nor the names of
  17. * its contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. *
  32. */
  33. #ifndef CSLR_ECAP_H_
  34. #define CSLR_ECAP_H_
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. #include <ti/csl/cslr.h>
  40. #include <ti/csl/tistdtypes.h>
  41. /**************************************************************************
  42. * Register Overlay Structure for ALL
  43. **************************************************************************/
  44. typedef struct {
  45. volatile Uint32 TSCTR;
  46. volatile Uint32 CTRPHS;
  47. volatile Uint32 CAP1;
  48. volatile Uint32 CAP2;
  49. volatile Uint32 CAP3;
  50. volatile Uint32 CAP4;
  51. volatile Uint8 RSVD0[16];
  52. volatile Uint16 ECCTL1;
  53. volatile Uint16 ECCTL2;
  54. volatile Uint16 ECEINT;
  55. volatile Uint16 ECFLG;
  56. volatile Uint16 ECCLR;
  57. volatile Uint16 ECFRC;
  58. volatile Uint8 RSVD1[41];
  59. volatile Uint32 REVID;
  60. volatile Uint8 RSVD2[304];
  61. } CSL_EcapRegs;
  62. /**************************************************************************
  63. * Register Macros
  64. **************************************************************************/
  65. #define CSL_ECAP_REVID (0x5CU)
  66. #define CSL_ECAP_ECEINT (0x2CU)
  67. #define CSL_ECAP_ECCTL1 (0x28U)
  68. #define CSL_ECAP_ECCLR (0x30U)
  69. #define CSL_ECAP_CTRPHS (0x4U)
  70. #define CSL_ECAP_ECFRC (0x32U)
  71. #define CSL_ECAP_CAP2 (0xCU)
  72. #define CSL_ECAP_CAP3 (0x10U)
  73. #define CSL_ECAP_TSCTR (0x0U)
  74. #define CSL_ECAP_ECFLG (0x2EU)
  75. #define CSL_ECAP_CAP1 (0x8U)
  76. #define CSL_ECAP_ECCTL2 (0x2AU)
  77. #define CSL_ECAP_CAP4 (0x14U)
  78. /**************************************************************************
  79. * Field Definition Macros
  80. **************************************************************************/
  81. /* REVID */
  82. #define CSL_ECAP_REVID_REV_MASK (0xFFFFFFFFU)
  83. #define CSL_ECAP_REVID_REV_SHIFT (0U)
  84. #define CSL_ECAP_REVID_REV_RESETVAL (0x44d22100U)
  85. #define CSL_ECAP_REVID_REV_MAX (0xffffffffU)
  86. #define CSL_ECAP_REVID_RESETVAL (0x44d22100U)
  87. /* ECEINT */
  88. #define CSL_ECAP_ECEINT_CEVT1_MASK (0x00000002U)
  89. #define CSL_ECAP_ECEINT_CEVT1_SHIFT (1U)
  90. #define CSL_ECAP_ECEINT_CEVT1_RESETVAL (0x00000000U)
  91. #define CSL_ECAP_ECEINT_CEVT1_DISABLE (0x00000000U)
  92. #define CSL_ECAP_ECEINT_CEVT1_ENABLE (0x00000001U)
  93. #define CSL_ECAP_ECEINT_CEVT2_MASK (0x00000004U)
  94. #define CSL_ECAP_ECEINT_CEVT2_SHIFT (2U)
  95. #define CSL_ECAP_ECEINT_CEVT2_RESETVAL (0x00000000U)
  96. #define CSL_ECAP_ECEINT_CEVT2_DISABLE (0x00000000U)
  97. #define CSL_ECAP_ECEINT_CEVT2_EN_0X1 (0x00000001U)
  98. #define CSL_ECAP_ECEINT_CEVT3_MASK (0x00000008U)
  99. #define CSL_ECAP_ECEINT_CEVT3_SHIFT (3U)
  100. #define CSL_ECAP_ECEINT_CEVT3_RESETVAL (0x00000000U)
  101. #define CSL_ECAP_ECEINT_CEVT3_ENABLE (0x00000001U)
  102. #define CSL_ECAP_ECEINT_CEVT3_DISABLE (0x00000000U)
  103. #define CSL_ECAP_ECEINT_CEVT4_MASK (0x00000010U)
  104. #define CSL_ECAP_ECEINT_CEVT4_SHIFT (4U)
  105. #define CSL_ECAP_ECEINT_CEVT4_RESETVAL (0x00000000U)
  106. #define CSL_ECAP_ECEINT_CEVT4_ENABLE (0x00000001U)
  107. #define CSL_ECAP_ECEINT_CEVT4_DISABLE (0x00000000U)
  108. #define CSL_ECAP_ECEINT_CNTOVF_MASK (0x00000020U)
  109. #define CSL_ECAP_ECEINT_CNTOVF_SHIFT (5U)
  110. #define CSL_ECAP_ECEINT_CNTOVF_RESETVAL (0x00000000U)
  111. #define CSL_ECAP_ECEINT_CNTOVF_DISABLE (0x00000000U)
  112. #define CSL_ECAP_ECEINT_CNTOVF_ENABLE (0x00000001U)
  113. #define CSL_ECAP_ECEINT_PRDEQ_MASK (0x00000040U)
  114. #define CSL_ECAP_ECEINT_PRDEQ_SHIFT (6U)
  115. #define CSL_ECAP_ECEINT_PRDEQ_RESETVAL (0x00000000U)
  116. #define CSL_ECAP_ECEINT_PRDEQ_ENABLE (0x00000001U)
  117. #define CSL_ECAP_ECEINT_PRDEQ_DISABLE (0x00000000U)
  118. #define CSL_ECAP_ECEINT_CMPEQ_MASK (0x00000080U)
  119. #define CSL_ECAP_ECEINT_CMPEQ_SHIFT (7U)
  120. #define CSL_ECAP_ECEINT_CMPEQ_RESETVAL (0x00000000U)
  121. #define CSL_ECAP_ECEINT_CMPEQ_ENABLE (0x00000001U)
  122. #define CSL_ECAP_ECEINT_CMPEQ_DISABLE (0x00000000U)
  123. #define CSL_ECAP_ECEINT_RESETVAL (0x00000000U)
  124. /* ECCTL1 */
  125. #define CSL_ECAP_ECCTL1_CAP1POL_MASK (0x00000001U)
  126. #define CSL_ECAP_ECCTL1_CAP1POL_SHIFT (0U)
  127. #define CSL_ECAP_ECCTL1_CAP1POL_RESETVAL (0x00000000U)
  128. #define CSL_ECAP_ECCTL1_CAP1POL_RE (0x00000000U)
  129. #define CSL_ECAP_ECCTL1_CAP1POL_FE (0x00000001U)
  130. #define CSL_ECAP_ECCTL1_CTRRST1_MASK (0x00000002U)
  131. #define CSL_ECAP_ECCTL1_CTRRST1_SHIFT (1U)
  132. #define CSL_ECAP_ECCTL1_CTRRST1_RESETVAL (0x00000000U)
  133. #define CSL_ECAP_ECCTL1_CTRRST1_NO_RESET (0x00000000U)
  134. #define CSL_ECAP_ECCTL1_CTRRST1_RESET (0x00000001U)
  135. #define CSL_ECAP_ECCTL1_CAP2POL_MASK (0x00000004U)
  136. #define CSL_ECAP_ECCTL1_CAP2POL_SHIFT (2U)
  137. #define CSL_ECAP_ECCTL1_CAP2POL_RESETVAL (0x00000000U)
  138. #define CSL_ECAP_ECCTL1_CAP2POL_RE (0x00000000U)
  139. #define CSL_ECAP_ECCTL1_CAP2POL_FE (0x00000001U)
  140. #define CSL_ECAP_ECCTL1_CTRRST2_MASK (0x00000008U)
  141. #define CSL_ECAP_ECCTL1_CTRRST2_SHIFT (3U)
  142. #define CSL_ECAP_ECCTL1_CTRRST2_RESETVAL (0x00000000U)
  143. #define CSL_ECAP_ECCTL1_CTRRST2_NO_RESET (0x00000000U)
  144. #define CSL_ECAP_ECCTL1_CTRRST2_RESET (0x00000001U)
  145. #define CSL_ECAP_ECCTL1_CAP3POL_MASK (0x00000010U)
  146. #define CSL_ECAP_ECCTL1_CAP3POL_SHIFT (4U)
  147. #define CSL_ECAP_ECCTL1_CAP3POL_RESETVAL (0x00000000U)
  148. #define CSL_ECAP_ECCTL1_CAP3POL_FE (0x00000001U)
  149. #define CSL_ECAP_ECCTL1_CAP3POL_RE (0x00000000U)
  150. #define CSL_ECAP_ECCTL1_CTRRST3_MASK (0x00000020U)
  151. #define CSL_ECAP_ECCTL1_CTRRST3_SHIFT (5U)
  152. #define CSL_ECAP_ECCTL1_CTRRST3_RESETVAL (0x00000000U)
  153. #define CSL_ECAP_ECCTL1_CTRRST3_NO_RESET (0x00000000U)
  154. #define CSL_ECAP_ECCTL1_CTRRST3_RESET (0x00000001U)
  155. #define CSL_ECAP_ECCTL1_CAP4POL_MASK (0x00000040U)
  156. #define CSL_ECAP_ECCTL1_CAP4POL_SHIFT (6U)
  157. #define CSL_ECAP_ECCTL1_CAP4POL_RESETVAL (0x00000000U)
  158. #define CSL_ECAP_ECCTL1_CAP4POL_FE (0x00000001U)
  159. #define CSL_ECAP_ECCTL1_CAP4POL_RE (0x00000000U)
  160. #define CSL_ECAP_ECCTL1_CTRRST4_MASK (0x00000080U)
  161. #define CSL_ECAP_ECCTL1_CTRRST4_SHIFT (7U)
  162. #define CSL_ECAP_ECCTL1_CTRRST4_RESETVAL (0x00000000U)
  163. #define CSL_ECAP_ECCTL1_CTRRST4_NO_RESET (0x00000000U)
  164. #define CSL_ECAP_ECCTL1_CTRRST4_RESET (0x00000001U)
  165. #define CSL_ECAP_ECCTL1_CAPLDEN_MASK (0x00000100U)
  166. #define CSL_ECAP_ECCTL1_CAPLDEN_SHIFT (8U)
  167. #define CSL_ECAP_ECCTL1_CAPLDEN_RESETVAL (0x00000000U)
  168. #define CSL_ECAP_ECCTL1_CAPLDEN_DISABLE (0x00000000U)
  169. #define CSL_ECAP_ECCTL1_CAPLDEN_ENABLE (0x00000001U)
  170. #define CSL_ECAP_ECCTL1_PRESCALE_MASK (0x00003E00U)
  171. #define CSL_ECAP_ECCTL1_PRESCALE_SHIFT (9U)
  172. #define CSL_ECAP_ECCTL1_PRESCALE_RESETVAL (0x00000000U)
  173. #define CSL_ECAP_ECCTL1_PRESCALE_MAX (0x0000001fU)
  174. #define CSL_ECAP_ECCTL1_FREE_SOFT_MASK (0x0000C000U)
  175. #define CSL_ECAP_ECCTL1_FREE_SOFT_SHIFT (14U)
  176. #define CSL_ECAP_ECCTL1_FREE_SOFT_RESETVAL (0x00000000U)
  177. #define CSL_ECAP_ECCTL1_FREE_SOFT_RUN_FREE1 (0x00000002U)
  178. #define CSL_ECAP_ECCTL1_FREE_SOFT_RUN_0 (0x00000001U)
  179. #define CSL_ECAP_ECCTL1_FREE_SOFT_STOP (0x00000000U)
  180. #define CSL_ECAP_ECCTL1_FREE_SOFT_RUN_FREE2 (0x00000003U)
  181. #define CSL_ECAP_ECCTL1_RESETVAL (0x00000000U)
  182. /* ECCLR */
  183. #define CSL_ECAP_ECCLR_INT_MASK (0x00000001U)
  184. #define CSL_ECAP_ECCLR_INT_SHIFT (0U)
  185. #define CSL_ECAP_ECCLR_INT_RESETVAL (0x00000000U)
  186. #define CSL_ECAP_ECCLR_INT_NO_EFFECT (0x00000000U)
  187. #define CSL_ECAP_ECCLR_INT_CLEAR (0x00000001U)
  188. #define CSL_ECAP_ECCLR_CEVT1_MASK (0x00000002U)
  189. #define CSL_ECAP_ECCLR_CEVT1_SHIFT (1U)
  190. #define CSL_ECAP_ECCLR_CEVT1_RESETVAL (0x00000000U)
  191. #define CSL_ECAP_ECCLR_CEVT1_CLEAR (0x00000001U)
  192. #define CSL_ECAP_ECCLR_CEVT1_NO_EFFECT (0x00000000U)
  193. #define CSL_ECAP_ECCLR_CEVT2_MASK (0x00000004U)
  194. #define CSL_ECAP_ECCLR_CEVT2_SHIFT (2U)
  195. #define CSL_ECAP_ECCLR_CEVT2_RESETVAL (0x00000000U)
  196. #define CSL_ECAP_ECCLR_CEVT2_NO_EFFECT (0x00000000U)
  197. #define CSL_ECAP_ECCLR_CEVT2_CLEAR (0x00000001U)
  198. #define CSL_ECAP_ECCLR_CEVT3_MASK (0x00000008U)
  199. #define CSL_ECAP_ECCLR_CEVT3_SHIFT (3U)
  200. #define CSL_ECAP_ECCLR_CEVT3_RESETVAL (0x00000000U)
  201. #define CSL_ECAP_ECCLR_CEVT3_NO_EFFECT (0x00000000U)
  202. #define CSL_ECAP_ECCLR_CEVT3_CLEAR (0x00000001U)
  203. #define CSL_ECAP_ECCLR_CEVT4_MASK (0x00000010U)
  204. #define CSL_ECAP_ECCLR_CEVT4_SHIFT (4U)
  205. #define CSL_ECAP_ECCLR_CEVT4_RESETVAL (0x00000000U)
  206. #define CSL_ECAP_ECCLR_CEVT4_NO_EFFECT (0x00000000U)
  207. #define CSL_ECAP_ECCLR_CEVT4_CLEAR (0x00000001U)
  208. #define CSL_ECAP_ECCLR_CNTOVF_MASK (0x00000020U)
  209. #define CSL_ECAP_ECCLR_CNTOVF_SHIFT (5U)
  210. #define CSL_ECAP_ECCLR_CNTOVF_RESETVAL (0x00000000U)
  211. #define CSL_ECAP_ECCLR_CNTOVF_CLEAR (0x00000001U)
  212. #define CSL_ECAP_ECCLR_CNTOVF_NO_EFFECT (0x00000000U)
  213. #define CSL_ECAP_ECCLR_PRDEQ_MASK (0x00000040U)
  214. #define CSL_ECAP_ECCLR_PRDEQ_SHIFT (6U)
  215. #define CSL_ECAP_ECCLR_PRDEQ_RESETVAL (0x00000000U)
  216. #define CSL_ECAP_ECCLR_PRDEQ_CLEAR (0x00000001U)
  217. #define CSL_ECAP_ECCLR_PRDEQ_NO_EFFECT (0x00000000U)
  218. #define CSL_ECAP_ECCLR_CMPEQ_MASK (0x00000080U)
  219. #define CSL_ECAP_ECCLR_CMPEQ_SHIFT (7U)
  220. #define CSL_ECAP_ECCLR_CMPEQ_RESETVAL (0x00000000U)
  221. #define CSL_ECAP_ECCLR_CMPEQ_CLEAR (0x00000001U)
  222. #define CSL_ECAP_ECCLR_CMPEQ_NO_EFFECT (0x00000000U)
  223. #define CSL_ECAP_ECCLR_RESETVAL (0x00000000U)
  224. /* CTRPHS */
  225. #define CSL_ECAP_CTRPHS_CTRPHS_MASK (0xFFFFFFFFU)
  226. #define CSL_ECAP_CTRPHS_CTRPHS_SHIFT (0U)
  227. #define CSL_ECAP_CTRPHS_CTRPHS_RESETVAL (0x00000000U)
  228. #define CSL_ECAP_CTRPHS_CTRPHS_MAX (0xffffffffU)
  229. #define CSL_ECAP_CTRPHS_RESETVAL (0x00000000U)
  230. /* ECFRC */
  231. #define CSL_ECAP_ECFRC_CEVT1_MASK (0x00000002U)
  232. #define CSL_ECAP_ECFRC_CEVT1_SHIFT (1U)
  233. #define CSL_ECAP_ECFRC_CEVT1_RESETVAL (0x00000000U)
  234. #define CSL_ECAP_ECFRC_CEVT1_SET (0x00000001U)
  235. #define CSL_ECAP_ECFRC_CEVT1_NO_EFFECT (0x00000000U)
  236. #define CSL_ECAP_ECFRC_CEVT2_MASK (0x00000004U)
  237. #define CSL_ECAP_ECFRC_CEVT2_SHIFT (2U)
  238. #define CSL_ECAP_ECFRC_CEVT2_RESETVAL (0x00000000U)
  239. #define CSL_ECAP_ECFRC_CEVT2_NO_EFFECT (0x00000000U)
  240. #define CSL_ECAP_ECFRC_CEVT2_SET (0x00000001U)
  241. #define CSL_ECAP_ECFRC_CEVT3_MASK (0x00000008U)
  242. #define CSL_ECAP_ECFRC_CEVT3_SHIFT (3U)
  243. #define CSL_ECAP_ECFRC_CEVT3_RESETVAL (0x00000000U)
  244. #define CSL_ECAP_ECFRC_CEVT3_NO_EFFECT (0x00000000U)
  245. #define CSL_ECAP_ECFRC_CEVT3_SET (0x00000001U)
  246. #define CSL_ECAP_ECFRC_CEVT4_MASK (0x00000010U)
  247. #define CSL_ECAP_ECFRC_CEVT4_SHIFT (4U)
  248. #define CSL_ECAP_ECFRC_CEVT4_RESETVAL (0x00000000U)
  249. #define CSL_ECAP_ECFRC_CEVT4_NO_EFFECT (0x00000000U)
  250. #define CSL_ECAP_ECFRC_CEVT4_SET (0x00000001U)
  251. #define CSL_ECAP_ECFRC_CNTOVF_MASK (0x00000020U)
  252. #define CSL_ECAP_ECFRC_CNTOVF_SHIFT (5U)
  253. #define CSL_ECAP_ECFRC_CNTOVF_RESETVAL (0x00000000U)
  254. #define CSL_ECAP_ECFRC_CNTOVF_NO_EFFECT (0x00000000U)
  255. #define CSL_ECAP_ECFRC_CNTOVF_SET (0x00000001U)
  256. #define CSL_ECAP_ECFRC_PRDEQ_MASK (0x00000040U)
  257. #define CSL_ECAP_ECFRC_PRDEQ_SHIFT (6U)
  258. #define CSL_ECAP_ECFRC_PRDEQ_RESETVAL (0x00000000U)
  259. #define CSL_ECAP_ECFRC_PRDEQ_NO_EFFECT (0x00000000U)
  260. #define CSL_ECAP_ECFRC_PRDEQ_SET (0x00000001U)
  261. #define CSL_ECAP_ECFRC_CMPEQ_MASK (0x00000080U)
  262. #define CSL_ECAP_ECFRC_CMPEQ_SHIFT (7U)
  263. #define CSL_ECAP_ECFRC_CMPEQ_RESETVAL (0x00000000U)
  264. #define CSL_ECAP_ECFRC_CMPEQ_NO_EFFECT (0x00000000U)
  265. #define CSL_ECAP_ECFRC_CMPEQ_SET (0x00000001U)
  266. #define CSL_ECAP_ECFRC_RESETVAL (0x00000000U)
  267. /* CAP2 */
  268. #define CSL_ECAP_CAP2_CAP2_MASK (0xFFFFFFFFU)
  269. #define CSL_ECAP_CAP2_CAP2_SHIFT (0U)
  270. #define CSL_ECAP_CAP2_CAP2_RESETVAL (0x00000000U)
  271. #define CSL_ECAP_CAP2_CAP2_MAX (0xffffffffU)
  272. #define CSL_ECAP_CAP2_RESETVAL (0x00000000U)
  273. /* CAP3 */
  274. #define CSL_ECAP_CAP3_CAP3_MASK (0xFFFFFFFFU)
  275. #define CSL_ECAP_CAP3_CAP3_SHIFT (0U)
  276. #define CSL_ECAP_CAP3_CAP3_RESETVAL (0x00000000U)
  277. #define CSL_ECAP_CAP3_CAP3_MAX (0xffffffffU)
  278. #define CSL_ECAP_CAP3_RESETVAL (0x00000000U)
  279. /* TSCTR */
  280. #define CSL_ECAP_TSCTR_TSCTR_MASK (0xFFFFFFFFU)
  281. #define CSL_ECAP_TSCTR_TSCTR_SHIFT (0U)
  282. #define CSL_ECAP_TSCTR_TSCTR_RESETVAL (0x00000000U)
  283. #define CSL_ECAP_TSCTR_TSCTR_MAX (0xffffffffU)
  284. #define CSL_ECAP_TSCTR_RESETVAL (0x00000000U)
  285. /* ECFLG */
  286. #define CSL_ECAP_ECFLG_INT_MASK (0x00000001U)
  287. #define CSL_ECAP_ECFLG_INT_SHIFT (0U)
  288. #define CSL_ECAP_ECFLG_INT_RESETVAL (0x00000000U)
  289. #define CSL_ECAP_ECFLG_INT_NO_INTERRUPT (0x00000000U)
  290. #define CSL_ECAP_ECFLG_INT_INTERRUPT (0x00000001U)
  291. #define CSL_ECAP_ECFLG_CEVT1_MASK (0x00000002U)
  292. #define CSL_ECAP_ECFLG_CEVT1_SHIFT (1U)
  293. #define CSL_ECAP_ECFLG_CEVT1_RESETVAL (0x00000000U)
  294. #define CSL_ECAP_ECFLG_CEVT1_EVENT (0x00000001U)
  295. #define CSL_ECAP_ECFLG_CEVT1_NO_EVENT (0x00000000U)
  296. #define CSL_ECAP_ECFLG_CEVT2_MASK (0x00000004U)
  297. #define CSL_ECAP_ECFLG_CEVT2_SHIFT (2U)
  298. #define CSL_ECAP_ECFLG_CEVT2_RESETVAL (0x00000000U)
  299. #define CSL_ECAP_ECFLG_CEVT2_NO_EVENT (0x00000000U)
  300. #define CSL_ECAP_ECFLG_CEVT2_EVENT (0x00000001U)
  301. #define CSL_ECAP_ECFLG_CEVT3_MASK (0x00000008U)
  302. #define CSL_ECAP_ECFLG_CEVT3_SHIFT (3U)
  303. #define CSL_ECAP_ECFLG_CEVT3_RESETVAL (0x00000000U)
  304. #define CSL_ECAP_ECFLG_CEVT3_NO_EVENT (0x00000000U)
  305. #define CSL_ECAP_ECFLG_CEVT3_EVENT (0x00000001U)
  306. #define CSL_ECAP_ECFLG_CEVT4_MASK (0x00000010U)
  307. #define CSL_ECAP_ECFLG_CEVT4_SHIFT (4U)
  308. #define CSL_ECAP_ECFLG_CEVT4_RESETVAL (0x00000000U)
  309. #define CSL_ECAP_ECFLG_CEVT4_EVENT (0x00000001U)
  310. #define CSL_ECAP_ECFLG_CEVT4_NO_EVENT (0x00000000U)
  311. #define CSL_ECAP_ECFLG_CNTOVF_MASK (0x00000020U)
  312. #define CSL_ECAP_ECFLG_CNTOVF_SHIFT (5U)
  313. #define CSL_ECAP_ECFLG_CNTOVF_RESETVAL (0x00000000U)
  314. #define CSL_ECAP_ECFLG_CNTOVF_NO_EVENT (0x00000000U)
  315. #define CSL_ECAP_ECFLG_CNTOVF_EVENT (0x00000001U)
  316. #define CSL_ECAP_ECFLG_PRDEQ_MASK (0x00000040U)
  317. #define CSL_ECAP_ECFLG_PRDEQ_SHIFT (6U)
  318. #define CSL_ECAP_ECFLG_PRDEQ_RESETVAL (0x00000000U)
  319. #define CSL_ECAP_ECFLG_PRDEQ_NO_EVENT (0x00000000U)
  320. #define CSL_ECAP_ECFLG_PRDEQ_EVENT (0x00000001U)
  321. #define CSL_ECAP_ECFLG_CMPEQ_MASK (0x00000080U)
  322. #define CSL_ECAP_ECFLG_CMPEQ_SHIFT (7U)
  323. #define CSL_ECAP_ECFLG_CMPEQ_RESETVAL (0x00000000U)
  324. #define CSL_ECAP_ECFLG_CMPEQ_NO_EVENT (0x00000000U)
  325. #define CSL_ECAP_ECFLG_CMPEQ_EVENT (0x00000001U)
  326. #define CSL_ECAP_ECFLG_RESETVAL (0x00000000U)
  327. /* CAP1 */
  328. #define CSL_ECAP_CAP1_CAP1_MASK (0xFFFFFFFFU)
  329. #define CSL_ECAP_CAP1_CAP1_SHIFT (0U)
  330. #define CSL_ECAP_CAP1_CAP1_RESETVAL (0x00000000U)
  331. #define CSL_ECAP_CAP1_CAP1_MAX (0xffffffffU)
  332. #define CSL_ECAP_CAP1_RESETVAL (0x00000000U)
  333. /* ECCTL2 */
  334. #define CSL_ECAP_ECCTL2_CONT_ONESHT_MASK (0x00000001U)
  335. #define CSL_ECAP_ECCTL2_CONT_ONESHT_SHIFT (0U)
  336. #define CSL_ECAP_ECCTL2_CONT_ONESHT_RESETVAL (0x00000000U)
  337. #define CSL_ECAP_ECCTL2_CONT_ONESHT_CONTINUOUS (0x00000000U)
  338. #define CSL_ECAP_ECCTL2_CONT_ONESHT_ONESHOT (0x00000001U)
  339. #define CSL_ECAP_ECCTL2_STOP_WRAP_MASK (0x00000006U)
  340. #define CSL_ECAP_ECCTL2_STOP_WRAP_SHIFT (1U)
  341. #define CSL_ECAP_ECCTL2_STOP_WRAP_RESETVAL (0x00000000U)
  342. #define CSL_ECAP_ECCTL2_STOP_WRAP_CAPT_EVT1 (0x00000000U)
  343. #define CSL_ECAP_ECCTL2_STOP_WRAP_CAPT_EVT4 (0x00000003U)
  344. #define CSL_ECAP_ECCTL2_STOP_WRAP_CAPT_EVT2 (0x00000001U)
  345. #define CSL_ECAP_ECCTL2_STOP_WRAP_CAPT_EVT3 (0x00000002U)
  346. #define CSL_ECAP_ECCTL2_REARM_MASK (0x00000008U)
  347. #define CSL_ECAP_ECCTL2_REARM_SHIFT (3U)
  348. #define CSL_ECAP_ECCTL2_REARM_RESETVAL (0x00000000U)
  349. #define CSL_ECAP_ECCTL2_REARM_NO_EFFECT (0x00000000U)
  350. #define CSL_ECAP_ECCTL2_REARM_ARMS (0x00000001U)
  351. #define CSL_ECAP_ECCTL2_TSCTRSTOP_MASK (0x00000010U)
  352. #define CSL_ECAP_ECCTL2_TSCTRSTOP_SHIFT (4U)
  353. #define CSL_ECAP_ECCTL2_TSCTRSTOP_RESETVAL (0x00000000U)
  354. #define CSL_ECAP_ECCTL2_TSCTRSTOP_FREE_RUNNING (0x00000001U)
  355. #define CSL_ECAP_ECCTL2_TSCTRSTOP_STOPPED (0x00000000U)
  356. #define CSL_ECAP_ECCTL2_SYNCI_EN_MASK (0x00000020U)
  357. #define CSL_ECAP_ECCTL2_SYNCI_EN_SHIFT (5U)
  358. #define CSL_ECAP_ECCTL2_SYNCI_EN_RESETVAL (0x00000000U)
  359. #define CSL_ECAP_ECCTL2_SYNCI_EN_DISABLE (0x00000000U)
  360. #define CSL_ECAP_ECCTL2_SYNCI_EN_ENABLE (0x00000001U)
  361. #define CSL_ECAP_ECCTL2_SYNCO_SEL_MASK (0x000000C0U)
  362. #define CSL_ECAP_ECCTL2_SYNCO_SEL_SHIFT (6U)
  363. #define CSL_ECAP_ECCTL2_SYNCO_SEL_RESETVAL (0x00000000U)
  364. #define CSL_ECAP_ECCTL2_SYNCO_SEL_DISABLE2 (0x00000003U)
  365. #define CSL_ECAP_ECCTL2_SYNCO_SEL_PRDEQ (0x00000001U)
  366. #define CSL_ECAP_ECCTL2_SYNCO_SEL_DISABLE1 (0x00000002U)
  367. #define CSL_ECAP_ECCTL2_SYNCO_SEL_SYNC_IN (0x00000000U)
  368. #define CSL_ECAP_ECCTL2_SWSYNC_MASK (0x00000100U)
  369. #define CSL_ECAP_ECCTL2_SWSYNC_SHIFT (8U)
  370. #define CSL_ECAP_ECCTL2_SWSYNC_RESETVAL (0x00000000U)
  371. #define CSL_ECAP_ECCTL2_SWSYNC_NO_EFFECT (0x00000000U)
  372. #define CSL_ECAP_ECCTL2_SWSYNC_SHADOW_LOAD (0x00000001U)
  373. #define CSL_ECAP_ECCTL2_CAP_APWM_MASK (0x00000200U)
  374. #define CSL_ECAP_ECCTL2_CAP_APWM_SHIFT (9U)
  375. #define CSL_ECAP_ECCTL2_CAP_APWM_RESETVAL (0x00000000U)
  376. #define CSL_ECAP_ECCTL2_CAP_APWM_CAPTURE_MODE (0x00000000U)
  377. #define CSL_ECAP_ECCTL2_CAP_APWM_APWM_MODE (0x00000001U)
  378. #define CSL_ECAP_ECCTL2_APWMPOL_MASK (0x00000400U)
  379. #define CSL_ECAP_ECCTL2_APWMPOL_SHIFT (10U)
  380. #define CSL_ECAP_ECCTL2_APWMPOL_RESETVAL (0x00000000U)
  381. #define CSL_ECAP_ECCTL2_APWMPOL_ACTIVE_LOW (0x00000001U)
  382. #define CSL_ECAP_ECCTL2_APWMPOL_ACTIVE_HIGH (0x00000000U)
  383. #define CSL_ECAP_ECCTL2_RESETVAL (0x00000000U)
  384. /* CAP4 */
  385. #define CSL_ECAP_CAP4_CAP4_MASK (0xFFFFFFFFU)
  386. #define CSL_ECAP_CAP4_CAP4_SHIFT (0U)
  387. #define CSL_ECAP_CAP4_CAP4_RESETVAL (0x00000000U)
  388. #define CSL_ECAP_CAP4_CAP4_MAX (0xffffffffU)
  389. #define CSL_ECAP_CAP4_RESETVAL (0x00000000U)
  390. #ifdef __cplusplus
  391. }
  392. #endif
  393. #endif