eic.h 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for EIC
  5. *
  6. * Copyright (c) 2018 Microchip Technology Inc.
  7. *
  8. * \asf_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"); you may
  15. * not use this file except in compliance with the License.
  16. * You may obtain a copy of the Licence 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, WITHOUT
  22. * 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. * \asf_license_stop
  27. *
  28. */
  29. #ifndef _SAMD11_EIC_COMPONENT_
  30. #define _SAMD11_EIC_COMPONENT_
  31. /* ========================================================================== */
  32. /** SOFTWARE API DEFINITION FOR EIC */
  33. /* ========================================================================== */
  34. /** \addtogroup SAMD11_EIC External Interrupt Controller */
  35. /*@{*/
  36. #define EIC_U2217
  37. #define REV_EIC 0x101
  38. /* -------- EIC_CTRL : (EIC Offset: 0x00) (R/W 8) Control -------- */
  39. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  40. typedef union {
  41. struct {
  42. uint8_t SWRST:1; /*!< bit: 0 Software Reset */
  43. uint8_t ENABLE:1; /*!< bit: 1 Enable */
  44. uint8_t :6; /*!< bit: 2.. 7 Reserved */
  45. } bit; /*!< Structure used for bit access */
  46. uint8_t reg; /*!< Type used for register access */
  47. } EIC_CTRL_Type;
  48. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  49. #define EIC_CTRL_OFFSET 0x00 /**< \brief (EIC_CTRL offset) Control */
  50. #define EIC_CTRL_RESETVALUE _U_(0x00) /**< \brief (EIC_CTRL reset_value) Control */
  51. #define EIC_CTRL_SWRST_Pos 0 /**< \brief (EIC_CTRL) Software Reset */
  52. #define EIC_CTRL_SWRST (_U_(0x1) << EIC_CTRL_SWRST_Pos)
  53. #define EIC_CTRL_ENABLE_Pos 1 /**< \brief (EIC_CTRL) Enable */
  54. #define EIC_CTRL_ENABLE (_U_(0x1) << EIC_CTRL_ENABLE_Pos)
  55. #define EIC_CTRL_MASK _U_(0x03) /**< \brief (EIC_CTRL) MASK Register */
  56. /* -------- EIC_STATUS : (EIC Offset: 0x01) (R/ 8) Status -------- */
  57. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  58. typedef union {
  59. struct {
  60. uint8_t :7; /*!< bit: 0.. 6 Reserved */
  61. uint8_t SYNCBUSY:1; /*!< bit: 7 Synchronization Busy */
  62. } bit; /*!< Structure used for bit access */
  63. uint8_t reg; /*!< Type used for register access */
  64. } EIC_STATUS_Type;
  65. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  66. #define EIC_STATUS_OFFSET 0x01 /**< \brief (EIC_STATUS offset) Status */
  67. #define EIC_STATUS_RESETVALUE _U_(0x00) /**< \brief (EIC_STATUS reset_value) Status */
  68. #define EIC_STATUS_SYNCBUSY_Pos 7 /**< \brief (EIC_STATUS) Synchronization Busy */
  69. #define EIC_STATUS_SYNCBUSY (_U_(0x1) << EIC_STATUS_SYNCBUSY_Pos)
  70. #define EIC_STATUS_MASK _U_(0x80) /**< \brief (EIC_STATUS) MASK Register */
  71. /* -------- EIC_NMICTRL : (EIC Offset: 0x02) (R/W 8) Non-Maskable Interrupt Control -------- */
  72. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  73. typedef union {
  74. struct {
  75. uint8_t NMISENSE:3; /*!< bit: 0.. 2 Non-Maskable Interrupt Sense */
  76. uint8_t NMIFILTEN:1; /*!< bit: 3 Non-Maskable Interrupt Filter Enable */
  77. uint8_t :4; /*!< bit: 4.. 7 Reserved */
  78. } bit; /*!< Structure used for bit access */
  79. uint8_t reg; /*!< Type used for register access */
  80. } EIC_NMICTRL_Type;
  81. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  82. #define EIC_NMICTRL_OFFSET 0x02 /**< \brief (EIC_NMICTRL offset) Non-Maskable Interrupt Control */
  83. #define EIC_NMICTRL_RESETVALUE _U_(0x00) /**< \brief (EIC_NMICTRL reset_value) Non-Maskable Interrupt Control */
  84. #define EIC_NMICTRL_NMISENSE_Pos 0 /**< \brief (EIC_NMICTRL) Non-Maskable Interrupt Sense */
  85. #define EIC_NMICTRL_NMISENSE_Msk (_U_(0x7) << EIC_NMICTRL_NMISENSE_Pos)
  86. #define EIC_NMICTRL_NMISENSE(value) (EIC_NMICTRL_NMISENSE_Msk & ((value) << EIC_NMICTRL_NMISENSE_Pos))
  87. #define EIC_NMICTRL_NMISENSE_NONE_Val _U_(0x0) /**< \brief (EIC_NMICTRL) No detection */
  88. #define EIC_NMICTRL_NMISENSE_RISE_Val _U_(0x1) /**< \brief (EIC_NMICTRL) Rising-edge detection */
  89. #define EIC_NMICTRL_NMISENSE_FALL_Val _U_(0x2) /**< \brief (EIC_NMICTRL) Falling-edge detection */
  90. #define EIC_NMICTRL_NMISENSE_BOTH_Val _U_(0x3) /**< \brief (EIC_NMICTRL) Both-edges detection */
  91. #define EIC_NMICTRL_NMISENSE_HIGH_Val _U_(0x4) /**< \brief (EIC_NMICTRL) High-level detection */
  92. #define EIC_NMICTRL_NMISENSE_LOW_Val _U_(0x5) /**< \brief (EIC_NMICTRL) Low-level detection */
  93. #define EIC_NMICTRL_NMISENSE_NONE (EIC_NMICTRL_NMISENSE_NONE_Val << EIC_NMICTRL_NMISENSE_Pos)
  94. #define EIC_NMICTRL_NMISENSE_RISE (EIC_NMICTRL_NMISENSE_RISE_Val << EIC_NMICTRL_NMISENSE_Pos)
  95. #define EIC_NMICTRL_NMISENSE_FALL (EIC_NMICTRL_NMISENSE_FALL_Val << EIC_NMICTRL_NMISENSE_Pos)
  96. #define EIC_NMICTRL_NMISENSE_BOTH (EIC_NMICTRL_NMISENSE_BOTH_Val << EIC_NMICTRL_NMISENSE_Pos)
  97. #define EIC_NMICTRL_NMISENSE_HIGH (EIC_NMICTRL_NMISENSE_HIGH_Val << EIC_NMICTRL_NMISENSE_Pos)
  98. #define EIC_NMICTRL_NMISENSE_LOW (EIC_NMICTRL_NMISENSE_LOW_Val << EIC_NMICTRL_NMISENSE_Pos)
  99. #define EIC_NMICTRL_NMIFILTEN_Pos 3 /**< \brief (EIC_NMICTRL) Non-Maskable Interrupt Filter Enable */
  100. #define EIC_NMICTRL_NMIFILTEN (_U_(0x1) << EIC_NMICTRL_NMIFILTEN_Pos)
  101. #define EIC_NMICTRL_MASK _U_(0x0F) /**< \brief (EIC_NMICTRL) MASK Register */
  102. /* -------- EIC_NMIFLAG : (EIC Offset: 0x03) (R/W 8) Non-Maskable Interrupt Flag Status and Clear -------- */
  103. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  104. typedef union {
  105. struct {
  106. uint8_t NMI:1; /*!< bit: 0 Non-Maskable Interrupt */
  107. uint8_t :7; /*!< bit: 1.. 7 Reserved */
  108. } bit; /*!< Structure used for bit access */
  109. uint8_t reg; /*!< Type used for register access */
  110. } EIC_NMIFLAG_Type;
  111. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  112. #define EIC_NMIFLAG_OFFSET 0x03 /**< \brief (EIC_NMIFLAG offset) Non-Maskable Interrupt Flag Status and Clear */
  113. #define EIC_NMIFLAG_RESETVALUE _U_(0x00) /**< \brief (EIC_NMIFLAG reset_value) Non-Maskable Interrupt Flag Status and Clear */
  114. #define EIC_NMIFLAG_NMI_Pos 0 /**< \brief (EIC_NMIFLAG) Non-Maskable Interrupt */
  115. #define EIC_NMIFLAG_NMI (_U_(0x1) << EIC_NMIFLAG_NMI_Pos)
  116. #define EIC_NMIFLAG_MASK _U_(0x01) /**< \brief (EIC_NMIFLAG) MASK Register */
  117. /* -------- EIC_EVCTRL : (EIC Offset: 0x04) (R/W 32) Event Control -------- */
  118. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  119. typedef union {
  120. struct {
  121. uint32_t EXTINTEO0:1; /*!< bit: 0 External Interrupt 0 Event Output Enable */
  122. uint32_t EXTINTEO1:1; /*!< bit: 1 External Interrupt 1 Event Output Enable */
  123. uint32_t EXTINTEO2:1; /*!< bit: 2 External Interrupt 2 Event Output Enable */
  124. uint32_t EXTINTEO3:1; /*!< bit: 3 External Interrupt 3 Event Output Enable */
  125. uint32_t EXTINTEO4:1; /*!< bit: 4 External Interrupt 4 Event Output Enable */
  126. uint32_t EXTINTEO5:1; /*!< bit: 5 External Interrupt 5 Event Output Enable */
  127. uint32_t EXTINTEO6:1; /*!< bit: 6 External Interrupt 6 Event Output Enable */
  128. uint32_t EXTINTEO7:1; /*!< bit: 7 External Interrupt 7 Event Output Enable */
  129. uint32_t :24; /*!< bit: 8..31 Reserved */
  130. } bit; /*!< Structure used for bit access */
  131. struct {
  132. uint32_t EXTINTEO:8; /*!< bit: 0.. 7 External Interrupt x Event Output Enable */
  133. uint32_t :24; /*!< bit: 8..31 Reserved */
  134. } vec; /*!< Structure used for vec access */
  135. uint32_t reg; /*!< Type used for register access */
  136. } EIC_EVCTRL_Type;
  137. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  138. #define EIC_EVCTRL_OFFSET 0x04 /**< \brief (EIC_EVCTRL offset) Event Control */
  139. #define EIC_EVCTRL_RESETVALUE _U_(0x00000000) /**< \brief (EIC_EVCTRL reset_value) Event Control */
  140. #define EIC_EVCTRL_EXTINTEO0_Pos 0 /**< \brief (EIC_EVCTRL) External Interrupt 0 Event Output Enable */
  141. #define EIC_EVCTRL_EXTINTEO0 (_U_(1) << EIC_EVCTRL_EXTINTEO0_Pos)
  142. #define EIC_EVCTRL_EXTINTEO1_Pos 1 /**< \brief (EIC_EVCTRL) External Interrupt 1 Event Output Enable */
  143. #define EIC_EVCTRL_EXTINTEO1 (_U_(1) << EIC_EVCTRL_EXTINTEO1_Pos)
  144. #define EIC_EVCTRL_EXTINTEO2_Pos 2 /**< \brief (EIC_EVCTRL) External Interrupt 2 Event Output Enable */
  145. #define EIC_EVCTRL_EXTINTEO2 (_U_(1) << EIC_EVCTRL_EXTINTEO2_Pos)
  146. #define EIC_EVCTRL_EXTINTEO3_Pos 3 /**< \brief (EIC_EVCTRL) External Interrupt 3 Event Output Enable */
  147. #define EIC_EVCTRL_EXTINTEO3 (_U_(1) << EIC_EVCTRL_EXTINTEO3_Pos)
  148. #define EIC_EVCTRL_EXTINTEO4_Pos 4 /**< \brief (EIC_EVCTRL) External Interrupt 4 Event Output Enable */
  149. #define EIC_EVCTRL_EXTINTEO4 (_U_(1) << EIC_EVCTRL_EXTINTEO4_Pos)
  150. #define EIC_EVCTRL_EXTINTEO5_Pos 5 /**< \brief (EIC_EVCTRL) External Interrupt 5 Event Output Enable */
  151. #define EIC_EVCTRL_EXTINTEO5 (_U_(1) << EIC_EVCTRL_EXTINTEO5_Pos)
  152. #define EIC_EVCTRL_EXTINTEO6_Pos 6 /**< \brief (EIC_EVCTRL) External Interrupt 6 Event Output Enable */
  153. #define EIC_EVCTRL_EXTINTEO6 (_U_(1) << EIC_EVCTRL_EXTINTEO6_Pos)
  154. #define EIC_EVCTRL_EXTINTEO7_Pos 7 /**< \brief (EIC_EVCTRL) External Interrupt 7 Event Output Enable */
  155. #define EIC_EVCTRL_EXTINTEO7 (_U_(1) << EIC_EVCTRL_EXTINTEO7_Pos)
  156. #define EIC_EVCTRL_EXTINTEO_Pos 0 /**< \brief (EIC_EVCTRL) External Interrupt x Event Output Enable */
  157. #define EIC_EVCTRL_EXTINTEO_Msk (_U_(0xFF) << EIC_EVCTRL_EXTINTEO_Pos)
  158. #define EIC_EVCTRL_EXTINTEO(value) (EIC_EVCTRL_EXTINTEO_Msk & ((value) << EIC_EVCTRL_EXTINTEO_Pos))
  159. #define EIC_EVCTRL_MASK _U_(0x000000FF) /**< \brief (EIC_EVCTRL) MASK Register */
  160. /* -------- EIC_INTENCLR : (EIC Offset: 0x08) (R/W 32) Interrupt Enable Clear -------- */
  161. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  162. typedef union {
  163. struct {
  164. uint32_t EXTINT0:1; /*!< bit: 0 External Interrupt 0 Enable */
  165. uint32_t EXTINT1:1; /*!< bit: 1 External Interrupt 1 Enable */
  166. uint32_t EXTINT2:1; /*!< bit: 2 External Interrupt 2 Enable */
  167. uint32_t EXTINT3:1; /*!< bit: 3 External Interrupt 3 Enable */
  168. uint32_t EXTINT4:1; /*!< bit: 4 External Interrupt 4 Enable */
  169. uint32_t EXTINT5:1; /*!< bit: 5 External Interrupt 5 Enable */
  170. uint32_t EXTINT6:1; /*!< bit: 6 External Interrupt 6 Enable */
  171. uint32_t EXTINT7:1; /*!< bit: 7 External Interrupt 7 Enable */
  172. uint32_t :24; /*!< bit: 8..31 Reserved */
  173. } bit; /*!< Structure used for bit access */
  174. struct {
  175. uint32_t EXTINT:8; /*!< bit: 0.. 7 External Interrupt x Enable */
  176. uint32_t :24; /*!< bit: 8..31 Reserved */
  177. } vec; /*!< Structure used for vec access */
  178. uint32_t reg; /*!< Type used for register access */
  179. } EIC_INTENCLR_Type;
  180. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  181. #define EIC_INTENCLR_OFFSET 0x08 /**< \brief (EIC_INTENCLR offset) Interrupt Enable Clear */
  182. #define EIC_INTENCLR_RESETVALUE _U_(0x00000000) /**< \brief (EIC_INTENCLR reset_value) Interrupt Enable Clear */
  183. #define EIC_INTENCLR_EXTINT0_Pos 0 /**< \brief (EIC_INTENCLR) External Interrupt 0 Enable */
  184. #define EIC_INTENCLR_EXTINT0 (_U_(1) << EIC_INTENCLR_EXTINT0_Pos)
  185. #define EIC_INTENCLR_EXTINT1_Pos 1 /**< \brief (EIC_INTENCLR) External Interrupt 1 Enable */
  186. #define EIC_INTENCLR_EXTINT1 (_U_(1) << EIC_INTENCLR_EXTINT1_Pos)
  187. #define EIC_INTENCLR_EXTINT2_Pos 2 /**< \brief (EIC_INTENCLR) External Interrupt 2 Enable */
  188. #define EIC_INTENCLR_EXTINT2 (_U_(1) << EIC_INTENCLR_EXTINT2_Pos)
  189. #define EIC_INTENCLR_EXTINT3_Pos 3 /**< \brief (EIC_INTENCLR) External Interrupt 3 Enable */
  190. #define EIC_INTENCLR_EXTINT3 (_U_(1) << EIC_INTENCLR_EXTINT3_Pos)
  191. #define EIC_INTENCLR_EXTINT4_Pos 4 /**< \brief (EIC_INTENCLR) External Interrupt 4 Enable */
  192. #define EIC_INTENCLR_EXTINT4 (_U_(1) << EIC_INTENCLR_EXTINT4_Pos)
  193. #define EIC_INTENCLR_EXTINT5_Pos 5 /**< \brief (EIC_INTENCLR) External Interrupt 5 Enable */
  194. #define EIC_INTENCLR_EXTINT5 (_U_(1) << EIC_INTENCLR_EXTINT5_Pos)
  195. #define EIC_INTENCLR_EXTINT6_Pos 6 /**< \brief (EIC_INTENCLR) External Interrupt 6 Enable */
  196. #define EIC_INTENCLR_EXTINT6 (_U_(1) << EIC_INTENCLR_EXTINT6_Pos)
  197. #define EIC_INTENCLR_EXTINT7_Pos 7 /**< \brief (EIC_INTENCLR) External Interrupt 7 Enable */
  198. #define EIC_INTENCLR_EXTINT7 (_U_(1) << EIC_INTENCLR_EXTINT7_Pos)
  199. #define EIC_INTENCLR_EXTINT_Pos 0 /**< \brief (EIC_INTENCLR) External Interrupt x Enable */
  200. #define EIC_INTENCLR_EXTINT_Msk (_U_(0xFF) << EIC_INTENCLR_EXTINT_Pos)
  201. #define EIC_INTENCLR_EXTINT(value) (EIC_INTENCLR_EXTINT_Msk & ((value) << EIC_INTENCLR_EXTINT_Pos))
  202. #define EIC_INTENCLR_MASK _U_(0x000000FF) /**< \brief (EIC_INTENCLR) MASK Register */
  203. /* -------- EIC_INTENSET : (EIC Offset: 0x0C) (R/W 32) Interrupt Enable Set -------- */
  204. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  205. typedef union {
  206. struct {
  207. uint32_t EXTINT0:1; /*!< bit: 0 External Interrupt 0 Enable */
  208. uint32_t EXTINT1:1; /*!< bit: 1 External Interrupt 1 Enable */
  209. uint32_t EXTINT2:1; /*!< bit: 2 External Interrupt 2 Enable */
  210. uint32_t EXTINT3:1; /*!< bit: 3 External Interrupt 3 Enable */
  211. uint32_t EXTINT4:1; /*!< bit: 4 External Interrupt 4 Enable */
  212. uint32_t EXTINT5:1; /*!< bit: 5 External Interrupt 5 Enable */
  213. uint32_t EXTINT6:1; /*!< bit: 6 External Interrupt 6 Enable */
  214. uint32_t EXTINT7:1; /*!< bit: 7 External Interrupt 7 Enable */
  215. uint32_t :24; /*!< bit: 8..31 Reserved */
  216. } bit; /*!< Structure used for bit access */
  217. struct {
  218. uint32_t EXTINT:8; /*!< bit: 0.. 7 External Interrupt x Enable */
  219. uint32_t :24; /*!< bit: 8..31 Reserved */
  220. } vec; /*!< Structure used for vec access */
  221. uint32_t reg; /*!< Type used for register access */
  222. } EIC_INTENSET_Type;
  223. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  224. #define EIC_INTENSET_OFFSET 0x0C /**< \brief (EIC_INTENSET offset) Interrupt Enable Set */
  225. #define EIC_INTENSET_RESETVALUE _U_(0x00000000) /**< \brief (EIC_INTENSET reset_value) Interrupt Enable Set */
  226. #define EIC_INTENSET_EXTINT0_Pos 0 /**< \brief (EIC_INTENSET) External Interrupt 0 Enable */
  227. #define EIC_INTENSET_EXTINT0 (_U_(1) << EIC_INTENSET_EXTINT0_Pos)
  228. #define EIC_INTENSET_EXTINT1_Pos 1 /**< \brief (EIC_INTENSET) External Interrupt 1 Enable */
  229. #define EIC_INTENSET_EXTINT1 (_U_(1) << EIC_INTENSET_EXTINT1_Pos)
  230. #define EIC_INTENSET_EXTINT2_Pos 2 /**< \brief (EIC_INTENSET) External Interrupt 2 Enable */
  231. #define EIC_INTENSET_EXTINT2 (_U_(1) << EIC_INTENSET_EXTINT2_Pos)
  232. #define EIC_INTENSET_EXTINT3_Pos 3 /**< \brief (EIC_INTENSET) External Interrupt 3 Enable */
  233. #define EIC_INTENSET_EXTINT3 (_U_(1) << EIC_INTENSET_EXTINT3_Pos)
  234. #define EIC_INTENSET_EXTINT4_Pos 4 /**< \brief (EIC_INTENSET) External Interrupt 4 Enable */
  235. #define EIC_INTENSET_EXTINT4 (_U_(1) << EIC_INTENSET_EXTINT4_Pos)
  236. #define EIC_INTENSET_EXTINT5_Pos 5 /**< \brief (EIC_INTENSET) External Interrupt 5 Enable */
  237. #define EIC_INTENSET_EXTINT5 (_U_(1) << EIC_INTENSET_EXTINT5_Pos)
  238. #define EIC_INTENSET_EXTINT6_Pos 6 /**< \brief (EIC_INTENSET) External Interrupt 6 Enable */
  239. #define EIC_INTENSET_EXTINT6 (_U_(1) << EIC_INTENSET_EXTINT6_Pos)
  240. #define EIC_INTENSET_EXTINT7_Pos 7 /**< \brief (EIC_INTENSET) External Interrupt 7 Enable */
  241. #define EIC_INTENSET_EXTINT7 (_U_(1) << EIC_INTENSET_EXTINT7_Pos)
  242. #define EIC_INTENSET_EXTINT_Pos 0 /**< \brief (EIC_INTENSET) External Interrupt x Enable */
  243. #define EIC_INTENSET_EXTINT_Msk (_U_(0xFF) << EIC_INTENSET_EXTINT_Pos)
  244. #define EIC_INTENSET_EXTINT(value) (EIC_INTENSET_EXTINT_Msk & ((value) << EIC_INTENSET_EXTINT_Pos))
  245. #define EIC_INTENSET_MASK _U_(0x000000FF) /**< \brief (EIC_INTENSET) MASK Register */
  246. /* -------- EIC_INTFLAG : (EIC Offset: 0x10) (R/W 32) Interrupt Flag Status and Clear -------- */
  247. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  248. typedef union { // __I to avoid read-modify-write on write-to-clear register
  249. struct {
  250. __I uint32_t EXTINT0:1; /*!< bit: 0 External Interrupt 0 */
  251. __I uint32_t EXTINT1:1; /*!< bit: 1 External Interrupt 1 */
  252. __I uint32_t EXTINT2:1; /*!< bit: 2 External Interrupt 2 */
  253. __I uint32_t EXTINT3:1; /*!< bit: 3 External Interrupt 3 */
  254. __I uint32_t EXTINT4:1; /*!< bit: 4 External Interrupt 4 */
  255. __I uint32_t EXTINT5:1; /*!< bit: 5 External Interrupt 5 */
  256. __I uint32_t EXTINT6:1; /*!< bit: 6 External Interrupt 6 */
  257. __I uint32_t EXTINT7:1; /*!< bit: 7 External Interrupt 7 */
  258. __I uint32_t :24; /*!< bit: 8..31 Reserved */
  259. } bit; /*!< Structure used for bit access */
  260. struct {
  261. __I uint32_t EXTINT:8; /*!< bit: 0.. 7 External Interrupt x */
  262. __I uint32_t :24; /*!< bit: 8..31 Reserved */
  263. } vec; /*!< Structure used for vec access */
  264. uint32_t reg; /*!< Type used for register access */
  265. } EIC_INTFLAG_Type;
  266. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  267. #define EIC_INTFLAG_OFFSET 0x10 /**< \brief (EIC_INTFLAG offset) Interrupt Flag Status and Clear */
  268. #define EIC_INTFLAG_RESETVALUE _U_(0x00000000) /**< \brief (EIC_INTFLAG reset_value) Interrupt Flag Status and Clear */
  269. #define EIC_INTFLAG_EXTINT0_Pos 0 /**< \brief (EIC_INTFLAG) External Interrupt 0 */
  270. #define EIC_INTFLAG_EXTINT0 (_U_(1) << EIC_INTFLAG_EXTINT0_Pos)
  271. #define EIC_INTFLAG_EXTINT1_Pos 1 /**< \brief (EIC_INTFLAG) External Interrupt 1 */
  272. #define EIC_INTFLAG_EXTINT1 (_U_(1) << EIC_INTFLAG_EXTINT1_Pos)
  273. #define EIC_INTFLAG_EXTINT2_Pos 2 /**< \brief (EIC_INTFLAG) External Interrupt 2 */
  274. #define EIC_INTFLAG_EXTINT2 (_U_(1) << EIC_INTFLAG_EXTINT2_Pos)
  275. #define EIC_INTFLAG_EXTINT3_Pos 3 /**< \brief (EIC_INTFLAG) External Interrupt 3 */
  276. #define EIC_INTFLAG_EXTINT3 (_U_(1) << EIC_INTFLAG_EXTINT3_Pos)
  277. #define EIC_INTFLAG_EXTINT4_Pos 4 /**< \brief (EIC_INTFLAG) External Interrupt 4 */
  278. #define EIC_INTFLAG_EXTINT4 (_U_(1) << EIC_INTFLAG_EXTINT4_Pos)
  279. #define EIC_INTFLAG_EXTINT5_Pos 5 /**< \brief (EIC_INTFLAG) External Interrupt 5 */
  280. #define EIC_INTFLAG_EXTINT5 (_U_(1) << EIC_INTFLAG_EXTINT5_Pos)
  281. #define EIC_INTFLAG_EXTINT6_Pos 6 /**< \brief (EIC_INTFLAG) External Interrupt 6 */
  282. #define EIC_INTFLAG_EXTINT6 (_U_(1) << EIC_INTFLAG_EXTINT6_Pos)
  283. #define EIC_INTFLAG_EXTINT7_Pos 7 /**< \brief (EIC_INTFLAG) External Interrupt 7 */
  284. #define EIC_INTFLAG_EXTINT7 (_U_(1) << EIC_INTFLAG_EXTINT7_Pos)
  285. #define EIC_INTFLAG_EXTINT_Pos 0 /**< \brief (EIC_INTFLAG) External Interrupt x */
  286. #define EIC_INTFLAG_EXTINT_Msk (_U_(0xFF) << EIC_INTFLAG_EXTINT_Pos)
  287. #define EIC_INTFLAG_EXTINT(value) (EIC_INTFLAG_EXTINT_Msk & ((value) << EIC_INTFLAG_EXTINT_Pos))
  288. #define EIC_INTFLAG_MASK _U_(0x000000FF) /**< \brief (EIC_INTFLAG) MASK Register */
  289. /* -------- EIC_WAKEUP : (EIC Offset: 0x14) (R/W 32) Wake-Up Enable -------- */
  290. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  291. typedef union {
  292. struct {
  293. uint32_t WAKEUPEN0:1; /*!< bit: 0 External Interrupt 0 Wake-up Enable */
  294. uint32_t WAKEUPEN1:1; /*!< bit: 1 External Interrupt 1 Wake-up Enable */
  295. uint32_t WAKEUPEN2:1; /*!< bit: 2 External Interrupt 2 Wake-up Enable */
  296. uint32_t WAKEUPEN3:1; /*!< bit: 3 External Interrupt 3 Wake-up Enable */
  297. uint32_t WAKEUPEN4:1; /*!< bit: 4 External Interrupt 4 Wake-up Enable */
  298. uint32_t WAKEUPEN5:1; /*!< bit: 5 External Interrupt 5 Wake-up Enable */
  299. uint32_t WAKEUPEN6:1; /*!< bit: 6 External Interrupt 6 Wake-up Enable */
  300. uint32_t WAKEUPEN7:1; /*!< bit: 7 External Interrupt 7 Wake-up Enable */
  301. uint32_t :24; /*!< bit: 8..31 Reserved */
  302. } bit; /*!< Structure used for bit access */
  303. struct {
  304. uint32_t WAKEUPEN:8; /*!< bit: 0.. 7 External Interrupt x Wake-up Enable */
  305. uint32_t :24; /*!< bit: 8..31 Reserved */
  306. } vec; /*!< Structure used for vec access */
  307. uint32_t reg; /*!< Type used for register access */
  308. } EIC_WAKEUP_Type;
  309. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  310. #define EIC_WAKEUP_OFFSET 0x14 /**< \brief (EIC_WAKEUP offset) Wake-Up Enable */
  311. #define EIC_WAKEUP_RESETVALUE _U_(0x00000000) /**< \brief (EIC_WAKEUP reset_value) Wake-Up Enable */
  312. #define EIC_WAKEUP_WAKEUPEN0_Pos 0 /**< \brief (EIC_WAKEUP) External Interrupt 0 Wake-up Enable */
  313. #define EIC_WAKEUP_WAKEUPEN0 (_U_(1) << EIC_WAKEUP_WAKEUPEN0_Pos)
  314. #define EIC_WAKEUP_WAKEUPEN1_Pos 1 /**< \brief (EIC_WAKEUP) External Interrupt 1 Wake-up Enable */
  315. #define EIC_WAKEUP_WAKEUPEN1 (_U_(1) << EIC_WAKEUP_WAKEUPEN1_Pos)
  316. #define EIC_WAKEUP_WAKEUPEN2_Pos 2 /**< \brief (EIC_WAKEUP) External Interrupt 2 Wake-up Enable */
  317. #define EIC_WAKEUP_WAKEUPEN2 (_U_(1) << EIC_WAKEUP_WAKEUPEN2_Pos)
  318. #define EIC_WAKEUP_WAKEUPEN3_Pos 3 /**< \brief (EIC_WAKEUP) External Interrupt 3 Wake-up Enable */
  319. #define EIC_WAKEUP_WAKEUPEN3 (_U_(1) << EIC_WAKEUP_WAKEUPEN3_Pos)
  320. #define EIC_WAKEUP_WAKEUPEN4_Pos 4 /**< \brief (EIC_WAKEUP) External Interrupt 4 Wake-up Enable */
  321. #define EIC_WAKEUP_WAKEUPEN4 (_U_(1) << EIC_WAKEUP_WAKEUPEN4_Pos)
  322. #define EIC_WAKEUP_WAKEUPEN5_Pos 5 /**< \brief (EIC_WAKEUP) External Interrupt 5 Wake-up Enable */
  323. #define EIC_WAKEUP_WAKEUPEN5 (_U_(1) << EIC_WAKEUP_WAKEUPEN5_Pos)
  324. #define EIC_WAKEUP_WAKEUPEN6_Pos 6 /**< \brief (EIC_WAKEUP) External Interrupt 6 Wake-up Enable */
  325. #define EIC_WAKEUP_WAKEUPEN6 (_U_(1) << EIC_WAKEUP_WAKEUPEN6_Pos)
  326. #define EIC_WAKEUP_WAKEUPEN7_Pos 7 /**< \brief (EIC_WAKEUP) External Interrupt 7 Wake-up Enable */
  327. #define EIC_WAKEUP_WAKEUPEN7 (_U_(1) << EIC_WAKEUP_WAKEUPEN7_Pos)
  328. #define EIC_WAKEUP_WAKEUPEN_Pos 0 /**< \brief (EIC_WAKEUP) External Interrupt x Wake-up Enable */
  329. #define EIC_WAKEUP_WAKEUPEN_Msk (_U_(0xFF) << EIC_WAKEUP_WAKEUPEN_Pos)
  330. #define EIC_WAKEUP_WAKEUPEN(value) (EIC_WAKEUP_WAKEUPEN_Msk & ((value) << EIC_WAKEUP_WAKEUPEN_Pos))
  331. #define EIC_WAKEUP_MASK _U_(0x000000FF) /**< \brief (EIC_WAKEUP) MASK Register */
  332. /* -------- EIC_CONFIG : (EIC Offset: 0x18) (R/W 32) Configuration n -------- */
  333. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  334. typedef union {
  335. struct {
  336. uint32_t SENSE0:3; /*!< bit: 0.. 2 Input Sense 0 Configuration */
  337. uint32_t FILTEN0:1; /*!< bit: 3 Filter 0 Enable */
  338. uint32_t SENSE1:3; /*!< bit: 4.. 6 Input Sense 1 Configuration */
  339. uint32_t FILTEN1:1; /*!< bit: 7 Filter 1 Enable */
  340. uint32_t SENSE2:3; /*!< bit: 8..10 Input Sense 2 Configuration */
  341. uint32_t FILTEN2:1; /*!< bit: 11 Filter 2 Enable */
  342. uint32_t SENSE3:3; /*!< bit: 12..14 Input Sense 3 Configuration */
  343. uint32_t FILTEN3:1; /*!< bit: 15 Filter 3 Enable */
  344. uint32_t SENSE4:3; /*!< bit: 16..18 Input Sense 4 Configuration */
  345. uint32_t FILTEN4:1; /*!< bit: 19 Filter 4 Enable */
  346. uint32_t SENSE5:3; /*!< bit: 20..22 Input Sense 5 Configuration */
  347. uint32_t FILTEN5:1; /*!< bit: 23 Filter 5 Enable */
  348. uint32_t SENSE6:3; /*!< bit: 24..26 Input Sense 6 Configuration */
  349. uint32_t FILTEN6:1; /*!< bit: 27 Filter 6 Enable */
  350. uint32_t SENSE7:3; /*!< bit: 28..30 Input Sense 7 Configuration */
  351. uint32_t FILTEN7:1; /*!< bit: 31 Filter 7 Enable */
  352. } bit; /*!< Structure used for bit access */
  353. uint32_t reg; /*!< Type used for register access */
  354. } EIC_CONFIG_Type;
  355. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  356. #define EIC_CONFIG_OFFSET 0x18 /**< \brief (EIC_CONFIG offset) Configuration n */
  357. #define EIC_CONFIG_RESETVALUE _U_(0x00000000) /**< \brief (EIC_CONFIG reset_value) Configuration n */
  358. #define EIC_CONFIG_SENSE0_Pos 0 /**< \brief (EIC_CONFIG) Input Sense 0 Configuration */
  359. #define EIC_CONFIG_SENSE0_Msk (_U_(0x7) << EIC_CONFIG_SENSE0_Pos)
  360. #define EIC_CONFIG_SENSE0(value) (EIC_CONFIG_SENSE0_Msk & ((value) << EIC_CONFIG_SENSE0_Pos))
  361. #define EIC_CONFIG_SENSE0_NONE_Val _U_(0x0) /**< \brief (EIC_CONFIG) No detection */
  362. #define EIC_CONFIG_SENSE0_RISE_Val _U_(0x1) /**< \brief (EIC_CONFIG) Rising-edge detection */
  363. #define EIC_CONFIG_SENSE0_FALL_Val _U_(0x2) /**< \brief (EIC_CONFIG) Falling-edge detection */
  364. #define EIC_CONFIG_SENSE0_BOTH_Val _U_(0x3) /**< \brief (EIC_CONFIG) Both-edges detection */
  365. #define EIC_CONFIG_SENSE0_HIGH_Val _U_(0x4) /**< \brief (EIC_CONFIG) High-level detection */
  366. #define EIC_CONFIG_SENSE0_LOW_Val _U_(0x5) /**< \brief (EIC_CONFIG) Low-level detection */
  367. #define EIC_CONFIG_SENSE0_NONE (EIC_CONFIG_SENSE0_NONE_Val << EIC_CONFIG_SENSE0_Pos)
  368. #define EIC_CONFIG_SENSE0_RISE (EIC_CONFIG_SENSE0_RISE_Val << EIC_CONFIG_SENSE0_Pos)
  369. #define EIC_CONFIG_SENSE0_FALL (EIC_CONFIG_SENSE0_FALL_Val << EIC_CONFIG_SENSE0_Pos)
  370. #define EIC_CONFIG_SENSE0_BOTH (EIC_CONFIG_SENSE0_BOTH_Val << EIC_CONFIG_SENSE0_Pos)
  371. #define EIC_CONFIG_SENSE0_HIGH (EIC_CONFIG_SENSE0_HIGH_Val << EIC_CONFIG_SENSE0_Pos)
  372. #define EIC_CONFIG_SENSE0_LOW (EIC_CONFIG_SENSE0_LOW_Val << EIC_CONFIG_SENSE0_Pos)
  373. #define EIC_CONFIG_FILTEN0_Pos 3 /**< \brief (EIC_CONFIG) Filter 0 Enable */
  374. #define EIC_CONFIG_FILTEN0 (_U_(0x1) << EIC_CONFIG_FILTEN0_Pos)
  375. #define EIC_CONFIG_SENSE1_Pos 4 /**< \brief (EIC_CONFIG) Input Sense 1 Configuration */
  376. #define EIC_CONFIG_SENSE1_Msk (_U_(0x7) << EIC_CONFIG_SENSE1_Pos)
  377. #define EIC_CONFIG_SENSE1(value) (EIC_CONFIG_SENSE1_Msk & ((value) << EIC_CONFIG_SENSE1_Pos))
  378. #define EIC_CONFIG_SENSE1_NONE_Val _U_(0x0) /**< \brief (EIC_CONFIG) No detection */
  379. #define EIC_CONFIG_SENSE1_RISE_Val _U_(0x1) /**< \brief (EIC_CONFIG) Rising edge detection */
  380. #define EIC_CONFIG_SENSE1_FALL_Val _U_(0x2) /**< \brief (EIC_CONFIG) Falling edge detection */
  381. #define EIC_CONFIG_SENSE1_BOTH_Val _U_(0x3) /**< \brief (EIC_CONFIG) Both edges detection */
  382. #define EIC_CONFIG_SENSE1_HIGH_Val _U_(0x4) /**< \brief (EIC_CONFIG) High level detection */
  383. #define EIC_CONFIG_SENSE1_LOW_Val _U_(0x5) /**< \brief (EIC_CONFIG) Low level detection */
  384. #define EIC_CONFIG_SENSE1_NONE (EIC_CONFIG_SENSE1_NONE_Val << EIC_CONFIG_SENSE1_Pos)
  385. #define EIC_CONFIG_SENSE1_RISE (EIC_CONFIG_SENSE1_RISE_Val << EIC_CONFIG_SENSE1_Pos)
  386. #define EIC_CONFIG_SENSE1_FALL (EIC_CONFIG_SENSE1_FALL_Val << EIC_CONFIG_SENSE1_Pos)
  387. #define EIC_CONFIG_SENSE1_BOTH (EIC_CONFIG_SENSE1_BOTH_Val << EIC_CONFIG_SENSE1_Pos)
  388. #define EIC_CONFIG_SENSE1_HIGH (EIC_CONFIG_SENSE1_HIGH_Val << EIC_CONFIG_SENSE1_Pos)
  389. #define EIC_CONFIG_SENSE1_LOW (EIC_CONFIG_SENSE1_LOW_Val << EIC_CONFIG_SENSE1_Pos)
  390. #define EIC_CONFIG_FILTEN1_Pos 7 /**< \brief (EIC_CONFIG) Filter 1 Enable */
  391. #define EIC_CONFIG_FILTEN1 (_U_(0x1) << EIC_CONFIG_FILTEN1_Pos)
  392. #define EIC_CONFIG_SENSE2_Pos 8 /**< \brief (EIC_CONFIG) Input Sense 2 Configuration */
  393. #define EIC_CONFIG_SENSE2_Msk (_U_(0x7) << EIC_CONFIG_SENSE2_Pos)
  394. #define EIC_CONFIG_SENSE2(value) (EIC_CONFIG_SENSE2_Msk & ((value) << EIC_CONFIG_SENSE2_Pos))
  395. #define EIC_CONFIG_SENSE2_NONE_Val _U_(0x0) /**< \brief (EIC_CONFIG) No detection */
  396. #define EIC_CONFIG_SENSE2_RISE_Val _U_(0x1) /**< \brief (EIC_CONFIG) Rising edge detection */
  397. #define EIC_CONFIG_SENSE2_FALL_Val _U_(0x2) /**< \brief (EIC_CONFIG) Falling edge detection */
  398. #define EIC_CONFIG_SENSE2_BOTH_Val _U_(0x3) /**< \brief (EIC_CONFIG) Both edges detection */
  399. #define EIC_CONFIG_SENSE2_HIGH_Val _U_(0x4) /**< \brief (EIC_CONFIG) High level detection */
  400. #define EIC_CONFIG_SENSE2_LOW_Val _U_(0x5) /**< \brief (EIC_CONFIG) Low level detection */
  401. #define EIC_CONFIG_SENSE2_NONE (EIC_CONFIG_SENSE2_NONE_Val << EIC_CONFIG_SENSE2_Pos)
  402. #define EIC_CONFIG_SENSE2_RISE (EIC_CONFIG_SENSE2_RISE_Val << EIC_CONFIG_SENSE2_Pos)
  403. #define EIC_CONFIG_SENSE2_FALL (EIC_CONFIG_SENSE2_FALL_Val << EIC_CONFIG_SENSE2_Pos)
  404. #define EIC_CONFIG_SENSE2_BOTH (EIC_CONFIG_SENSE2_BOTH_Val << EIC_CONFIG_SENSE2_Pos)
  405. #define EIC_CONFIG_SENSE2_HIGH (EIC_CONFIG_SENSE2_HIGH_Val << EIC_CONFIG_SENSE2_Pos)
  406. #define EIC_CONFIG_SENSE2_LOW (EIC_CONFIG_SENSE2_LOW_Val << EIC_CONFIG_SENSE2_Pos)
  407. #define EIC_CONFIG_FILTEN2_Pos 11 /**< \brief (EIC_CONFIG) Filter 2 Enable */
  408. #define EIC_CONFIG_FILTEN2 (_U_(0x1) << EIC_CONFIG_FILTEN2_Pos)
  409. #define EIC_CONFIG_SENSE3_Pos 12 /**< \brief (EIC_CONFIG) Input Sense 3 Configuration */
  410. #define EIC_CONFIG_SENSE3_Msk (_U_(0x7) << EIC_CONFIG_SENSE3_Pos)
  411. #define EIC_CONFIG_SENSE3(value) (EIC_CONFIG_SENSE3_Msk & ((value) << EIC_CONFIG_SENSE3_Pos))
  412. #define EIC_CONFIG_SENSE3_NONE_Val _U_(0x0) /**< \brief (EIC_CONFIG) No detection */
  413. #define EIC_CONFIG_SENSE3_RISE_Val _U_(0x1) /**< \brief (EIC_CONFIG) Rising edge detection */
  414. #define EIC_CONFIG_SENSE3_FALL_Val _U_(0x2) /**< \brief (EIC_CONFIG) Falling edge detection */
  415. #define EIC_CONFIG_SENSE3_BOTH_Val _U_(0x3) /**< \brief (EIC_CONFIG) Both edges detection */
  416. #define EIC_CONFIG_SENSE3_HIGH_Val _U_(0x4) /**< \brief (EIC_CONFIG) High level detection */
  417. #define EIC_CONFIG_SENSE3_LOW_Val _U_(0x5) /**< \brief (EIC_CONFIG) Low level detection */
  418. #define EIC_CONFIG_SENSE3_NONE (EIC_CONFIG_SENSE3_NONE_Val << EIC_CONFIG_SENSE3_Pos)
  419. #define EIC_CONFIG_SENSE3_RISE (EIC_CONFIG_SENSE3_RISE_Val << EIC_CONFIG_SENSE3_Pos)
  420. #define EIC_CONFIG_SENSE3_FALL (EIC_CONFIG_SENSE3_FALL_Val << EIC_CONFIG_SENSE3_Pos)
  421. #define EIC_CONFIG_SENSE3_BOTH (EIC_CONFIG_SENSE3_BOTH_Val << EIC_CONFIG_SENSE3_Pos)
  422. #define EIC_CONFIG_SENSE3_HIGH (EIC_CONFIG_SENSE3_HIGH_Val << EIC_CONFIG_SENSE3_Pos)
  423. #define EIC_CONFIG_SENSE3_LOW (EIC_CONFIG_SENSE3_LOW_Val << EIC_CONFIG_SENSE3_Pos)
  424. #define EIC_CONFIG_FILTEN3_Pos 15 /**< \brief (EIC_CONFIG) Filter 3 Enable */
  425. #define EIC_CONFIG_FILTEN3 (_U_(0x1) << EIC_CONFIG_FILTEN3_Pos)
  426. #define EIC_CONFIG_SENSE4_Pos 16 /**< \brief (EIC_CONFIG) Input Sense 4 Configuration */
  427. #define EIC_CONFIG_SENSE4_Msk (_U_(0x7) << EIC_CONFIG_SENSE4_Pos)
  428. #define EIC_CONFIG_SENSE4(value) (EIC_CONFIG_SENSE4_Msk & ((value) << EIC_CONFIG_SENSE4_Pos))
  429. #define EIC_CONFIG_SENSE4_NONE_Val _U_(0x0) /**< \brief (EIC_CONFIG) No detection */
  430. #define EIC_CONFIG_SENSE4_RISE_Val _U_(0x1) /**< \brief (EIC_CONFIG) Rising edge detection */
  431. #define EIC_CONFIG_SENSE4_FALL_Val _U_(0x2) /**< \brief (EIC_CONFIG) Falling edge detection */
  432. #define EIC_CONFIG_SENSE4_BOTH_Val _U_(0x3) /**< \brief (EIC_CONFIG) Both edges detection */
  433. #define EIC_CONFIG_SENSE4_HIGH_Val _U_(0x4) /**< \brief (EIC_CONFIG) High level detection */
  434. #define EIC_CONFIG_SENSE4_LOW_Val _U_(0x5) /**< \brief (EIC_CONFIG) Low level detection */
  435. #define EIC_CONFIG_SENSE4_NONE (EIC_CONFIG_SENSE4_NONE_Val << EIC_CONFIG_SENSE4_Pos)
  436. #define EIC_CONFIG_SENSE4_RISE (EIC_CONFIG_SENSE4_RISE_Val << EIC_CONFIG_SENSE4_Pos)
  437. #define EIC_CONFIG_SENSE4_FALL (EIC_CONFIG_SENSE4_FALL_Val << EIC_CONFIG_SENSE4_Pos)
  438. #define EIC_CONFIG_SENSE4_BOTH (EIC_CONFIG_SENSE4_BOTH_Val << EIC_CONFIG_SENSE4_Pos)
  439. #define EIC_CONFIG_SENSE4_HIGH (EIC_CONFIG_SENSE4_HIGH_Val << EIC_CONFIG_SENSE4_Pos)
  440. #define EIC_CONFIG_SENSE4_LOW (EIC_CONFIG_SENSE4_LOW_Val << EIC_CONFIG_SENSE4_Pos)
  441. #define EIC_CONFIG_FILTEN4_Pos 19 /**< \brief (EIC_CONFIG) Filter 4 Enable */
  442. #define EIC_CONFIG_FILTEN4 (_U_(0x1) << EIC_CONFIG_FILTEN4_Pos)
  443. #define EIC_CONFIG_SENSE5_Pos 20 /**< \brief (EIC_CONFIG) Input Sense 5 Configuration */
  444. #define EIC_CONFIG_SENSE5_Msk (_U_(0x7) << EIC_CONFIG_SENSE5_Pos)
  445. #define EIC_CONFIG_SENSE5(value) (EIC_CONFIG_SENSE5_Msk & ((value) << EIC_CONFIG_SENSE5_Pos))
  446. #define EIC_CONFIG_SENSE5_NONE_Val _U_(0x0) /**< \brief (EIC_CONFIG) No detection */
  447. #define EIC_CONFIG_SENSE5_RISE_Val _U_(0x1) /**< \brief (EIC_CONFIG) Rising edge detection */
  448. #define EIC_CONFIG_SENSE5_FALL_Val _U_(0x2) /**< \brief (EIC_CONFIG) Falling edge detection */
  449. #define EIC_CONFIG_SENSE5_BOTH_Val _U_(0x3) /**< \brief (EIC_CONFIG) Both edges detection */
  450. #define EIC_CONFIG_SENSE5_HIGH_Val _U_(0x4) /**< \brief (EIC_CONFIG) High level detection */
  451. #define EIC_CONFIG_SENSE5_LOW_Val _U_(0x5) /**< \brief (EIC_CONFIG) Low level detection */
  452. #define EIC_CONFIG_SENSE5_NONE (EIC_CONFIG_SENSE5_NONE_Val << EIC_CONFIG_SENSE5_Pos)
  453. #define EIC_CONFIG_SENSE5_RISE (EIC_CONFIG_SENSE5_RISE_Val << EIC_CONFIG_SENSE5_Pos)
  454. #define EIC_CONFIG_SENSE5_FALL (EIC_CONFIG_SENSE5_FALL_Val << EIC_CONFIG_SENSE5_Pos)
  455. #define EIC_CONFIG_SENSE5_BOTH (EIC_CONFIG_SENSE5_BOTH_Val << EIC_CONFIG_SENSE5_Pos)
  456. #define EIC_CONFIG_SENSE5_HIGH (EIC_CONFIG_SENSE5_HIGH_Val << EIC_CONFIG_SENSE5_Pos)
  457. #define EIC_CONFIG_SENSE5_LOW (EIC_CONFIG_SENSE5_LOW_Val << EIC_CONFIG_SENSE5_Pos)
  458. #define EIC_CONFIG_FILTEN5_Pos 23 /**< \brief (EIC_CONFIG) Filter 5 Enable */
  459. #define EIC_CONFIG_FILTEN5 (_U_(0x1) << EIC_CONFIG_FILTEN5_Pos)
  460. #define EIC_CONFIG_SENSE6_Pos 24 /**< \brief (EIC_CONFIG) Input Sense 6 Configuration */
  461. #define EIC_CONFIG_SENSE6_Msk (_U_(0x7) << EIC_CONFIG_SENSE6_Pos)
  462. #define EIC_CONFIG_SENSE6(value) (EIC_CONFIG_SENSE6_Msk & ((value) << EIC_CONFIG_SENSE6_Pos))
  463. #define EIC_CONFIG_SENSE6_NONE_Val _U_(0x0) /**< \brief (EIC_CONFIG) No detection */
  464. #define EIC_CONFIG_SENSE6_RISE_Val _U_(0x1) /**< \brief (EIC_CONFIG) Rising edge detection */
  465. #define EIC_CONFIG_SENSE6_FALL_Val _U_(0x2) /**< \brief (EIC_CONFIG) Falling edge detection */
  466. #define EIC_CONFIG_SENSE6_BOTH_Val _U_(0x3) /**< \brief (EIC_CONFIG) Both edges detection */
  467. #define EIC_CONFIG_SENSE6_HIGH_Val _U_(0x4) /**< \brief (EIC_CONFIG) High level detection */
  468. #define EIC_CONFIG_SENSE6_LOW_Val _U_(0x5) /**< \brief (EIC_CONFIG) Low level detection */
  469. #define EIC_CONFIG_SENSE6_NONE (EIC_CONFIG_SENSE6_NONE_Val << EIC_CONFIG_SENSE6_Pos)
  470. #define EIC_CONFIG_SENSE6_RISE (EIC_CONFIG_SENSE6_RISE_Val << EIC_CONFIG_SENSE6_Pos)
  471. #define EIC_CONFIG_SENSE6_FALL (EIC_CONFIG_SENSE6_FALL_Val << EIC_CONFIG_SENSE6_Pos)
  472. #define EIC_CONFIG_SENSE6_BOTH (EIC_CONFIG_SENSE6_BOTH_Val << EIC_CONFIG_SENSE6_Pos)
  473. #define EIC_CONFIG_SENSE6_HIGH (EIC_CONFIG_SENSE6_HIGH_Val << EIC_CONFIG_SENSE6_Pos)
  474. #define EIC_CONFIG_SENSE6_LOW (EIC_CONFIG_SENSE6_LOW_Val << EIC_CONFIG_SENSE6_Pos)
  475. #define EIC_CONFIG_FILTEN6_Pos 27 /**< \brief (EIC_CONFIG) Filter 6 Enable */
  476. #define EIC_CONFIG_FILTEN6 (_U_(0x1) << EIC_CONFIG_FILTEN6_Pos)
  477. #define EIC_CONFIG_SENSE7_Pos 28 /**< \brief (EIC_CONFIG) Input Sense 7 Configuration */
  478. #define EIC_CONFIG_SENSE7_Msk (_U_(0x7) << EIC_CONFIG_SENSE7_Pos)
  479. #define EIC_CONFIG_SENSE7(value) (EIC_CONFIG_SENSE7_Msk & ((value) << EIC_CONFIG_SENSE7_Pos))
  480. #define EIC_CONFIG_SENSE7_NONE_Val _U_(0x0) /**< \brief (EIC_CONFIG) No detection */
  481. #define EIC_CONFIG_SENSE7_RISE_Val _U_(0x1) /**< \brief (EIC_CONFIG) Rising edge detection */
  482. #define EIC_CONFIG_SENSE7_FALL_Val _U_(0x2) /**< \brief (EIC_CONFIG) Falling edge detection */
  483. #define EIC_CONFIG_SENSE7_BOTH_Val _U_(0x3) /**< \brief (EIC_CONFIG) Both edges detection */
  484. #define EIC_CONFIG_SENSE7_HIGH_Val _U_(0x4) /**< \brief (EIC_CONFIG) High level detection */
  485. #define EIC_CONFIG_SENSE7_LOW_Val _U_(0x5) /**< \brief (EIC_CONFIG) Low level detection */
  486. #define EIC_CONFIG_SENSE7_NONE (EIC_CONFIG_SENSE7_NONE_Val << EIC_CONFIG_SENSE7_Pos)
  487. #define EIC_CONFIG_SENSE7_RISE (EIC_CONFIG_SENSE7_RISE_Val << EIC_CONFIG_SENSE7_Pos)
  488. #define EIC_CONFIG_SENSE7_FALL (EIC_CONFIG_SENSE7_FALL_Val << EIC_CONFIG_SENSE7_Pos)
  489. #define EIC_CONFIG_SENSE7_BOTH (EIC_CONFIG_SENSE7_BOTH_Val << EIC_CONFIG_SENSE7_Pos)
  490. #define EIC_CONFIG_SENSE7_HIGH (EIC_CONFIG_SENSE7_HIGH_Val << EIC_CONFIG_SENSE7_Pos)
  491. #define EIC_CONFIG_SENSE7_LOW (EIC_CONFIG_SENSE7_LOW_Val << EIC_CONFIG_SENSE7_Pos)
  492. #define EIC_CONFIG_FILTEN7_Pos 31 /**< \brief (EIC_CONFIG) Filter 7 Enable */
  493. #define EIC_CONFIG_FILTEN7 (_U_(0x1) << EIC_CONFIG_FILTEN7_Pos)
  494. #define EIC_CONFIG_MASK _U_(0xFFFFFFFF) /**< \brief (EIC_CONFIG) MASK Register */
  495. /** \brief EIC hardware registers */
  496. #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
  497. typedef struct {
  498. __IO EIC_CTRL_Type CTRL; /**< \brief Offset: 0x00 (R/W 8) Control */
  499. __I EIC_STATUS_Type STATUS; /**< \brief Offset: 0x01 (R/ 8) Status */
  500. __IO EIC_NMICTRL_Type NMICTRL; /**< \brief Offset: 0x02 (R/W 8) Non-Maskable Interrupt Control */
  501. __IO EIC_NMIFLAG_Type NMIFLAG; /**< \brief Offset: 0x03 (R/W 8) Non-Maskable Interrupt Flag Status and Clear */
  502. __IO EIC_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x04 (R/W 32) Event Control */
  503. __IO EIC_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x08 (R/W 32) Interrupt Enable Clear */
  504. __IO EIC_INTENSET_Type INTENSET; /**< \brief Offset: 0x0C (R/W 32) Interrupt Enable Set */
  505. __IO EIC_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x10 (R/W 32) Interrupt Flag Status and Clear */
  506. __IO EIC_WAKEUP_Type WAKEUP; /**< \brief Offset: 0x14 (R/W 32) Wake-Up Enable */
  507. __IO EIC_CONFIG_Type CONFIG[1]; /**< \brief Offset: 0x18 (R/W 32) Configuration n */
  508. } Eic;
  509. #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
  510. /*@}*/
  511. #endif /* _SAMD11_EIC_COMPONENT_ */