eic.h 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for EIC
  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_EIC_COMPONENT_H_
  31. #define _SAML11_EIC_COMPONENT_H_
  32. #define _SAML11_EIC_COMPONENT_ /**< \deprecated Backward compatibility for ASF */
  33. /** \addtogroup SAML_SAML11 External Interrupt Controller
  34. * @{
  35. */
  36. /* ========================================================================== */
  37. /** SOFTWARE API DEFINITION FOR EIC */
  38. /* ========================================================================== */
  39. #define EIC_U2804 /**< (EIC) Module ID */
  40. #define REV_EIC 0x100 /**< (EIC) Module revision */
  41. /* -------- EIC_CTRLA : (EIC Offset: 0x00) (R/W 8) Control A -------- */
  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 :2; /**< bit: 2..3 Reserved */
  48. uint8_t CKSEL:1; /**< bit: 4 Clock Selection */
  49. uint8_t :3; /**< bit: 5..7 Reserved */
  50. } bit; /**< Structure used for bit access */
  51. uint8_t reg; /**< Type used for register access */
  52. } EIC_CTRLA_Type;
  53. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  54. #define EIC_CTRLA_OFFSET (0x00) /**< (EIC_CTRLA) Control A Offset */
  55. #define EIC_CTRLA_RESETVALUE _U_(0x00) /**< (EIC_CTRLA) Control A Reset Value */
  56. #define EIC_CTRLA_SWRST_Pos 0 /**< (EIC_CTRLA) Software Reset Position */
  57. #define EIC_CTRLA_SWRST_Msk (_U_(0x1) << EIC_CTRLA_SWRST_Pos) /**< (EIC_CTRLA) Software Reset Mask */
  58. #define EIC_CTRLA_SWRST EIC_CTRLA_SWRST_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CTRLA_SWRST_Msk instead */
  59. #define EIC_CTRLA_ENABLE_Pos 1 /**< (EIC_CTRLA) Enable Position */
  60. #define EIC_CTRLA_ENABLE_Msk (_U_(0x1) << EIC_CTRLA_ENABLE_Pos) /**< (EIC_CTRLA) Enable Mask */
  61. #define EIC_CTRLA_ENABLE EIC_CTRLA_ENABLE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CTRLA_ENABLE_Msk instead */
  62. #define EIC_CTRLA_CKSEL_Pos 4 /**< (EIC_CTRLA) Clock Selection Position */
  63. #define EIC_CTRLA_CKSEL_Msk (_U_(0x1) << EIC_CTRLA_CKSEL_Pos) /**< (EIC_CTRLA) Clock Selection Mask */
  64. #define EIC_CTRLA_CKSEL EIC_CTRLA_CKSEL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CTRLA_CKSEL_Msk instead */
  65. #define EIC_CTRLA_MASK _U_(0x13) /**< \deprecated (EIC_CTRLA) Register MASK (Use EIC_CTRLA_Msk instead) */
  66. #define EIC_CTRLA_Msk _U_(0x13) /**< (EIC_CTRLA) Register Mask */
  67. /* -------- EIC_NMICTRL : (EIC Offset: 0x01) (R/W 8) Non-Maskable Interrupt Control -------- */
  68. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  69. typedef union {
  70. struct {
  71. uint8_t NMISENSE:3; /**< bit: 0..2 Non-Maskable Interrupt Sense Configuration */
  72. uint8_t NMIFILTEN:1; /**< bit: 3 Non-Maskable Interrupt Filter Enable */
  73. uint8_t NMIASYNCH:1; /**< bit: 4 Asynchronous Edge Detection Mode */
  74. uint8_t :3; /**< bit: 5..7 Reserved */
  75. } bit; /**< Structure used for bit access */
  76. uint8_t reg; /**< Type used for register access */
  77. } EIC_NMICTRL_Type;
  78. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  79. #define EIC_NMICTRL_OFFSET (0x01) /**< (EIC_NMICTRL) Non-Maskable Interrupt Control Offset */
  80. #define EIC_NMICTRL_RESETVALUE _U_(0x00) /**< (EIC_NMICTRL) Non-Maskable Interrupt Control Reset Value */
  81. #define EIC_NMICTRL_NMISENSE_Pos 0 /**< (EIC_NMICTRL) Non-Maskable Interrupt Sense Configuration Position */
  82. #define EIC_NMICTRL_NMISENSE_Msk (_U_(0x7) << EIC_NMICTRL_NMISENSE_Pos) /**< (EIC_NMICTRL) Non-Maskable Interrupt Sense Configuration Mask */
  83. #define EIC_NMICTRL_NMISENSE(value) (EIC_NMICTRL_NMISENSE_Msk & ((value) << EIC_NMICTRL_NMISENSE_Pos))
  84. #define EIC_NMICTRL_NMISENSE_NONE_Val _U_(0x0) /**< (EIC_NMICTRL) No detection */
  85. #define EIC_NMICTRL_NMISENSE_RISE_Val _U_(0x1) /**< (EIC_NMICTRL) Rising-edge detection */
  86. #define EIC_NMICTRL_NMISENSE_FALL_Val _U_(0x2) /**< (EIC_NMICTRL) Falling-edge detection */
  87. #define EIC_NMICTRL_NMISENSE_BOTH_Val _U_(0x3) /**< (EIC_NMICTRL) Both-edges detection */
  88. #define EIC_NMICTRL_NMISENSE_HIGH_Val _U_(0x4) /**< (EIC_NMICTRL) High-level detection */
  89. #define EIC_NMICTRL_NMISENSE_LOW_Val _U_(0x5) /**< (EIC_NMICTRL) Low-level detection */
  90. #define EIC_NMICTRL_NMISENSE_NONE (EIC_NMICTRL_NMISENSE_NONE_Val << EIC_NMICTRL_NMISENSE_Pos) /**< (EIC_NMICTRL) No detection Position */
  91. #define EIC_NMICTRL_NMISENSE_RISE (EIC_NMICTRL_NMISENSE_RISE_Val << EIC_NMICTRL_NMISENSE_Pos) /**< (EIC_NMICTRL) Rising-edge detection Position */
  92. #define EIC_NMICTRL_NMISENSE_FALL (EIC_NMICTRL_NMISENSE_FALL_Val << EIC_NMICTRL_NMISENSE_Pos) /**< (EIC_NMICTRL) Falling-edge detection Position */
  93. #define EIC_NMICTRL_NMISENSE_BOTH (EIC_NMICTRL_NMISENSE_BOTH_Val << EIC_NMICTRL_NMISENSE_Pos) /**< (EIC_NMICTRL) Both-edges detection Position */
  94. #define EIC_NMICTRL_NMISENSE_HIGH (EIC_NMICTRL_NMISENSE_HIGH_Val << EIC_NMICTRL_NMISENSE_Pos) /**< (EIC_NMICTRL) High-level detection Position */
  95. #define EIC_NMICTRL_NMISENSE_LOW (EIC_NMICTRL_NMISENSE_LOW_Val << EIC_NMICTRL_NMISENSE_Pos) /**< (EIC_NMICTRL) Low-level detection Position */
  96. #define EIC_NMICTRL_NMIFILTEN_Pos 3 /**< (EIC_NMICTRL) Non-Maskable Interrupt Filter Enable Position */
  97. #define EIC_NMICTRL_NMIFILTEN_Msk (_U_(0x1) << EIC_NMICTRL_NMIFILTEN_Pos) /**< (EIC_NMICTRL) Non-Maskable Interrupt Filter Enable Mask */
  98. #define EIC_NMICTRL_NMIFILTEN EIC_NMICTRL_NMIFILTEN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_NMICTRL_NMIFILTEN_Msk instead */
  99. #define EIC_NMICTRL_NMIASYNCH_Pos 4 /**< (EIC_NMICTRL) Asynchronous Edge Detection Mode Position */
  100. #define EIC_NMICTRL_NMIASYNCH_Msk (_U_(0x1) << EIC_NMICTRL_NMIASYNCH_Pos) /**< (EIC_NMICTRL) Asynchronous Edge Detection Mode Mask */
  101. #define EIC_NMICTRL_NMIASYNCH EIC_NMICTRL_NMIASYNCH_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_NMICTRL_NMIASYNCH_Msk instead */
  102. #define EIC_NMICTRL_MASK _U_(0x1F) /**< \deprecated (EIC_NMICTRL) Register MASK (Use EIC_NMICTRL_Msk instead) */
  103. #define EIC_NMICTRL_Msk _U_(0x1F) /**< (EIC_NMICTRL) Register Mask */
  104. /* -------- EIC_NMIFLAG : (EIC Offset: 0x02) (R/W 16) Non-Maskable Interrupt Flag Status and Clear -------- */
  105. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  106. typedef union {
  107. struct {
  108. uint16_t NMI:1; /**< bit: 0 Non-Maskable Interrupt */
  109. uint16_t :15; /**< bit: 1..15 Reserved */
  110. } bit; /**< Structure used for bit access */
  111. uint16_t reg; /**< Type used for register access */
  112. } EIC_NMIFLAG_Type;
  113. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  114. #define EIC_NMIFLAG_OFFSET (0x02) /**< (EIC_NMIFLAG) Non-Maskable Interrupt Flag Status and Clear Offset */
  115. #define EIC_NMIFLAG_RESETVALUE _U_(0x00) /**< (EIC_NMIFLAG) Non-Maskable Interrupt Flag Status and Clear Reset Value */
  116. #define EIC_NMIFLAG_NMI_Pos 0 /**< (EIC_NMIFLAG) Non-Maskable Interrupt Position */
  117. #define EIC_NMIFLAG_NMI_Msk (_U_(0x1) << EIC_NMIFLAG_NMI_Pos) /**< (EIC_NMIFLAG) Non-Maskable Interrupt Mask */
  118. #define EIC_NMIFLAG_NMI EIC_NMIFLAG_NMI_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_NMIFLAG_NMI_Msk instead */
  119. #define EIC_NMIFLAG_MASK _U_(0x01) /**< \deprecated (EIC_NMIFLAG) Register MASK (Use EIC_NMIFLAG_Msk instead) */
  120. #define EIC_NMIFLAG_Msk _U_(0x01) /**< (EIC_NMIFLAG) Register Mask */
  121. /* -------- EIC_SYNCBUSY : (EIC Offset: 0x04) (R/ 32) Synchronization Busy -------- */
  122. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  123. typedef union {
  124. struct {
  125. uint32_t SWRST:1; /**< bit: 0 Software Reset Synchronization Busy Status */
  126. uint32_t ENABLE:1; /**< bit: 1 Enable Synchronization Busy Status */
  127. uint32_t :30; /**< bit: 2..31 Reserved */
  128. } bit; /**< Structure used for bit access */
  129. uint32_t reg; /**< Type used for register access */
  130. } EIC_SYNCBUSY_Type;
  131. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  132. #define EIC_SYNCBUSY_OFFSET (0x04) /**< (EIC_SYNCBUSY) Synchronization Busy Offset */
  133. #define EIC_SYNCBUSY_RESETVALUE _U_(0x00) /**< (EIC_SYNCBUSY) Synchronization Busy Reset Value */
  134. #define EIC_SYNCBUSY_SWRST_Pos 0 /**< (EIC_SYNCBUSY) Software Reset Synchronization Busy Status Position */
  135. #define EIC_SYNCBUSY_SWRST_Msk (_U_(0x1) << EIC_SYNCBUSY_SWRST_Pos) /**< (EIC_SYNCBUSY) Software Reset Synchronization Busy Status Mask */
  136. #define EIC_SYNCBUSY_SWRST EIC_SYNCBUSY_SWRST_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_SYNCBUSY_SWRST_Msk instead */
  137. #define EIC_SYNCBUSY_ENABLE_Pos 1 /**< (EIC_SYNCBUSY) Enable Synchronization Busy Status Position */
  138. #define EIC_SYNCBUSY_ENABLE_Msk (_U_(0x1) << EIC_SYNCBUSY_ENABLE_Pos) /**< (EIC_SYNCBUSY) Enable Synchronization Busy Status Mask */
  139. #define EIC_SYNCBUSY_ENABLE EIC_SYNCBUSY_ENABLE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_SYNCBUSY_ENABLE_Msk instead */
  140. #define EIC_SYNCBUSY_MASK _U_(0x03) /**< \deprecated (EIC_SYNCBUSY) Register MASK (Use EIC_SYNCBUSY_Msk instead) */
  141. #define EIC_SYNCBUSY_Msk _U_(0x03) /**< (EIC_SYNCBUSY) Register Mask */
  142. /* -------- EIC_EVCTRL : (EIC Offset: 0x08) (R/W 32) Event Control -------- */
  143. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  144. typedef union {
  145. struct {
  146. uint32_t EXTINTEO:8; /**< bit: 0..7 External Interrupt Event Output Enable */
  147. uint32_t :24; /**< bit: 8..31 Reserved */
  148. } bit; /**< Structure used for bit access */
  149. uint32_t reg; /**< Type used for register access */
  150. } EIC_EVCTRL_Type;
  151. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  152. #define EIC_EVCTRL_OFFSET (0x08) /**< (EIC_EVCTRL) Event Control Offset */
  153. #define EIC_EVCTRL_RESETVALUE _U_(0x00) /**< (EIC_EVCTRL) Event Control Reset Value */
  154. #define EIC_EVCTRL_EXTINTEO_Pos 0 /**< (EIC_EVCTRL) External Interrupt Event Output Enable Position */
  155. #define EIC_EVCTRL_EXTINTEO_Msk (_U_(0xFF) << EIC_EVCTRL_EXTINTEO_Pos) /**< (EIC_EVCTRL) External Interrupt Event Output Enable Mask */
  156. #define EIC_EVCTRL_EXTINTEO(value) (EIC_EVCTRL_EXTINTEO_Msk & ((value) << EIC_EVCTRL_EXTINTEO_Pos))
  157. #define EIC_EVCTRL_MASK _U_(0xFF) /**< \deprecated (EIC_EVCTRL) Register MASK (Use EIC_EVCTRL_Msk instead) */
  158. #define EIC_EVCTRL_Msk _U_(0xFF) /**< (EIC_EVCTRL) Register Mask */
  159. /* -------- EIC_INTENCLR : (EIC Offset: 0x0c) (R/W 32) Interrupt Enable Clear -------- */
  160. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  161. typedef union {
  162. struct {
  163. uint32_t EXTINT:8; /**< bit: 0..7 External Interrupt Enable */
  164. uint32_t :23; /**< bit: 8..30 Reserved */
  165. uint32_t NSCHK:1; /**< bit: 31 Non-secure Check Interrupt Enable */
  166. } bit; /**< Structure used for bit access */
  167. uint32_t reg; /**< Type used for register access */
  168. } EIC_INTENCLR_Type;
  169. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  170. #define EIC_INTENCLR_OFFSET (0x0C) /**< (EIC_INTENCLR) Interrupt Enable Clear Offset */
  171. #define EIC_INTENCLR_RESETVALUE _U_(0x00) /**< (EIC_INTENCLR) Interrupt Enable Clear Reset Value */
  172. #define EIC_INTENCLR_EXTINT_Pos 0 /**< (EIC_INTENCLR) External Interrupt Enable Position */
  173. #define EIC_INTENCLR_EXTINT_Msk (_U_(0xFF) << EIC_INTENCLR_EXTINT_Pos) /**< (EIC_INTENCLR) External Interrupt Enable Mask */
  174. #define EIC_INTENCLR_EXTINT(value) (EIC_INTENCLR_EXTINT_Msk & ((value) << EIC_INTENCLR_EXTINT_Pos))
  175. #define EIC_INTENCLR_NSCHK_Pos 31 /**< (EIC_INTENCLR) Non-secure Check Interrupt Enable Position */
  176. #define EIC_INTENCLR_NSCHK_Msk (_U_(0x1) << EIC_INTENCLR_NSCHK_Pos) /**< (EIC_INTENCLR) Non-secure Check Interrupt Enable Mask */
  177. #define EIC_INTENCLR_NSCHK EIC_INTENCLR_NSCHK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_INTENCLR_NSCHK_Msk instead */
  178. #define EIC_INTENCLR_MASK _U_(0x800000FF) /**< \deprecated (EIC_INTENCLR) Register MASK (Use EIC_INTENCLR_Msk instead) */
  179. #define EIC_INTENCLR_Msk _U_(0x800000FF) /**< (EIC_INTENCLR) Register Mask */
  180. /* -------- EIC_INTENSET : (EIC Offset: 0x10) (R/W 32) Interrupt Enable Set -------- */
  181. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  182. typedef union {
  183. struct {
  184. uint32_t EXTINT:8; /**< bit: 0..7 External Interrupt Enable */
  185. uint32_t :23; /**< bit: 8..30 Reserved */
  186. uint32_t NSCHK:1; /**< bit: 31 Non-secure Check Interrupt Enable */
  187. } bit; /**< Structure used for bit access */
  188. uint32_t reg; /**< Type used for register access */
  189. } EIC_INTENSET_Type;
  190. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  191. #define EIC_INTENSET_OFFSET (0x10) /**< (EIC_INTENSET) Interrupt Enable Set Offset */
  192. #define EIC_INTENSET_RESETVALUE _U_(0x00) /**< (EIC_INTENSET) Interrupt Enable Set Reset Value */
  193. #define EIC_INTENSET_EXTINT_Pos 0 /**< (EIC_INTENSET) External Interrupt Enable Position */
  194. #define EIC_INTENSET_EXTINT_Msk (_U_(0xFF) << EIC_INTENSET_EXTINT_Pos) /**< (EIC_INTENSET) External Interrupt Enable Mask */
  195. #define EIC_INTENSET_EXTINT(value) (EIC_INTENSET_EXTINT_Msk & ((value) << EIC_INTENSET_EXTINT_Pos))
  196. #define EIC_INTENSET_NSCHK_Pos 31 /**< (EIC_INTENSET) Non-secure Check Interrupt Enable Position */
  197. #define EIC_INTENSET_NSCHK_Msk (_U_(0x1) << EIC_INTENSET_NSCHK_Pos) /**< (EIC_INTENSET) Non-secure Check Interrupt Enable Mask */
  198. #define EIC_INTENSET_NSCHK EIC_INTENSET_NSCHK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_INTENSET_NSCHK_Msk instead */
  199. #define EIC_INTENSET_MASK _U_(0x800000FF) /**< \deprecated (EIC_INTENSET) Register MASK (Use EIC_INTENSET_Msk instead) */
  200. #define EIC_INTENSET_Msk _U_(0x800000FF) /**< (EIC_INTENSET) Register Mask */
  201. /* -------- EIC_INTFLAG : (EIC Offset: 0x14) (R/W 32) Interrupt Flag Status and Clear -------- */
  202. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  203. typedef union { // __I to avoid read-modify-write on write-to-clear register
  204. struct {
  205. __I uint32_t EXTINT:8; /**< bit: 0..7 External Interrupt */
  206. __I uint32_t :23; /**< bit: 8..30 Reserved */
  207. __I uint32_t NSCHK:1; /**< bit: 31 Non-secure Check Interrupt */
  208. } bit; /**< Structure used for bit access */
  209. uint32_t reg; /**< Type used for register access */
  210. } EIC_INTFLAG_Type;
  211. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  212. #define EIC_INTFLAG_OFFSET (0x14) /**< (EIC_INTFLAG) Interrupt Flag Status and Clear Offset */
  213. #define EIC_INTFLAG_RESETVALUE _U_(0x00) /**< (EIC_INTFLAG) Interrupt Flag Status and Clear Reset Value */
  214. #define EIC_INTFLAG_EXTINT_Pos 0 /**< (EIC_INTFLAG) External Interrupt Position */
  215. #define EIC_INTFLAG_EXTINT_Msk (_U_(0xFF) << EIC_INTFLAG_EXTINT_Pos) /**< (EIC_INTFLAG) External Interrupt Mask */
  216. #define EIC_INTFLAG_EXTINT(value) (EIC_INTFLAG_EXTINT_Msk & ((value) << EIC_INTFLAG_EXTINT_Pos))
  217. #define EIC_INTFLAG_NSCHK_Pos 31 /**< (EIC_INTFLAG) Non-secure Check Interrupt Position */
  218. #define EIC_INTFLAG_NSCHK_Msk (_U_(0x1) << EIC_INTFLAG_NSCHK_Pos) /**< (EIC_INTFLAG) Non-secure Check Interrupt Mask */
  219. #define EIC_INTFLAG_NSCHK EIC_INTFLAG_NSCHK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_INTFLAG_NSCHK_Msk instead */
  220. #define EIC_INTFLAG_MASK _U_(0x800000FF) /**< \deprecated (EIC_INTFLAG) Register MASK (Use EIC_INTFLAG_Msk instead) */
  221. #define EIC_INTFLAG_Msk _U_(0x800000FF) /**< (EIC_INTFLAG) Register Mask */
  222. /* -------- EIC_ASYNCH : (EIC Offset: 0x18) (R/W 32) External Interrupt Asynchronous Mode -------- */
  223. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  224. typedef union {
  225. struct {
  226. uint32_t ASYNCH:8; /**< bit: 0..7 Asynchronous Edge Detection Mode */
  227. uint32_t :24; /**< bit: 8..31 Reserved */
  228. } bit; /**< Structure used for bit access */
  229. uint32_t reg; /**< Type used for register access */
  230. } EIC_ASYNCH_Type;
  231. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  232. #define EIC_ASYNCH_OFFSET (0x18) /**< (EIC_ASYNCH) External Interrupt Asynchronous Mode Offset */
  233. #define EIC_ASYNCH_RESETVALUE _U_(0x00) /**< (EIC_ASYNCH) External Interrupt Asynchronous Mode Reset Value */
  234. #define EIC_ASYNCH_ASYNCH_Pos 0 /**< (EIC_ASYNCH) Asynchronous Edge Detection Mode Position */
  235. #define EIC_ASYNCH_ASYNCH_Msk (_U_(0xFF) << EIC_ASYNCH_ASYNCH_Pos) /**< (EIC_ASYNCH) Asynchronous Edge Detection Mode Mask */
  236. #define EIC_ASYNCH_ASYNCH(value) (EIC_ASYNCH_ASYNCH_Msk & ((value) << EIC_ASYNCH_ASYNCH_Pos))
  237. #define EIC_ASYNCH_MASK _U_(0xFF) /**< \deprecated (EIC_ASYNCH) Register MASK (Use EIC_ASYNCH_Msk instead) */
  238. #define EIC_ASYNCH_Msk _U_(0xFF) /**< (EIC_ASYNCH) Register Mask */
  239. /* -------- EIC_CONFIG : (EIC Offset: 0x1c) (R/W 32) External Interrupt Sense Configuration -------- */
  240. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  241. typedef union {
  242. struct {
  243. uint32_t SENSE0:3; /**< bit: 0..2 Input Sense Configuration 0 */
  244. uint32_t FILTEN0:1; /**< bit: 3 Filter Enable 0 */
  245. uint32_t SENSE1:3; /**< bit: 4..6 Input Sense Configuration 1 */
  246. uint32_t FILTEN1:1; /**< bit: 7 Filter Enable 1 */
  247. uint32_t SENSE2:3; /**< bit: 8..10 Input Sense Configuration 2 */
  248. uint32_t FILTEN2:1; /**< bit: 11 Filter Enable 2 */
  249. uint32_t SENSE3:3; /**< bit: 12..14 Input Sense Configuration 3 */
  250. uint32_t FILTEN3:1; /**< bit: 15 Filter Enable 3 */
  251. uint32_t SENSE4:3; /**< bit: 16..18 Input Sense Configuration 4 */
  252. uint32_t FILTEN4:1; /**< bit: 19 Filter Enable 4 */
  253. uint32_t SENSE5:3; /**< bit: 20..22 Input Sense Configuration 5 */
  254. uint32_t FILTEN5:1; /**< bit: 23 Filter Enable 5 */
  255. uint32_t SENSE6:3; /**< bit: 24..26 Input Sense Configuration 6 */
  256. uint32_t FILTEN6:1; /**< bit: 27 Filter Enable 6 */
  257. uint32_t SENSE7:3; /**< bit: 28..30 Input Sense Configuration 7 */
  258. uint32_t FILTEN7:1; /**< bit: 31 Filter Enable 7 */
  259. } bit; /**< Structure used for bit access */
  260. uint32_t reg; /**< Type used for register access */
  261. } EIC_CONFIG_Type;
  262. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  263. #define EIC_CONFIG_OFFSET (0x1C) /**< (EIC_CONFIG) External Interrupt Sense Configuration Offset */
  264. #define EIC_CONFIG_RESETVALUE _U_(0x00) /**< (EIC_CONFIG) External Interrupt Sense Configuration Reset Value */
  265. #define EIC_CONFIG_SENSE0_Pos 0 /**< (EIC_CONFIG) Input Sense Configuration 0 Position */
  266. #define EIC_CONFIG_SENSE0_Msk (_U_(0x7) << EIC_CONFIG_SENSE0_Pos) /**< (EIC_CONFIG) Input Sense Configuration 0 Mask */
  267. #define EIC_CONFIG_SENSE0(value) (EIC_CONFIG_SENSE0_Msk & ((value) << EIC_CONFIG_SENSE0_Pos))
  268. #define EIC_CONFIG_SENSE0_NONE_Val _U_(0x0) /**< (EIC_CONFIG) No detection */
  269. #define EIC_CONFIG_SENSE0_RISE_Val _U_(0x1) /**< (EIC_CONFIG) Rising edge detection */
  270. #define EIC_CONFIG_SENSE0_FALL_Val _U_(0x2) /**< (EIC_CONFIG) Falling edge detection */
  271. #define EIC_CONFIG_SENSE0_BOTH_Val _U_(0x3) /**< (EIC_CONFIG) Both edges detection */
  272. #define EIC_CONFIG_SENSE0_HIGH_Val _U_(0x4) /**< (EIC_CONFIG) High level detection */
  273. #define EIC_CONFIG_SENSE0_LOW_Val _U_(0x5) /**< (EIC_CONFIG) Low level detection */
  274. #define EIC_CONFIG_SENSE0_NONE (EIC_CONFIG_SENSE0_NONE_Val << EIC_CONFIG_SENSE0_Pos) /**< (EIC_CONFIG) No detection Position */
  275. #define EIC_CONFIG_SENSE0_RISE (EIC_CONFIG_SENSE0_RISE_Val << EIC_CONFIG_SENSE0_Pos) /**< (EIC_CONFIG) Rising edge detection Position */
  276. #define EIC_CONFIG_SENSE0_FALL (EIC_CONFIG_SENSE0_FALL_Val << EIC_CONFIG_SENSE0_Pos) /**< (EIC_CONFIG) Falling edge detection Position */
  277. #define EIC_CONFIG_SENSE0_BOTH (EIC_CONFIG_SENSE0_BOTH_Val << EIC_CONFIG_SENSE0_Pos) /**< (EIC_CONFIG) Both edges detection Position */
  278. #define EIC_CONFIG_SENSE0_HIGH (EIC_CONFIG_SENSE0_HIGH_Val << EIC_CONFIG_SENSE0_Pos) /**< (EIC_CONFIG) High level detection Position */
  279. #define EIC_CONFIG_SENSE0_LOW (EIC_CONFIG_SENSE0_LOW_Val << EIC_CONFIG_SENSE0_Pos) /**< (EIC_CONFIG) Low level detection Position */
  280. #define EIC_CONFIG_FILTEN0_Pos 3 /**< (EIC_CONFIG) Filter Enable 0 Position */
  281. #define EIC_CONFIG_FILTEN0_Msk (_U_(0x1) << EIC_CONFIG_FILTEN0_Pos) /**< (EIC_CONFIG) Filter Enable 0 Mask */
  282. #define EIC_CONFIG_FILTEN0 EIC_CONFIG_FILTEN0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CONFIG_FILTEN0_Msk instead */
  283. #define EIC_CONFIG_SENSE1_Pos 4 /**< (EIC_CONFIG) Input Sense Configuration 1 Position */
  284. #define EIC_CONFIG_SENSE1_Msk (_U_(0x7) << EIC_CONFIG_SENSE1_Pos) /**< (EIC_CONFIG) Input Sense Configuration 1 Mask */
  285. #define EIC_CONFIG_SENSE1(value) (EIC_CONFIG_SENSE1_Msk & ((value) << EIC_CONFIG_SENSE1_Pos))
  286. #define EIC_CONFIG_SENSE1_NONE_Val _U_(0x0) /**< (EIC_CONFIG) No detection */
  287. #define EIC_CONFIG_SENSE1_RISE_Val _U_(0x1) /**< (EIC_CONFIG) Rising edge detection */
  288. #define EIC_CONFIG_SENSE1_FALL_Val _U_(0x2) /**< (EIC_CONFIG) Falling edge detection */
  289. #define EIC_CONFIG_SENSE1_BOTH_Val _U_(0x3) /**< (EIC_CONFIG) Both edges detection */
  290. #define EIC_CONFIG_SENSE1_HIGH_Val _U_(0x4) /**< (EIC_CONFIG) High level detection */
  291. #define EIC_CONFIG_SENSE1_LOW_Val _U_(0x5) /**< (EIC_CONFIG) Low level detection */
  292. #define EIC_CONFIG_SENSE1_NONE (EIC_CONFIG_SENSE1_NONE_Val << EIC_CONFIG_SENSE1_Pos) /**< (EIC_CONFIG) No detection Position */
  293. #define EIC_CONFIG_SENSE1_RISE (EIC_CONFIG_SENSE1_RISE_Val << EIC_CONFIG_SENSE1_Pos) /**< (EIC_CONFIG) Rising edge detection Position */
  294. #define EIC_CONFIG_SENSE1_FALL (EIC_CONFIG_SENSE1_FALL_Val << EIC_CONFIG_SENSE1_Pos) /**< (EIC_CONFIG) Falling edge detection Position */
  295. #define EIC_CONFIG_SENSE1_BOTH (EIC_CONFIG_SENSE1_BOTH_Val << EIC_CONFIG_SENSE1_Pos) /**< (EIC_CONFIG) Both edges detection Position */
  296. #define EIC_CONFIG_SENSE1_HIGH (EIC_CONFIG_SENSE1_HIGH_Val << EIC_CONFIG_SENSE1_Pos) /**< (EIC_CONFIG) High level detection Position */
  297. #define EIC_CONFIG_SENSE1_LOW (EIC_CONFIG_SENSE1_LOW_Val << EIC_CONFIG_SENSE1_Pos) /**< (EIC_CONFIG) Low level detection Position */
  298. #define EIC_CONFIG_FILTEN1_Pos 7 /**< (EIC_CONFIG) Filter Enable 1 Position */
  299. #define EIC_CONFIG_FILTEN1_Msk (_U_(0x1) << EIC_CONFIG_FILTEN1_Pos) /**< (EIC_CONFIG) Filter Enable 1 Mask */
  300. #define EIC_CONFIG_FILTEN1 EIC_CONFIG_FILTEN1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CONFIG_FILTEN1_Msk instead */
  301. #define EIC_CONFIG_SENSE2_Pos 8 /**< (EIC_CONFIG) Input Sense Configuration 2 Position */
  302. #define EIC_CONFIG_SENSE2_Msk (_U_(0x7) << EIC_CONFIG_SENSE2_Pos) /**< (EIC_CONFIG) Input Sense Configuration 2 Mask */
  303. #define EIC_CONFIG_SENSE2(value) (EIC_CONFIG_SENSE2_Msk & ((value) << EIC_CONFIG_SENSE2_Pos))
  304. #define EIC_CONFIG_SENSE2_NONE_Val _U_(0x0) /**< (EIC_CONFIG) No detection */
  305. #define EIC_CONFIG_SENSE2_RISE_Val _U_(0x1) /**< (EIC_CONFIG) Rising edge detection */
  306. #define EIC_CONFIG_SENSE2_FALL_Val _U_(0x2) /**< (EIC_CONFIG) Falling edge detection */
  307. #define EIC_CONFIG_SENSE2_BOTH_Val _U_(0x3) /**< (EIC_CONFIG) Both edges detection */
  308. #define EIC_CONFIG_SENSE2_HIGH_Val _U_(0x4) /**< (EIC_CONFIG) High level detection */
  309. #define EIC_CONFIG_SENSE2_LOW_Val _U_(0x5) /**< (EIC_CONFIG) Low level detection */
  310. #define EIC_CONFIG_SENSE2_NONE (EIC_CONFIG_SENSE2_NONE_Val << EIC_CONFIG_SENSE2_Pos) /**< (EIC_CONFIG) No detection Position */
  311. #define EIC_CONFIG_SENSE2_RISE (EIC_CONFIG_SENSE2_RISE_Val << EIC_CONFIG_SENSE2_Pos) /**< (EIC_CONFIG) Rising edge detection Position */
  312. #define EIC_CONFIG_SENSE2_FALL (EIC_CONFIG_SENSE2_FALL_Val << EIC_CONFIG_SENSE2_Pos) /**< (EIC_CONFIG) Falling edge detection Position */
  313. #define EIC_CONFIG_SENSE2_BOTH (EIC_CONFIG_SENSE2_BOTH_Val << EIC_CONFIG_SENSE2_Pos) /**< (EIC_CONFIG) Both edges detection Position */
  314. #define EIC_CONFIG_SENSE2_HIGH (EIC_CONFIG_SENSE2_HIGH_Val << EIC_CONFIG_SENSE2_Pos) /**< (EIC_CONFIG) High level detection Position */
  315. #define EIC_CONFIG_SENSE2_LOW (EIC_CONFIG_SENSE2_LOW_Val << EIC_CONFIG_SENSE2_Pos) /**< (EIC_CONFIG) Low level detection Position */
  316. #define EIC_CONFIG_FILTEN2_Pos 11 /**< (EIC_CONFIG) Filter Enable 2 Position */
  317. #define EIC_CONFIG_FILTEN2_Msk (_U_(0x1) << EIC_CONFIG_FILTEN2_Pos) /**< (EIC_CONFIG) Filter Enable 2 Mask */
  318. #define EIC_CONFIG_FILTEN2 EIC_CONFIG_FILTEN2_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CONFIG_FILTEN2_Msk instead */
  319. #define EIC_CONFIG_SENSE3_Pos 12 /**< (EIC_CONFIG) Input Sense Configuration 3 Position */
  320. #define EIC_CONFIG_SENSE3_Msk (_U_(0x7) << EIC_CONFIG_SENSE3_Pos) /**< (EIC_CONFIG) Input Sense Configuration 3 Mask */
  321. #define EIC_CONFIG_SENSE3(value) (EIC_CONFIG_SENSE3_Msk & ((value) << EIC_CONFIG_SENSE3_Pos))
  322. #define EIC_CONFIG_SENSE3_NONE_Val _U_(0x0) /**< (EIC_CONFIG) No detection */
  323. #define EIC_CONFIG_SENSE3_RISE_Val _U_(0x1) /**< (EIC_CONFIG) Rising edge detection */
  324. #define EIC_CONFIG_SENSE3_FALL_Val _U_(0x2) /**< (EIC_CONFIG) Falling edge detection */
  325. #define EIC_CONFIG_SENSE3_BOTH_Val _U_(0x3) /**< (EIC_CONFIG) Both edges detection */
  326. #define EIC_CONFIG_SENSE3_HIGH_Val _U_(0x4) /**< (EIC_CONFIG) High level detection */
  327. #define EIC_CONFIG_SENSE3_LOW_Val _U_(0x5) /**< (EIC_CONFIG) Low level detection */
  328. #define EIC_CONFIG_SENSE3_NONE (EIC_CONFIG_SENSE3_NONE_Val << EIC_CONFIG_SENSE3_Pos) /**< (EIC_CONFIG) No detection Position */
  329. #define EIC_CONFIG_SENSE3_RISE (EIC_CONFIG_SENSE3_RISE_Val << EIC_CONFIG_SENSE3_Pos) /**< (EIC_CONFIG) Rising edge detection Position */
  330. #define EIC_CONFIG_SENSE3_FALL (EIC_CONFIG_SENSE3_FALL_Val << EIC_CONFIG_SENSE3_Pos) /**< (EIC_CONFIG) Falling edge detection Position */
  331. #define EIC_CONFIG_SENSE3_BOTH (EIC_CONFIG_SENSE3_BOTH_Val << EIC_CONFIG_SENSE3_Pos) /**< (EIC_CONFIG) Both edges detection Position */
  332. #define EIC_CONFIG_SENSE3_HIGH (EIC_CONFIG_SENSE3_HIGH_Val << EIC_CONFIG_SENSE3_Pos) /**< (EIC_CONFIG) High level detection Position */
  333. #define EIC_CONFIG_SENSE3_LOW (EIC_CONFIG_SENSE3_LOW_Val << EIC_CONFIG_SENSE3_Pos) /**< (EIC_CONFIG) Low level detection Position */
  334. #define EIC_CONFIG_FILTEN3_Pos 15 /**< (EIC_CONFIG) Filter Enable 3 Position */
  335. #define EIC_CONFIG_FILTEN3_Msk (_U_(0x1) << EIC_CONFIG_FILTEN3_Pos) /**< (EIC_CONFIG) Filter Enable 3 Mask */
  336. #define EIC_CONFIG_FILTEN3 EIC_CONFIG_FILTEN3_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CONFIG_FILTEN3_Msk instead */
  337. #define EIC_CONFIG_SENSE4_Pos 16 /**< (EIC_CONFIG) Input Sense Configuration 4 Position */
  338. #define EIC_CONFIG_SENSE4_Msk (_U_(0x7) << EIC_CONFIG_SENSE4_Pos) /**< (EIC_CONFIG) Input Sense Configuration 4 Mask */
  339. #define EIC_CONFIG_SENSE4(value) (EIC_CONFIG_SENSE4_Msk & ((value) << EIC_CONFIG_SENSE4_Pos))
  340. #define EIC_CONFIG_SENSE4_NONE_Val _U_(0x0) /**< (EIC_CONFIG) No detection */
  341. #define EIC_CONFIG_SENSE4_RISE_Val _U_(0x1) /**< (EIC_CONFIG) Rising edge detection */
  342. #define EIC_CONFIG_SENSE4_FALL_Val _U_(0x2) /**< (EIC_CONFIG) Falling edge detection */
  343. #define EIC_CONFIG_SENSE4_BOTH_Val _U_(0x3) /**< (EIC_CONFIG) Both edges detection */
  344. #define EIC_CONFIG_SENSE4_HIGH_Val _U_(0x4) /**< (EIC_CONFIG) High level detection */
  345. #define EIC_CONFIG_SENSE4_LOW_Val _U_(0x5) /**< (EIC_CONFIG) Low level detection */
  346. #define EIC_CONFIG_SENSE4_NONE (EIC_CONFIG_SENSE4_NONE_Val << EIC_CONFIG_SENSE4_Pos) /**< (EIC_CONFIG) No detection Position */
  347. #define EIC_CONFIG_SENSE4_RISE (EIC_CONFIG_SENSE4_RISE_Val << EIC_CONFIG_SENSE4_Pos) /**< (EIC_CONFIG) Rising edge detection Position */
  348. #define EIC_CONFIG_SENSE4_FALL (EIC_CONFIG_SENSE4_FALL_Val << EIC_CONFIG_SENSE4_Pos) /**< (EIC_CONFIG) Falling edge detection Position */
  349. #define EIC_CONFIG_SENSE4_BOTH (EIC_CONFIG_SENSE4_BOTH_Val << EIC_CONFIG_SENSE4_Pos) /**< (EIC_CONFIG) Both edges detection Position */
  350. #define EIC_CONFIG_SENSE4_HIGH (EIC_CONFIG_SENSE4_HIGH_Val << EIC_CONFIG_SENSE4_Pos) /**< (EIC_CONFIG) High level detection Position */
  351. #define EIC_CONFIG_SENSE4_LOW (EIC_CONFIG_SENSE4_LOW_Val << EIC_CONFIG_SENSE4_Pos) /**< (EIC_CONFIG) Low level detection Position */
  352. #define EIC_CONFIG_FILTEN4_Pos 19 /**< (EIC_CONFIG) Filter Enable 4 Position */
  353. #define EIC_CONFIG_FILTEN4_Msk (_U_(0x1) << EIC_CONFIG_FILTEN4_Pos) /**< (EIC_CONFIG) Filter Enable 4 Mask */
  354. #define EIC_CONFIG_FILTEN4 EIC_CONFIG_FILTEN4_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CONFIG_FILTEN4_Msk instead */
  355. #define EIC_CONFIG_SENSE5_Pos 20 /**< (EIC_CONFIG) Input Sense Configuration 5 Position */
  356. #define EIC_CONFIG_SENSE5_Msk (_U_(0x7) << EIC_CONFIG_SENSE5_Pos) /**< (EIC_CONFIG) Input Sense Configuration 5 Mask */
  357. #define EIC_CONFIG_SENSE5(value) (EIC_CONFIG_SENSE5_Msk & ((value) << EIC_CONFIG_SENSE5_Pos))
  358. #define EIC_CONFIG_SENSE5_NONE_Val _U_(0x0) /**< (EIC_CONFIG) No detection */
  359. #define EIC_CONFIG_SENSE5_RISE_Val _U_(0x1) /**< (EIC_CONFIG) Rising edge detection */
  360. #define EIC_CONFIG_SENSE5_FALL_Val _U_(0x2) /**< (EIC_CONFIG) Falling edge detection */
  361. #define EIC_CONFIG_SENSE5_BOTH_Val _U_(0x3) /**< (EIC_CONFIG) Both edges detection */
  362. #define EIC_CONFIG_SENSE5_HIGH_Val _U_(0x4) /**< (EIC_CONFIG) High level detection */
  363. #define EIC_CONFIG_SENSE5_LOW_Val _U_(0x5) /**< (EIC_CONFIG) Low level detection */
  364. #define EIC_CONFIG_SENSE5_NONE (EIC_CONFIG_SENSE5_NONE_Val << EIC_CONFIG_SENSE5_Pos) /**< (EIC_CONFIG) No detection Position */
  365. #define EIC_CONFIG_SENSE5_RISE (EIC_CONFIG_SENSE5_RISE_Val << EIC_CONFIG_SENSE5_Pos) /**< (EIC_CONFIG) Rising edge detection Position */
  366. #define EIC_CONFIG_SENSE5_FALL (EIC_CONFIG_SENSE5_FALL_Val << EIC_CONFIG_SENSE5_Pos) /**< (EIC_CONFIG) Falling edge detection Position */
  367. #define EIC_CONFIG_SENSE5_BOTH (EIC_CONFIG_SENSE5_BOTH_Val << EIC_CONFIG_SENSE5_Pos) /**< (EIC_CONFIG) Both edges detection Position */
  368. #define EIC_CONFIG_SENSE5_HIGH (EIC_CONFIG_SENSE5_HIGH_Val << EIC_CONFIG_SENSE5_Pos) /**< (EIC_CONFIG) High level detection Position */
  369. #define EIC_CONFIG_SENSE5_LOW (EIC_CONFIG_SENSE5_LOW_Val << EIC_CONFIG_SENSE5_Pos) /**< (EIC_CONFIG) Low level detection Position */
  370. #define EIC_CONFIG_FILTEN5_Pos 23 /**< (EIC_CONFIG) Filter Enable 5 Position */
  371. #define EIC_CONFIG_FILTEN5_Msk (_U_(0x1) << EIC_CONFIG_FILTEN5_Pos) /**< (EIC_CONFIG) Filter Enable 5 Mask */
  372. #define EIC_CONFIG_FILTEN5 EIC_CONFIG_FILTEN5_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CONFIG_FILTEN5_Msk instead */
  373. #define EIC_CONFIG_SENSE6_Pos 24 /**< (EIC_CONFIG) Input Sense Configuration 6 Position */
  374. #define EIC_CONFIG_SENSE6_Msk (_U_(0x7) << EIC_CONFIG_SENSE6_Pos) /**< (EIC_CONFIG) Input Sense Configuration 6 Mask */
  375. #define EIC_CONFIG_SENSE6(value) (EIC_CONFIG_SENSE6_Msk & ((value) << EIC_CONFIG_SENSE6_Pos))
  376. #define EIC_CONFIG_SENSE6_NONE_Val _U_(0x0) /**< (EIC_CONFIG) No detection */
  377. #define EIC_CONFIG_SENSE6_RISE_Val _U_(0x1) /**< (EIC_CONFIG) Rising edge detection */
  378. #define EIC_CONFIG_SENSE6_FALL_Val _U_(0x2) /**< (EIC_CONFIG) Falling edge detection */
  379. #define EIC_CONFIG_SENSE6_BOTH_Val _U_(0x3) /**< (EIC_CONFIG) Both edges detection */
  380. #define EIC_CONFIG_SENSE6_HIGH_Val _U_(0x4) /**< (EIC_CONFIG) High level detection */
  381. #define EIC_CONFIG_SENSE6_LOW_Val _U_(0x5) /**< (EIC_CONFIG) Low level detection */
  382. #define EIC_CONFIG_SENSE6_NONE (EIC_CONFIG_SENSE6_NONE_Val << EIC_CONFIG_SENSE6_Pos) /**< (EIC_CONFIG) No detection Position */
  383. #define EIC_CONFIG_SENSE6_RISE (EIC_CONFIG_SENSE6_RISE_Val << EIC_CONFIG_SENSE6_Pos) /**< (EIC_CONFIG) Rising edge detection Position */
  384. #define EIC_CONFIG_SENSE6_FALL (EIC_CONFIG_SENSE6_FALL_Val << EIC_CONFIG_SENSE6_Pos) /**< (EIC_CONFIG) Falling edge detection Position */
  385. #define EIC_CONFIG_SENSE6_BOTH (EIC_CONFIG_SENSE6_BOTH_Val << EIC_CONFIG_SENSE6_Pos) /**< (EIC_CONFIG) Both edges detection Position */
  386. #define EIC_CONFIG_SENSE6_HIGH (EIC_CONFIG_SENSE6_HIGH_Val << EIC_CONFIG_SENSE6_Pos) /**< (EIC_CONFIG) High level detection Position */
  387. #define EIC_CONFIG_SENSE6_LOW (EIC_CONFIG_SENSE6_LOW_Val << EIC_CONFIG_SENSE6_Pos) /**< (EIC_CONFIG) Low level detection Position */
  388. #define EIC_CONFIG_FILTEN6_Pos 27 /**< (EIC_CONFIG) Filter Enable 6 Position */
  389. #define EIC_CONFIG_FILTEN6_Msk (_U_(0x1) << EIC_CONFIG_FILTEN6_Pos) /**< (EIC_CONFIG) Filter Enable 6 Mask */
  390. #define EIC_CONFIG_FILTEN6 EIC_CONFIG_FILTEN6_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CONFIG_FILTEN6_Msk instead */
  391. #define EIC_CONFIG_SENSE7_Pos 28 /**< (EIC_CONFIG) Input Sense Configuration 7 Position */
  392. #define EIC_CONFIG_SENSE7_Msk (_U_(0x7) << EIC_CONFIG_SENSE7_Pos) /**< (EIC_CONFIG) Input Sense Configuration 7 Mask */
  393. #define EIC_CONFIG_SENSE7(value) (EIC_CONFIG_SENSE7_Msk & ((value) << EIC_CONFIG_SENSE7_Pos))
  394. #define EIC_CONFIG_SENSE7_NONE_Val _U_(0x0) /**< (EIC_CONFIG) No detection */
  395. #define EIC_CONFIG_SENSE7_RISE_Val _U_(0x1) /**< (EIC_CONFIG) Rising edge detection */
  396. #define EIC_CONFIG_SENSE7_FALL_Val _U_(0x2) /**< (EIC_CONFIG) Falling edge detection */
  397. #define EIC_CONFIG_SENSE7_BOTH_Val _U_(0x3) /**< (EIC_CONFIG) Both edges detection */
  398. #define EIC_CONFIG_SENSE7_HIGH_Val _U_(0x4) /**< (EIC_CONFIG) High level detection */
  399. #define EIC_CONFIG_SENSE7_LOW_Val _U_(0x5) /**< (EIC_CONFIG) Low level detection */
  400. #define EIC_CONFIG_SENSE7_NONE (EIC_CONFIG_SENSE7_NONE_Val << EIC_CONFIG_SENSE7_Pos) /**< (EIC_CONFIG) No detection Position */
  401. #define EIC_CONFIG_SENSE7_RISE (EIC_CONFIG_SENSE7_RISE_Val << EIC_CONFIG_SENSE7_Pos) /**< (EIC_CONFIG) Rising edge detection Position */
  402. #define EIC_CONFIG_SENSE7_FALL (EIC_CONFIG_SENSE7_FALL_Val << EIC_CONFIG_SENSE7_Pos) /**< (EIC_CONFIG) Falling edge detection Position */
  403. #define EIC_CONFIG_SENSE7_BOTH (EIC_CONFIG_SENSE7_BOTH_Val << EIC_CONFIG_SENSE7_Pos) /**< (EIC_CONFIG) Both edges detection Position */
  404. #define EIC_CONFIG_SENSE7_HIGH (EIC_CONFIG_SENSE7_HIGH_Val << EIC_CONFIG_SENSE7_Pos) /**< (EIC_CONFIG) High level detection Position */
  405. #define EIC_CONFIG_SENSE7_LOW (EIC_CONFIG_SENSE7_LOW_Val << EIC_CONFIG_SENSE7_Pos) /**< (EIC_CONFIG) Low level detection Position */
  406. #define EIC_CONFIG_FILTEN7_Pos 31 /**< (EIC_CONFIG) Filter Enable 7 Position */
  407. #define EIC_CONFIG_FILTEN7_Msk (_U_(0x1) << EIC_CONFIG_FILTEN7_Pos) /**< (EIC_CONFIG) Filter Enable 7 Mask */
  408. #define EIC_CONFIG_FILTEN7 EIC_CONFIG_FILTEN7_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_CONFIG_FILTEN7_Msk instead */
  409. #define EIC_CONFIG_MASK _U_(0xFFFFFFFF) /**< \deprecated (EIC_CONFIG) Register MASK (Use EIC_CONFIG_Msk instead) */
  410. #define EIC_CONFIG_Msk _U_(0xFFFFFFFF) /**< (EIC_CONFIG) Register Mask */
  411. /* -------- EIC_DEBOUNCEN : (EIC Offset: 0x30) (R/W 32) Debouncer Enable -------- */
  412. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  413. typedef union {
  414. struct {
  415. uint32_t DEBOUNCEN:8; /**< bit: 0..7 Debouncer Enable */
  416. uint32_t :24; /**< bit: 8..31 Reserved */
  417. } bit; /**< Structure used for bit access */
  418. uint32_t reg; /**< Type used for register access */
  419. } EIC_DEBOUNCEN_Type;
  420. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  421. #define EIC_DEBOUNCEN_OFFSET (0x30) /**< (EIC_DEBOUNCEN) Debouncer Enable Offset */
  422. #define EIC_DEBOUNCEN_RESETVALUE _U_(0x00) /**< (EIC_DEBOUNCEN) Debouncer Enable Reset Value */
  423. #define EIC_DEBOUNCEN_DEBOUNCEN_Pos 0 /**< (EIC_DEBOUNCEN) Debouncer Enable Position */
  424. #define EIC_DEBOUNCEN_DEBOUNCEN_Msk (_U_(0xFF) << EIC_DEBOUNCEN_DEBOUNCEN_Pos) /**< (EIC_DEBOUNCEN) Debouncer Enable Mask */
  425. #define EIC_DEBOUNCEN_DEBOUNCEN(value) (EIC_DEBOUNCEN_DEBOUNCEN_Msk & ((value) << EIC_DEBOUNCEN_DEBOUNCEN_Pos))
  426. #define EIC_DEBOUNCEN_MASK _U_(0xFF) /**< \deprecated (EIC_DEBOUNCEN) Register MASK (Use EIC_DEBOUNCEN_Msk instead) */
  427. #define EIC_DEBOUNCEN_Msk _U_(0xFF) /**< (EIC_DEBOUNCEN) Register Mask */
  428. /* -------- EIC_DPRESCALER : (EIC Offset: 0x34) (R/W 32) Debouncer Prescaler -------- */
  429. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  430. typedef union {
  431. struct {
  432. uint32_t PRESCALER0:3; /**< bit: 0..2 Debouncer Prescaler */
  433. uint32_t STATES0:1; /**< bit: 3 Debouncer number of states */
  434. uint32_t :12; /**< bit: 4..15 Reserved */
  435. uint32_t TICKON:1; /**< bit: 16 Pin Sampler frequency selection */
  436. uint32_t :15; /**< bit: 17..31 Reserved */
  437. } bit; /**< Structure used for bit access */
  438. struct {
  439. uint32_t :3; /**< bit: 0..2 Reserved */
  440. uint32_t STATES:1; /**< bit: 3 Debouncer number of states */
  441. uint32_t :28; /**< bit: 4..31 Reserved */
  442. } vec; /**< Structure used for vec access */
  443. uint32_t reg; /**< Type used for register access */
  444. } EIC_DPRESCALER_Type;
  445. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  446. #define EIC_DPRESCALER_OFFSET (0x34) /**< (EIC_DPRESCALER) Debouncer Prescaler Offset */
  447. #define EIC_DPRESCALER_RESETVALUE _U_(0x00) /**< (EIC_DPRESCALER) Debouncer Prescaler Reset Value */
  448. #define EIC_DPRESCALER_PRESCALER0_Pos 0 /**< (EIC_DPRESCALER) Debouncer Prescaler Position */
  449. #define EIC_DPRESCALER_PRESCALER0_Msk (_U_(0x7) << EIC_DPRESCALER_PRESCALER0_Pos) /**< (EIC_DPRESCALER) Debouncer Prescaler Mask */
  450. #define EIC_DPRESCALER_PRESCALER0(value) (EIC_DPRESCALER_PRESCALER0_Msk & ((value) << EIC_DPRESCALER_PRESCALER0_Pos))
  451. #define EIC_DPRESCALER_STATES0_Pos 3 /**< (EIC_DPRESCALER) Debouncer number of states Position */
  452. #define EIC_DPRESCALER_STATES0_Msk (_U_(0x1) << EIC_DPRESCALER_STATES0_Pos) /**< (EIC_DPRESCALER) Debouncer number of states Mask */
  453. #define EIC_DPRESCALER_STATES0 EIC_DPRESCALER_STATES0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_DPRESCALER_STATES0_Msk instead */
  454. #define EIC_DPRESCALER_TICKON_Pos 16 /**< (EIC_DPRESCALER) Pin Sampler frequency selection Position */
  455. #define EIC_DPRESCALER_TICKON_Msk (_U_(0x1) << EIC_DPRESCALER_TICKON_Pos) /**< (EIC_DPRESCALER) Pin Sampler frequency selection Mask */
  456. #define EIC_DPRESCALER_TICKON EIC_DPRESCALER_TICKON_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_DPRESCALER_TICKON_Msk instead */
  457. #define EIC_DPRESCALER_MASK _U_(0x1000F) /**< \deprecated (EIC_DPRESCALER) Register MASK (Use EIC_DPRESCALER_Msk instead) */
  458. #define EIC_DPRESCALER_Msk _U_(0x1000F) /**< (EIC_DPRESCALER) Register Mask */
  459. #define EIC_DPRESCALER_STATES_Pos 3 /**< (EIC_DPRESCALER Position) Debouncer number of states */
  460. #define EIC_DPRESCALER_STATES_Msk (_U_(0x1) << EIC_DPRESCALER_STATES_Pos) /**< (EIC_DPRESCALER Mask) STATES */
  461. #define EIC_DPRESCALER_STATES(value) (EIC_DPRESCALER_STATES_Msk & ((value) << EIC_DPRESCALER_STATES_Pos))
  462. /* -------- EIC_PINSTATE : (EIC Offset: 0x38) (R/ 32) Pin State -------- */
  463. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  464. typedef union {
  465. struct {
  466. uint32_t PINSTATE:8; /**< bit: 0..7 Pin State */
  467. uint32_t :24; /**< bit: 8..31 Reserved */
  468. } bit; /**< Structure used for bit access */
  469. uint32_t reg; /**< Type used for register access */
  470. } EIC_PINSTATE_Type;
  471. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  472. #define EIC_PINSTATE_OFFSET (0x38) /**< (EIC_PINSTATE) Pin State Offset */
  473. #define EIC_PINSTATE_RESETVALUE _U_(0x00) /**< (EIC_PINSTATE) Pin State Reset Value */
  474. #define EIC_PINSTATE_PINSTATE_Pos 0 /**< (EIC_PINSTATE) Pin State Position */
  475. #define EIC_PINSTATE_PINSTATE_Msk (_U_(0xFF) << EIC_PINSTATE_PINSTATE_Pos) /**< (EIC_PINSTATE) Pin State Mask */
  476. #define EIC_PINSTATE_PINSTATE(value) (EIC_PINSTATE_PINSTATE_Msk & ((value) << EIC_PINSTATE_PINSTATE_Pos))
  477. #define EIC_PINSTATE_MASK _U_(0xFF) /**< \deprecated (EIC_PINSTATE) Register MASK (Use EIC_PINSTATE_Msk instead) */
  478. #define EIC_PINSTATE_Msk _U_(0xFF) /**< (EIC_PINSTATE) Register Mask */
  479. /* -------- EIC_NSCHK : (EIC Offset: 0x3c) (R/W 32) Non-secure Interrupt Check Enable -------- */
  480. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  481. typedef union {
  482. struct {
  483. uint32_t EXTINT:8; /**< bit: 0..7 External Interrupt Nonsecure Check Enable */
  484. uint32_t :23; /**< bit: 8..30 Reserved */
  485. uint32_t NMI:1; /**< bit: 31 Non-Maskable External Interrupt Nonsecure Check Enable */
  486. } bit; /**< Structure used for bit access */
  487. uint32_t reg; /**< Type used for register access */
  488. } EIC_NSCHK_Type;
  489. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  490. #define EIC_NSCHK_OFFSET (0x3C) /**< (EIC_NSCHK) Non-secure Interrupt Check Enable Offset */
  491. #define EIC_NSCHK_RESETVALUE _U_(0x00) /**< (EIC_NSCHK) Non-secure Interrupt Check Enable Reset Value */
  492. #define EIC_NSCHK_EXTINT_Pos 0 /**< (EIC_NSCHK) External Interrupt Nonsecure Check Enable Position */
  493. #define EIC_NSCHK_EXTINT_Msk (_U_(0xFF) << EIC_NSCHK_EXTINT_Pos) /**< (EIC_NSCHK) External Interrupt Nonsecure Check Enable Mask */
  494. #define EIC_NSCHK_EXTINT(value) (EIC_NSCHK_EXTINT_Msk & ((value) << EIC_NSCHK_EXTINT_Pos))
  495. #define EIC_NSCHK_NMI_Pos 31 /**< (EIC_NSCHK) Non-Maskable External Interrupt Nonsecure Check Enable Position */
  496. #define EIC_NSCHK_NMI_Msk (_U_(0x1) << EIC_NSCHK_NMI_Pos) /**< (EIC_NSCHK) Non-Maskable External Interrupt Nonsecure Check Enable Mask */
  497. #define EIC_NSCHK_NMI EIC_NSCHK_NMI_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_NSCHK_NMI_Msk instead */
  498. #define EIC_NSCHK_MASK _U_(0x800000FF) /**< \deprecated (EIC_NSCHK) Register MASK (Use EIC_NSCHK_Msk instead) */
  499. #define EIC_NSCHK_Msk _U_(0x800000FF) /**< (EIC_NSCHK) Register Mask */
  500. /* -------- EIC_NONSEC : (EIC Offset: 0x40) (R/W 32) Non-secure Interrupt -------- */
  501. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  502. typedef union {
  503. struct {
  504. uint32_t EXTINT:8; /**< bit: 0..7 External Interrupt Nonsecure Enable */
  505. uint32_t :23; /**< bit: 8..30 Reserved */
  506. uint32_t NMI:1; /**< bit: 31 Non-Maskable Interrupt Nonsecure Enable */
  507. } bit; /**< Structure used for bit access */
  508. uint32_t reg; /**< Type used for register access */
  509. } EIC_NONSEC_Type;
  510. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  511. #define EIC_NONSEC_OFFSET (0x40) /**< (EIC_NONSEC) Non-secure Interrupt Offset */
  512. #define EIC_NONSEC_RESETVALUE _U_(0x00) /**< (EIC_NONSEC) Non-secure Interrupt Reset Value */
  513. #define EIC_NONSEC_EXTINT_Pos 0 /**< (EIC_NONSEC) External Interrupt Nonsecure Enable Position */
  514. #define EIC_NONSEC_EXTINT_Msk (_U_(0xFF) << EIC_NONSEC_EXTINT_Pos) /**< (EIC_NONSEC) External Interrupt Nonsecure Enable Mask */
  515. #define EIC_NONSEC_EXTINT(value) (EIC_NONSEC_EXTINT_Msk & ((value) << EIC_NONSEC_EXTINT_Pos))
  516. #define EIC_NONSEC_NMI_Pos 31 /**< (EIC_NONSEC) Non-Maskable Interrupt Nonsecure Enable Position */
  517. #define EIC_NONSEC_NMI_Msk (_U_(0x1) << EIC_NONSEC_NMI_Pos) /**< (EIC_NONSEC) Non-Maskable Interrupt Nonsecure Enable Mask */
  518. #define EIC_NONSEC_NMI EIC_NONSEC_NMI_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use EIC_NONSEC_NMI_Msk instead */
  519. #define EIC_NONSEC_MASK _U_(0x800000FF) /**< \deprecated (EIC_NONSEC) Register MASK (Use EIC_NONSEC_Msk instead) */
  520. #define EIC_NONSEC_Msk _U_(0x800000FF) /**< (EIC_NONSEC) Register Mask */
  521. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  522. /** \brief EIC hardware registers */
  523. typedef struct { /* External Interrupt Controller */
  524. __IO EIC_CTRLA_Type CTRLA; /**< Offset: 0x00 (R/W 8) Control A */
  525. __IO EIC_NMICTRL_Type NMICTRL; /**< Offset: 0x01 (R/W 8) Non-Maskable Interrupt Control */
  526. __IO EIC_NMIFLAG_Type NMIFLAG; /**< Offset: 0x02 (R/W 16) Non-Maskable Interrupt Flag Status and Clear */
  527. __I EIC_SYNCBUSY_Type SYNCBUSY; /**< Offset: 0x04 (R/ 32) Synchronization Busy */
  528. __IO EIC_EVCTRL_Type EVCTRL; /**< Offset: 0x08 (R/W 32) Event Control */
  529. __IO EIC_INTENCLR_Type INTENCLR; /**< Offset: 0x0C (R/W 32) Interrupt Enable Clear */
  530. __IO EIC_INTENSET_Type INTENSET; /**< Offset: 0x10 (R/W 32) Interrupt Enable Set */
  531. __IO EIC_INTFLAG_Type INTFLAG; /**< Offset: 0x14 (R/W 32) Interrupt Flag Status and Clear */
  532. __IO EIC_ASYNCH_Type ASYNCH; /**< Offset: 0x18 (R/W 32) External Interrupt Asynchronous Mode */
  533. __IO EIC_CONFIG_Type CONFIG[1]; /**< Offset: 0x1C (R/W 32) External Interrupt Sense Configuration */
  534. __I uint8_t Reserved1[16];
  535. __IO EIC_DEBOUNCEN_Type DEBOUNCEN; /**< Offset: 0x30 (R/W 32) Debouncer Enable */
  536. __IO EIC_DPRESCALER_Type DPRESCALER; /**< Offset: 0x34 (R/W 32) Debouncer Prescaler */
  537. __I EIC_PINSTATE_Type PINSTATE; /**< Offset: 0x38 (R/ 32) Pin State */
  538. __IO EIC_NSCHK_Type NSCHK; /**< Offset: 0x3C (R/W 32) Non-secure Interrupt Check Enable */
  539. __IO EIC_NONSEC_Type NONSEC; /**< Offset: 0x40 (R/W 32) Non-secure Interrupt */
  540. } Eic;
  541. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  542. /** @} end of External Interrupt Controller */
  543. #endif /* _SAML11_EIC_COMPONENT_H_ */