ccl.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for CCL
  5. *
  6. * Copyright (c) 2018 Microchip Technology Inc.
  7. *
  8. * \license_start
  9. *
  10. * \page License
  11. *
  12. * SPDX-License-Identifier: Apache-2.0
  13. *
  14. * Licensed under the Apache License, Version 2.0 (the "License");
  15. * you may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License at
  17. *
  18. * http://www.apache.org/licenses/LICENSE-2.0
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an "AS IS" BASIS,
  22. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. *
  26. * \license_stop
  27. *
  28. */
  29. /* file generated from device description version 2018-05-30T11:07:17Z */
  30. #ifndef _SAML11_CCL_COMPONENT_H_
  31. #define _SAML11_CCL_COMPONENT_H_
  32. #define _SAML11_CCL_COMPONENT_ /**< \deprecated Backward compatibility for ASF */
  33. /** \addtogroup SAML_SAML11 Configurable Custom Logic
  34. * @{
  35. */
  36. /* ========================================================================== */
  37. /** SOFTWARE API DEFINITION FOR CCL */
  38. /* ========================================================================== */
  39. #define CCL_U2225 /**< (CCL) Module ID */
  40. #define REV_CCL 0x200 /**< (CCL) Module revision */
  41. /* -------- CCL_CTRL : (CCL Offset: 0x00) (R/W 8) Control -------- */
  42. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  43. typedef union {
  44. struct {
  45. uint8_t SWRST:1; /**< bit: 0 Software Reset */
  46. uint8_t ENABLE:1; /**< bit: 1 Enable */
  47. uint8_t :4; /**< bit: 2..5 Reserved */
  48. uint8_t RUNSTDBY:1; /**< bit: 6 Run in Standby */
  49. uint8_t :1; /**< bit: 7 Reserved */
  50. } bit; /**< Structure used for bit access */
  51. uint8_t reg; /**< Type used for register access */
  52. } CCL_CTRL_Type;
  53. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  54. #define CCL_CTRL_OFFSET (0x00) /**< (CCL_CTRL) Control Offset */
  55. #define CCL_CTRL_RESETVALUE _U_(0x00) /**< (CCL_CTRL) Control Reset Value */
  56. #define CCL_CTRL_SWRST_Pos 0 /**< (CCL_CTRL) Software Reset Position */
  57. #define CCL_CTRL_SWRST_Msk (_U_(0x1) << CCL_CTRL_SWRST_Pos) /**< (CCL_CTRL) Software Reset Mask */
  58. #define CCL_CTRL_SWRST CCL_CTRL_SWRST_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use CCL_CTRL_SWRST_Msk instead */
  59. #define CCL_CTRL_ENABLE_Pos 1 /**< (CCL_CTRL) Enable Position */
  60. #define CCL_CTRL_ENABLE_Msk (_U_(0x1) << CCL_CTRL_ENABLE_Pos) /**< (CCL_CTRL) Enable Mask */
  61. #define CCL_CTRL_ENABLE CCL_CTRL_ENABLE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use CCL_CTRL_ENABLE_Msk instead */
  62. #define CCL_CTRL_RUNSTDBY_Pos 6 /**< (CCL_CTRL) Run in Standby Position */
  63. #define CCL_CTRL_RUNSTDBY_Msk (_U_(0x1) << CCL_CTRL_RUNSTDBY_Pos) /**< (CCL_CTRL) Run in Standby Mask */
  64. #define CCL_CTRL_RUNSTDBY CCL_CTRL_RUNSTDBY_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use CCL_CTRL_RUNSTDBY_Msk instead */
  65. #define CCL_CTRL_MASK _U_(0x43) /**< \deprecated (CCL_CTRL) Register MASK (Use CCL_CTRL_Msk instead) */
  66. #define CCL_CTRL_Msk _U_(0x43) /**< (CCL_CTRL) Register Mask */
  67. /* -------- CCL_SEQCTRL : (CCL Offset: 0x04) (R/W 8) SEQ Control x -------- */
  68. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  69. typedef union {
  70. struct {
  71. uint8_t SEQSEL:4; /**< bit: 0..3 Sequential Selection */
  72. uint8_t :4; /**< bit: 4..7 Reserved */
  73. } bit; /**< Structure used for bit access */
  74. uint8_t reg; /**< Type used for register access */
  75. } CCL_SEQCTRL_Type;
  76. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  77. #define CCL_SEQCTRL_OFFSET (0x04) /**< (CCL_SEQCTRL) SEQ Control x Offset */
  78. #define CCL_SEQCTRL_RESETVALUE _U_(0x00) /**< (CCL_SEQCTRL) SEQ Control x Reset Value */
  79. #define CCL_SEQCTRL_SEQSEL_Pos 0 /**< (CCL_SEQCTRL) Sequential Selection Position */
  80. #define CCL_SEQCTRL_SEQSEL_Msk (_U_(0xF) << CCL_SEQCTRL_SEQSEL_Pos) /**< (CCL_SEQCTRL) Sequential Selection Mask */
  81. #define CCL_SEQCTRL_SEQSEL(value) (CCL_SEQCTRL_SEQSEL_Msk & ((value) << CCL_SEQCTRL_SEQSEL_Pos))
  82. #define CCL_SEQCTRL_SEQSEL_DISABLE_Val _U_(0x0) /**< (CCL_SEQCTRL) Sequential logic is disabled */
  83. #define CCL_SEQCTRL_SEQSEL_DFF_Val _U_(0x1) /**< (CCL_SEQCTRL) D flip flop */
  84. #define CCL_SEQCTRL_SEQSEL_JK_Val _U_(0x2) /**< (CCL_SEQCTRL) JK flip flop */
  85. #define CCL_SEQCTRL_SEQSEL_LATCH_Val _U_(0x3) /**< (CCL_SEQCTRL) D latch */
  86. #define CCL_SEQCTRL_SEQSEL_RS_Val _U_(0x4) /**< (CCL_SEQCTRL) RS latch */
  87. #define CCL_SEQCTRL_SEQSEL_DISABLE (CCL_SEQCTRL_SEQSEL_DISABLE_Val << CCL_SEQCTRL_SEQSEL_Pos) /**< (CCL_SEQCTRL) Sequential logic is disabled Position */
  88. #define CCL_SEQCTRL_SEQSEL_DFF (CCL_SEQCTRL_SEQSEL_DFF_Val << CCL_SEQCTRL_SEQSEL_Pos) /**< (CCL_SEQCTRL) D flip flop Position */
  89. #define CCL_SEQCTRL_SEQSEL_JK (CCL_SEQCTRL_SEQSEL_JK_Val << CCL_SEQCTRL_SEQSEL_Pos) /**< (CCL_SEQCTRL) JK flip flop Position */
  90. #define CCL_SEQCTRL_SEQSEL_LATCH (CCL_SEQCTRL_SEQSEL_LATCH_Val << CCL_SEQCTRL_SEQSEL_Pos) /**< (CCL_SEQCTRL) D latch Position */
  91. #define CCL_SEQCTRL_SEQSEL_RS (CCL_SEQCTRL_SEQSEL_RS_Val << CCL_SEQCTRL_SEQSEL_Pos) /**< (CCL_SEQCTRL) RS latch Position */
  92. #define CCL_SEQCTRL_MASK _U_(0x0F) /**< \deprecated (CCL_SEQCTRL) Register MASK (Use CCL_SEQCTRL_Msk instead) */
  93. #define CCL_SEQCTRL_Msk _U_(0x0F) /**< (CCL_SEQCTRL) Register Mask */
  94. /* -------- CCL_LUTCTRL : (CCL Offset: 0x08) (R/W 32) LUT Control x -------- */
  95. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  96. typedef union {
  97. struct {
  98. uint32_t :1; /**< bit: 0 Reserved */
  99. uint32_t ENABLE:1; /**< bit: 1 LUT Enable */
  100. uint32_t :2; /**< bit: 2..3 Reserved */
  101. uint32_t FILTSEL:2; /**< bit: 4..5 Filter Selection */
  102. uint32_t :1; /**< bit: 6 Reserved */
  103. uint32_t EDGESEL:1; /**< bit: 7 Edge Selection */
  104. uint32_t INSEL0:4; /**< bit: 8..11 Input Selection 0 */
  105. uint32_t INSEL1:4; /**< bit: 12..15 Input Selection 1 */
  106. uint32_t INSEL2:4; /**< bit: 16..19 Input Selection 2 */
  107. uint32_t INVEI:1; /**< bit: 20 Inverted Event Input Enable */
  108. uint32_t LUTEI:1; /**< bit: 21 LUT Event Input Enable */
  109. uint32_t LUTEO:1; /**< bit: 22 LUT Event Output Enable */
  110. uint32_t :1; /**< bit: 23 Reserved */
  111. uint32_t TRUTH:8; /**< bit: 24..31 Truth Value */
  112. } bit; /**< Structure used for bit access */
  113. uint32_t reg; /**< Type used for register access */
  114. } CCL_LUTCTRL_Type;
  115. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  116. #define CCL_LUTCTRL_OFFSET (0x08) /**< (CCL_LUTCTRL) LUT Control x Offset */
  117. #define CCL_LUTCTRL_RESETVALUE _U_(0x00) /**< (CCL_LUTCTRL) LUT Control x Reset Value */
  118. #define CCL_LUTCTRL_ENABLE_Pos 1 /**< (CCL_LUTCTRL) LUT Enable Position */
  119. #define CCL_LUTCTRL_ENABLE_Msk (_U_(0x1) << CCL_LUTCTRL_ENABLE_Pos) /**< (CCL_LUTCTRL) LUT Enable Mask */
  120. #define CCL_LUTCTRL_ENABLE CCL_LUTCTRL_ENABLE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use CCL_LUTCTRL_ENABLE_Msk instead */
  121. #define CCL_LUTCTRL_FILTSEL_Pos 4 /**< (CCL_LUTCTRL) Filter Selection Position */
  122. #define CCL_LUTCTRL_FILTSEL_Msk (_U_(0x3) << CCL_LUTCTRL_FILTSEL_Pos) /**< (CCL_LUTCTRL) Filter Selection Mask */
  123. #define CCL_LUTCTRL_FILTSEL(value) (CCL_LUTCTRL_FILTSEL_Msk & ((value) << CCL_LUTCTRL_FILTSEL_Pos))
  124. #define CCL_LUTCTRL_FILTSEL_DISABLE_Val _U_(0x0) /**< (CCL_LUTCTRL) Filter disabled */
  125. #define CCL_LUTCTRL_FILTSEL_SYNCH_Val _U_(0x1) /**< (CCL_LUTCTRL) Synchronizer enabled */
  126. #define CCL_LUTCTRL_FILTSEL_FILTER_Val _U_(0x2) /**< (CCL_LUTCTRL) Filter enabled */
  127. #define CCL_LUTCTRL_FILTSEL_DISABLE (CCL_LUTCTRL_FILTSEL_DISABLE_Val << CCL_LUTCTRL_FILTSEL_Pos) /**< (CCL_LUTCTRL) Filter disabled Position */
  128. #define CCL_LUTCTRL_FILTSEL_SYNCH (CCL_LUTCTRL_FILTSEL_SYNCH_Val << CCL_LUTCTRL_FILTSEL_Pos) /**< (CCL_LUTCTRL) Synchronizer enabled Position */
  129. #define CCL_LUTCTRL_FILTSEL_FILTER (CCL_LUTCTRL_FILTSEL_FILTER_Val << CCL_LUTCTRL_FILTSEL_Pos) /**< (CCL_LUTCTRL) Filter enabled Position */
  130. #define CCL_LUTCTRL_EDGESEL_Pos 7 /**< (CCL_LUTCTRL) Edge Selection Position */
  131. #define CCL_LUTCTRL_EDGESEL_Msk (_U_(0x1) << CCL_LUTCTRL_EDGESEL_Pos) /**< (CCL_LUTCTRL) Edge Selection Mask */
  132. #define CCL_LUTCTRL_EDGESEL CCL_LUTCTRL_EDGESEL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use CCL_LUTCTRL_EDGESEL_Msk instead */
  133. #define CCL_LUTCTRL_INSEL0_Pos 8 /**< (CCL_LUTCTRL) Input Selection 0 Position */
  134. #define CCL_LUTCTRL_INSEL0_Msk (_U_(0xF) << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) Input Selection 0 Mask */
  135. #define CCL_LUTCTRL_INSEL0(value) (CCL_LUTCTRL_INSEL0_Msk & ((value) << CCL_LUTCTRL_INSEL0_Pos))
  136. #define CCL_LUTCTRL_INSEL0_MASK_Val _U_(0x0) /**< (CCL_LUTCTRL) Masked input */
  137. #define CCL_LUTCTRL_INSEL0_FEEDBACK_Val _U_(0x1) /**< (CCL_LUTCTRL) Feedback input source */
  138. #define CCL_LUTCTRL_INSEL0_LINK_Val _U_(0x2) /**< (CCL_LUTCTRL) Linked LUT input source */
  139. #define CCL_LUTCTRL_INSEL0_EVENT_Val _U_(0x3) /**< (CCL_LUTCTRL) Event input source */
  140. #define CCL_LUTCTRL_INSEL0_IO_Val _U_(0x4) /**< (CCL_LUTCTRL) I/O pin input source */
  141. #define CCL_LUTCTRL_INSEL0_AC_Val _U_(0x5) /**< (CCL_LUTCTRL) AC input source */
  142. #define CCL_LUTCTRL_INSEL0_TC_Val _U_(0x6) /**< (CCL_LUTCTRL) TC input source */
  143. #define CCL_LUTCTRL_INSEL0_ALTTC_Val _U_(0x7) /**< (CCL_LUTCTRL) Alternate TC input source */
  144. #define CCL_LUTCTRL_INSEL0_TCC_Val _U_(0x8) /**< (CCL_LUTCTRL) TCC input source */
  145. #define CCL_LUTCTRL_INSEL0_SERCOM_Val _U_(0x9) /**< (CCL_LUTCTRL) SERCOM input source */
  146. #define CCL_LUTCTRL_INSEL0_ALT2TC_Val _U_(0xA) /**< (CCL_LUTCTRL) Alternate 2 TC input source */
  147. #define CCL_LUTCTRL_INSEL0_ASYNCEVENT_Val _U_(0xB) /**< (CCL_LUTCTRL) Asynchronous event input source. The EVENT input will bypass edge detection logic. */
  148. #define CCL_LUTCTRL_INSEL0_MASK (CCL_LUTCTRL_INSEL0_MASK_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) Masked input Position */
  149. #define CCL_LUTCTRL_INSEL0_FEEDBACK (CCL_LUTCTRL_INSEL0_FEEDBACK_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) Feedback input source Position */
  150. #define CCL_LUTCTRL_INSEL0_LINK (CCL_LUTCTRL_INSEL0_LINK_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) Linked LUT input source Position */
  151. #define CCL_LUTCTRL_INSEL0_EVENT (CCL_LUTCTRL_INSEL0_EVENT_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) Event input source Position */
  152. #define CCL_LUTCTRL_INSEL0_IO (CCL_LUTCTRL_INSEL0_IO_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) I/O pin input source Position */
  153. #define CCL_LUTCTRL_INSEL0_AC (CCL_LUTCTRL_INSEL0_AC_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) AC input source Position */
  154. #define CCL_LUTCTRL_INSEL0_TC (CCL_LUTCTRL_INSEL0_TC_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) TC input source Position */
  155. #define CCL_LUTCTRL_INSEL0_ALTTC (CCL_LUTCTRL_INSEL0_ALTTC_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) Alternate TC input source Position */
  156. #define CCL_LUTCTRL_INSEL0_TCC (CCL_LUTCTRL_INSEL0_TCC_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) TCC input source Position */
  157. #define CCL_LUTCTRL_INSEL0_SERCOM (CCL_LUTCTRL_INSEL0_SERCOM_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) SERCOM input source Position */
  158. #define CCL_LUTCTRL_INSEL0_ALT2TC (CCL_LUTCTRL_INSEL0_ALT2TC_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) Alternate 2 TC input source Position */
  159. #define CCL_LUTCTRL_INSEL0_ASYNCEVENT (CCL_LUTCTRL_INSEL0_ASYNCEVENT_Val << CCL_LUTCTRL_INSEL0_Pos) /**< (CCL_LUTCTRL) Asynchronous event input source. The EVENT input will bypass edge detection logic. Position */
  160. #define CCL_LUTCTRL_INSEL1_Pos 12 /**< (CCL_LUTCTRL) Input Selection 1 Position */
  161. #define CCL_LUTCTRL_INSEL1_Msk (_U_(0xF) << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) Input Selection 1 Mask */
  162. #define CCL_LUTCTRL_INSEL1(value) (CCL_LUTCTRL_INSEL1_Msk & ((value) << CCL_LUTCTRL_INSEL1_Pos))
  163. #define CCL_LUTCTRL_INSEL1_MASK_Val _U_(0x0) /**< (CCL_LUTCTRL) Masked input */
  164. #define CCL_LUTCTRL_INSEL1_FEEDBACK_Val _U_(0x1) /**< (CCL_LUTCTRL) Feedback input source */
  165. #define CCL_LUTCTRL_INSEL1_LINK_Val _U_(0x2) /**< (CCL_LUTCTRL) Linked LUT input source */
  166. #define CCL_LUTCTRL_INSEL1_EVENT_Val _U_(0x3) /**< (CCL_LUTCTRL) Event input source */
  167. #define CCL_LUTCTRL_INSEL1_IO_Val _U_(0x4) /**< (CCL_LUTCTRL) I/O pin input source */
  168. #define CCL_LUTCTRL_INSEL1_AC_Val _U_(0x5) /**< (CCL_LUTCTRL) AC input source */
  169. #define CCL_LUTCTRL_INSEL1_TC_Val _U_(0x6) /**< (CCL_LUTCTRL) TC input source */
  170. #define CCL_LUTCTRL_INSEL1_ALTTC_Val _U_(0x7) /**< (CCL_LUTCTRL) Alternate TC input source */
  171. #define CCL_LUTCTRL_INSEL1_TCC_Val _U_(0x8) /**< (CCL_LUTCTRL) TCC input source */
  172. #define CCL_LUTCTRL_INSEL1_SERCOM_Val _U_(0x9) /**< (CCL_LUTCTRL) SERCOM input source */
  173. #define CCL_LUTCTRL_INSEL1_ALT2TC_Val _U_(0xA) /**< (CCL_LUTCTRL) Alternate 2 TC input source */
  174. #define CCL_LUTCTRL_INSEL1_ASYNCEVENT_Val _U_(0xB) /**< (CCL_LUTCTRL) Asynchronous event input source. The EVENT input will bypass edge detection logic. */
  175. #define CCL_LUTCTRL_INSEL1_MASK (CCL_LUTCTRL_INSEL1_MASK_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) Masked input Position */
  176. #define CCL_LUTCTRL_INSEL1_FEEDBACK (CCL_LUTCTRL_INSEL1_FEEDBACK_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) Feedback input source Position */
  177. #define CCL_LUTCTRL_INSEL1_LINK (CCL_LUTCTRL_INSEL1_LINK_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) Linked LUT input source Position */
  178. #define CCL_LUTCTRL_INSEL1_EVENT (CCL_LUTCTRL_INSEL1_EVENT_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) Event input source Position */
  179. #define CCL_LUTCTRL_INSEL1_IO (CCL_LUTCTRL_INSEL1_IO_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) I/O pin input source Position */
  180. #define CCL_LUTCTRL_INSEL1_AC (CCL_LUTCTRL_INSEL1_AC_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) AC input source Position */
  181. #define CCL_LUTCTRL_INSEL1_TC (CCL_LUTCTRL_INSEL1_TC_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) TC input source Position */
  182. #define CCL_LUTCTRL_INSEL1_ALTTC (CCL_LUTCTRL_INSEL1_ALTTC_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) Alternate TC input source Position */
  183. #define CCL_LUTCTRL_INSEL1_TCC (CCL_LUTCTRL_INSEL1_TCC_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) TCC input source Position */
  184. #define CCL_LUTCTRL_INSEL1_SERCOM (CCL_LUTCTRL_INSEL1_SERCOM_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) SERCOM input source Position */
  185. #define CCL_LUTCTRL_INSEL1_ALT2TC (CCL_LUTCTRL_INSEL1_ALT2TC_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) Alternate 2 TC input source Position */
  186. #define CCL_LUTCTRL_INSEL1_ASYNCEVENT (CCL_LUTCTRL_INSEL1_ASYNCEVENT_Val << CCL_LUTCTRL_INSEL1_Pos) /**< (CCL_LUTCTRL) Asynchronous event input source. The EVENT input will bypass edge detection logic. Position */
  187. #define CCL_LUTCTRL_INSEL2_Pos 16 /**< (CCL_LUTCTRL) Input Selection 2 Position */
  188. #define CCL_LUTCTRL_INSEL2_Msk (_U_(0xF) << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) Input Selection 2 Mask */
  189. #define CCL_LUTCTRL_INSEL2(value) (CCL_LUTCTRL_INSEL2_Msk & ((value) << CCL_LUTCTRL_INSEL2_Pos))
  190. #define CCL_LUTCTRL_INSEL2_MASK_Val _U_(0x0) /**< (CCL_LUTCTRL) Masked input */
  191. #define CCL_LUTCTRL_INSEL2_FEEDBACK_Val _U_(0x1) /**< (CCL_LUTCTRL) Feedback input source */
  192. #define CCL_LUTCTRL_INSEL2_LINK_Val _U_(0x2) /**< (CCL_LUTCTRL) Linked LUT input source */
  193. #define CCL_LUTCTRL_INSEL2_EVENT_Val _U_(0x3) /**< (CCL_LUTCTRL) Event input source */
  194. #define CCL_LUTCTRL_INSEL2_IO_Val _U_(0x4) /**< (CCL_LUTCTRL) I/O pin input source */
  195. #define CCL_LUTCTRL_INSEL2_AC_Val _U_(0x5) /**< (CCL_LUTCTRL) AC input source */
  196. #define CCL_LUTCTRL_INSEL2_TC_Val _U_(0x6) /**< (CCL_LUTCTRL) TC input source */
  197. #define CCL_LUTCTRL_INSEL2_ALTTC_Val _U_(0x7) /**< (CCL_LUTCTRL) Alternate TC input source */
  198. #define CCL_LUTCTRL_INSEL2_TCC_Val _U_(0x8) /**< (CCL_LUTCTRL) TCC input source */
  199. #define CCL_LUTCTRL_INSEL2_SERCOM_Val _U_(0x9) /**< (CCL_LUTCTRL) SERCOM input source */
  200. #define CCL_LUTCTRL_INSEL2_ALT2TC_Val _U_(0xA) /**< (CCL_LUTCTRL) Alternate 2 TC input source */
  201. #define CCL_LUTCTRL_INSEL2_ASYNCEVENT_Val _U_(0xB) /**< (CCL_LUTCTRL) Asynchronous event input source. The EVENT input will bypass edge detection logic. */
  202. #define CCL_LUTCTRL_INSEL2_MASK (CCL_LUTCTRL_INSEL2_MASK_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) Masked input Position */
  203. #define CCL_LUTCTRL_INSEL2_FEEDBACK (CCL_LUTCTRL_INSEL2_FEEDBACK_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) Feedback input source Position */
  204. #define CCL_LUTCTRL_INSEL2_LINK (CCL_LUTCTRL_INSEL2_LINK_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) Linked LUT input source Position */
  205. #define CCL_LUTCTRL_INSEL2_EVENT (CCL_LUTCTRL_INSEL2_EVENT_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) Event input source Position */
  206. #define CCL_LUTCTRL_INSEL2_IO (CCL_LUTCTRL_INSEL2_IO_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) I/O pin input source Position */
  207. #define CCL_LUTCTRL_INSEL2_AC (CCL_LUTCTRL_INSEL2_AC_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) AC input source Position */
  208. #define CCL_LUTCTRL_INSEL2_TC (CCL_LUTCTRL_INSEL2_TC_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) TC input source Position */
  209. #define CCL_LUTCTRL_INSEL2_ALTTC (CCL_LUTCTRL_INSEL2_ALTTC_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) Alternate TC input source Position */
  210. #define CCL_LUTCTRL_INSEL2_TCC (CCL_LUTCTRL_INSEL2_TCC_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) TCC input source Position */
  211. #define CCL_LUTCTRL_INSEL2_SERCOM (CCL_LUTCTRL_INSEL2_SERCOM_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) SERCOM input source Position */
  212. #define CCL_LUTCTRL_INSEL2_ALT2TC (CCL_LUTCTRL_INSEL2_ALT2TC_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) Alternate 2 TC input source Position */
  213. #define CCL_LUTCTRL_INSEL2_ASYNCEVENT (CCL_LUTCTRL_INSEL2_ASYNCEVENT_Val << CCL_LUTCTRL_INSEL2_Pos) /**< (CCL_LUTCTRL) Asynchronous event input source. The EVENT input will bypass edge detection logic. Position */
  214. #define CCL_LUTCTRL_INVEI_Pos 20 /**< (CCL_LUTCTRL) Inverted Event Input Enable Position */
  215. #define CCL_LUTCTRL_INVEI_Msk (_U_(0x1) << CCL_LUTCTRL_INVEI_Pos) /**< (CCL_LUTCTRL) Inverted Event Input Enable Mask */
  216. #define CCL_LUTCTRL_INVEI CCL_LUTCTRL_INVEI_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use CCL_LUTCTRL_INVEI_Msk instead */
  217. #define CCL_LUTCTRL_LUTEI_Pos 21 /**< (CCL_LUTCTRL) LUT Event Input Enable Position */
  218. #define CCL_LUTCTRL_LUTEI_Msk (_U_(0x1) << CCL_LUTCTRL_LUTEI_Pos) /**< (CCL_LUTCTRL) LUT Event Input Enable Mask */
  219. #define CCL_LUTCTRL_LUTEI CCL_LUTCTRL_LUTEI_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use CCL_LUTCTRL_LUTEI_Msk instead */
  220. #define CCL_LUTCTRL_LUTEO_Pos 22 /**< (CCL_LUTCTRL) LUT Event Output Enable Position */
  221. #define CCL_LUTCTRL_LUTEO_Msk (_U_(0x1) << CCL_LUTCTRL_LUTEO_Pos) /**< (CCL_LUTCTRL) LUT Event Output Enable Mask */
  222. #define CCL_LUTCTRL_LUTEO CCL_LUTCTRL_LUTEO_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use CCL_LUTCTRL_LUTEO_Msk instead */
  223. #define CCL_LUTCTRL_TRUTH_Pos 24 /**< (CCL_LUTCTRL) Truth Value Position */
  224. #define CCL_LUTCTRL_TRUTH_Msk (_U_(0xFF) << CCL_LUTCTRL_TRUTH_Pos) /**< (CCL_LUTCTRL) Truth Value Mask */
  225. #define CCL_LUTCTRL_TRUTH(value) (CCL_LUTCTRL_TRUTH_Msk & ((value) << CCL_LUTCTRL_TRUTH_Pos))
  226. #define CCL_LUTCTRL_MASK _U_(0xFF7FFFB2) /**< \deprecated (CCL_LUTCTRL) Register MASK (Use CCL_LUTCTRL_Msk instead) */
  227. #define CCL_LUTCTRL_Msk _U_(0xFF7FFFB2) /**< (CCL_LUTCTRL) Register Mask */
  228. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  229. /** \brief CCL hardware registers */
  230. typedef struct { /* Configurable Custom Logic */
  231. __IO CCL_CTRL_Type CTRL; /**< Offset: 0x00 (R/W 8) Control */
  232. __I uint8_t Reserved1[3];
  233. __IO CCL_SEQCTRL_Type SEQCTRL[1]; /**< Offset: 0x04 (R/W 8) SEQ Control x */
  234. __I uint8_t Reserved2[3];
  235. __IO CCL_LUTCTRL_Type LUTCTRL[2]; /**< Offset: 0x08 (R/W 32) LUT Control x */
  236. } Ccl;
  237. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  238. /** @} end of Configurable Custom Logic */
  239. #endif /* _SAML11_CCL_COMPONENT_H_ */