port.h 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for PORT
  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_PORT_COMPONENT_H_
  31. #define _SAML11_PORT_COMPONENT_H_
  32. #define _SAML11_PORT_COMPONENT_ /**< \deprecated Backward compatibility for ASF */
  33. /** \addtogroup SAML_SAML11 Port Module
  34. * @{
  35. */
  36. /* ========================================================================== */
  37. /** SOFTWARE API DEFINITION FOR PORT */
  38. /* ========================================================================== */
  39. #define PORT_U2210 /**< (PORT) Module ID */
  40. #define REV_PORT 0x300 /**< (PORT) Module revision */
  41. /* -------- PORT_DIR : (PORT Offset: 0x00) (R/W 32) Data Direction -------- */
  42. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  43. typedef union {
  44. struct {
  45. uint32_t DIR:32; /**< bit: 0..31 Port Data Direction */
  46. } bit; /**< Structure used for bit access */
  47. uint32_t reg; /**< Type used for register access */
  48. } PORT_DIR_Type;
  49. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  50. #define PORT_DIR_OFFSET (0x00) /**< (PORT_DIR) Data Direction Offset */
  51. #define PORT_DIR_RESETVALUE _U_(0x00) /**< (PORT_DIR) Data Direction Reset Value */
  52. #define PORT_DIR_DIR_Pos 0 /**< (PORT_DIR) Port Data Direction Position */
  53. #define PORT_DIR_DIR_Msk (_U_(0xFFFFFFFF) << PORT_DIR_DIR_Pos) /**< (PORT_DIR) Port Data Direction Mask */
  54. #define PORT_DIR_DIR(value) (PORT_DIR_DIR_Msk & ((value) << PORT_DIR_DIR_Pos))
  55. #define PORT_DIR_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_DIR) Register MASK (Use PORT_DIR_Msk instead) */
  56. #define PORT_DIR_Msk _U_(0xFFFFFFFF) /**< (PORT_DIR) Register Mask */
  57. /* -------- PORT_DIRCLR : (PORT Offset: 0x04) (R/W 32) Data Direction Clear -------- */
  58. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  59. typedef union {
  60. struct {
  61. uint32_t DIRCLR:32; /**< bit: 0..31 Port Data Direction Clear */
  62. } bit; /**< Structure used for bit access */
  63. uint32_t reg; /**< Type used for register access */
  64. } PORT_DIRCLR_Type;
  65. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  66. #define PORT_DIRCLR_OFFSET (0x04) /**< (PORT_DIRCLR) Data Direction Clear Offset */
  67. #define PORT_DIRCLR_RESETVALUE _U_(0x00) /**< (PORT_DIRCLR) Data Direction Clear Reset Value */
  68. #define PORT_DIRCLR_DIRCLR_Pos 0 /**< (PORT_DIRCLR) Port Data Direction Clear Position */
  69. #define PORT_DIRCLR_DIRCLR_Msk (_U_(0xFFFFFFFF) << PORT_DIRCLR_DIRCLR_Pos) /**< (PORT_DIRCLR) Port Data Direction Clear Mask */
  70. #define PORT_DIRCLR_DIRCLR(value) (PORT_DIRCLR_DIRCLR_Msk & ((value) << PORT_DIRCLR_DIRCLR_Pos))
  71. #define PORT_DIRCLR_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_DIRCLR) Register MASK (Use PORT_DIRCLR_Msk instead) */
  72. #define PORT_DIRCLR_Msk _U_(0xFFFFFFFF) /**< (PORT_DIRCLR) Register Mask */
  73. /* -------- PORT_DIRSET : (PORT Offset: 0x08) (R/W 32) Data Direction Set -------- */
  74. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  75. typedef union {
  76. struct {
  77. uint32_t DIRSET:32; /**< bit: 0..31 Port Data Direction Set */
  78. } bit; /**< Structure used for bit access */
  79. uint32_t reg; /**< Type used for register access */
  80. } PORT_DIRSET_Type;
  81. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  82. #define PORT_DIRSET_OFFSET (0x08) /**< (PORT_DIRSET) Data Direction Set Offset */
  83. #define PORT_DIRSET_RESETVALUE _U_(0x00) /**< (PORT_DIRSET) Data Direction Set Reset Value */
  84. #define PORT_DIRSET_DIRSET_Pos 0 /**< (PORT_DIRSET) Port Data Direction Set Position */
  85. #define PORT_DIRSET_DIRSET_Msk (_U_(0xFFFFFFFF) << PORT_DIRSET_DIRSET_Pos) /**< (PORT_DIRSET) Port Data Direction Set Mask */
  86. #define PORT_DIRSET_DIRSET(value) (PORT_DIRSET_DIRSET_Msk & ((value) << PORT_DIRSET_DIRSET_Pos))
  87. #define PORT_DIRSET_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_DIRSET) Register MASK (Use PORT_DIRSET_Msk instead) */
  88. #define PORT_DIRSET_Msk _U_(0xFFFFFFFF) /**< (PORT_DIRSET) Register Mask */
  89. /* -------- PORT_DIRTGL : (PORT Offset: 0x0c) (R/W 32) Data Direction Toggle -------- */
  90. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  91. typedef union {
  92. struct {
  93. uint32_t DIRTGL:32; /**< bit: 0..31 Port Data Direction Toggle */
  94. } bit; /**< Structure used for bit access */
  95. uint32_t reg; /**< Type used for register access */
  96. } PORT_DIRTGL_Type;
  97. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  98. #define PORT_DIRTGL_OFFSET (0x0C) /**< (PORT_DIRTGL) Data Direction Toggle Offset */
  99. #define PORT_DIRTGL_RESETVALUE _U_(0x00) /**< (PORT_DIRTGL) Data Direction Toggle Reset Value */
  100. #define PORT_DIRTGL_DIRTGL_Pos 0 /**< (PORT_DIRTGL) Port Data Direction Toggle Position */
  101. #define PORT_DIRTGL_DIRTGL_Msk (_U_(0xFFFFFFFF) << PORT_DIRTGL_DIRTGL_Pos) /**< (PORT_DIRTGL) Port Data Direction Toggle Mask */
  102. #define PORT_DIRTGL_DIRTGL(value) (PORT_DIRTGL_DIRTGL_Msk & ((value) << PORT_DIRTGL_DIRTGL_Pos))
  103. #define PORT_DIRTGL_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_DIRTGL) Register MASK (Use PORT_DIRTGL_Msk instead) */
  104. #define PORT_DIRTGL_Msk _U_(0xFFFFFFFF) /**< (PORT_DIRTGL) Register Mask */
  105. /* -------- PORT_OUT : (PORT Offset: 0x10) (R/W 32) Data Output Value -------- */
  106. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  107. typedef union {
  108. struct {
  109. uint32_t OUT:32; /**< bit: 0..31 PORT Data Output Value */
  110. } bit; /**< Structure used for bit access */
  111. uint32_t reg; /**< Type used for register access */
  112. } PORT_OUT_Type;
  113. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  114. #define PORT_OUT_OFFSET (0x10) /**< (PORT_OUT) Data Output Value Offset */
  115. #define PORT_OUT_RESETVALUE _U_(0x00) /**< (PORT_OUT) Data Output Value Reset Value */
  116. #define PORT_OUT_OUT_Pos 0 /**< (PORT_OUT) PORT Data Output Value Position */
  117. #define PORT_OUT_OUT_Msk (_U_(0xFFFFFFFF) << PORT_OUT_OUT_Pos) /**< (PORT_OUT) PORT Data Output Value Mask */
  118. #define PORT_OUT_OUT(value) (PORT_OUT_OUT_Msk & ((value) << PORT_OUT_OUT_Pos))
  119. #define PORT_OUT_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_OUT) Register MASK (Use PORT_OUT_Msk instead) */
  120. #define PORT_OUT_Msk _U_(0xFFFFFFFF) /**< (PORT_OUT) Register Mask */
  121. /* -------- PORT_OUTCLR : (PORT Offset: 0x14) (R/W 32) Data Output Value Clear -------- */
  122. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  123. typedef union {
  124. struct {
  125. uint32_t OUTCLR:32; /**< bit: 0..31 PORT Data Output Value Clear */
  126. } bit; /**< Structure used for bit access */
  127. uint32_t reg; /**< Type used for register access */
  128. } PORT_OUTCLR_Type;
  129. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  130. #define PORT_OUTCLR_OFFSET (0x14) /**< (PORT_OUTCLR) Data Output Value Clear Offset */
  131. #define PORT_OUTCLR_RESETVALUE _U_(0x00) /**< (PORT_OUTCLR) Data Output Value Clear Reset Value */
  132. #define PORT_OUTCLR_OUTCLR_Pos 0 /**< (PORT_OUTCLR) PORT Data Output Value Clear Position */
  133. #define PORT_OUTCLR_OUTCLR_Msk (_U_(0xFFFFFFFF) << PORT_OUTCLR_OUTCLR_Pos) /**< (PORT_OUTCLR) PORT Data Output Value Clear Mask */
  134. #define PORT_OUTCLR_OUTCLR(value) (PORT_OUTCLR_OUTCLR_Msk & ((value) << PORT_OUTCLR_OUTCLR_Pos))
  135. #define PORT_OUTCLR_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_OUTCLR) Register MASK (Use PORT_OUTCLR_Msk instead) */
  136. #define PORT_OUTCLR_Msk _U_(0xFFFFFFFF) /**< (PORT_OUTCLR) Register Mask */
  137. /* -------- PORT_OUTSET : (PORT Offset: 0x18) (R/W 32) Data Output Value Set -------- */
  138. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  139. typedef union {
  140. struct {
  141. uint32_t OUTSET:32; /**< bit: 0..31 PORT Data Output Value Set */
  142. } bit; /**< Structure used for bit access */
  143. uint32_t reg; /**< Type used for register access */
  144. } PORT_OUTSET_Type;
  145. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  146. #define PORT_OUTSET_OFFSET (0x18) /**< (PORT_OUTSET) Data Output Value Set Offset */
  147. #define PORT_OUTSET_RESETVALUE _U_(0x00) /**< (PORT_OUTSET) Data Output Value Set Reset Value */
  148. #define PORT_OUTSET_OUTSET_Pos 0 /**< (PORT_OUTSET) PORT Data Output Value Set Position */
  149. #define PORT_OUTSET_OUTSET_Msk (_U_(0xFFFFFFFF) << PORT_OUTSET_OUTSET_Pos) /**< (PORT_OUTSET) PORT Data Output Value Set Mask */
  150. #define PORT_OUTSET_OUTSET(value) (PORT_OUTSET_OUTSET_Msk & ((value) << PORT_OUTSET_OUTSET_Pos))
  151. #define PORT_OUTSET_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_OUTSET) Register MASK (Use PORT_OUTSET_Msk instead) */
  152. #define PORT_OUTSET_Msk _U_(0xFFFFFFFF) /**< (PORT_OUTSET) Register Mask */
  153. /* -------- PORT_OUTTGL : (PORT Offset: 0x1c) (R/W 32) Data Output Value Toggle -------- */
  154. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  155. typedef union {
  156. struct {
  157. uint32_t OUTTGL:32; /**< bit: 0..31 PORT Data Output Value Toggle */
  158. } bit; /**< Structure used for bit access */
  159. uint32_t reg; /**< Type used for register access */
  160. } PORT_OUTTGL_Type;
  161. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  162. #define PORT_OUTTGL_OFFSET (0x1C) /**< (PORT_OUTTGL) Data Output Value Toggle Offset */
  163. #define PORT_OUTTGL_RESETVALUE _U_(0x00) /**< (PORT_OUTTGL) Data Output Value Toggle Reset Value */
  164. #define PORT_OUTTGL_OUTTGL_Pos 0 /**< (PORT_OUTTGL) PORT Data Output Value Toggle Position */
  165. #define PORT_OUTTGL_OUTTGL_Msk (_U_(0xFFFFFFFF) << PORT_OUTTGL_OUTTGL_Pos) /**< (PORT_OUTTGL) PORT Data Output Value Toggle Mask */
  166. #define PORT_OUTTGL_OUTTGL(value) (PORT_OUTTGL_OUTTGL_Msk & ((value) << PORT_OUTTGL_OUTTGL_Pos))
  167. #define PORT_OUTTGL_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_OUTTGL) Register MASK (Use PORT_OUTTGL_Msk instead) */
  168. #define PORT_OUTTGL_Msk _U_(0xFFFFFFFF) /**< (PORT_OUTTGL) Register Mask */
  169. /* -------- PORT_IN : (PORT Offset: 0x20) (R/ 32) Data Input Value -------- */
  170. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  171. typedef union {
  172. struct {
  173. uint32_t IN:32; /**< bit: 0..31 PORT Data Input Value */
  174. } bit; /**< Structure used for bit access */
  175. uint32_t reg; /**< Type used for register access */
  176. } PORT_IN_Type;
  177. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  178. #define PORT_IN_OFFSET (0x20) /**< (PORT_IN) Data Input Value Offset */
  179. #define PORT_IN_RESETVALUE _U_(0x00) /**< (PORT_IN) Data Input Value Reset Value */
  180. #define PORT_IN_IN_Pos 0 /**< (PORT_IN) PORT Data Input Value Position */
  181. #define PORT_IN_IN_Msk (_U_(0xFFFFFFFF) << PORT_IN_IN_Pos) /**< (PORT_IN) PORT Data Input Value Mask */
  182. #define PORT_IN_IN(value) (PORT_IN_IN_Msk & ((value) << PORT_IN_IN_Pos))
  183. #define PORT_IN_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_IN) Register MASK (Use PORT_IN_Msk instead) */
  184. #define PORT_IN_Msk _U_(0xFFFFFFFF) /**< (PORT_IN) Register Mask */
  185. /* -------- PORT_CTRL : (PORT Offset: 0x24) (R/W 32) Control -------- */
  186. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  187. typedef union {
  188. struct {
  189. uint32_t SAMPLING:32; /**< bit: 0..31 Input Sampling Mode */
  190. } bit; /**< Structure used for bit access */
  191. uint32_t reg; /**< Type used for register access */
  192. } PORT_CTRL_Type;
  193. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  194. #define PORT_CTRL_OFFSET (0x24) /**< (PORT_CTRL) Control Offset */
  195. #define PORT_CTRL_RESETVALUE _U_(0x00) /**< (PORT_CTRL) Control Reset Value */
  196. #define PORT_CTRL_SAMPLING_Pos 0 /**< (PORT_CTRL) Input Sampling Mode Position */
  197. #define PORT_CTRL_SAMPLING_Msk (_U_(0xFFFFFFFF) << PORT_CTRL_SAMPLING_Pos) /**< (PORT_CTRL) Input Sampling Mode Mask */
  198. #define PORT_CTRL_SAMPLING(value) (PORT_CTRL_SAMPLING_Msk & ((value) << PORT_CTRL_SAMPLING_Pos))
  199. #define PORT_CTRL_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_CTRL) Register MASK (Use PORT_CTRL_Msk instead) */
  200. #define PORT_CTRL_Msk _U_(0xFFFFFFFF) /**< (PORT_CTRL) Register Mask */
  201. /* -------- PORT_WRCONFIG : (PORT Offset: 0x28) (/W 32) Write Configuration -------- */
  202. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  203. typedef union {
  204. struct {
  205. uint32_t PINMASK:16; /**< bit: 0..15 Pin Mask for Multiple Pin Configuration */
  206. uint32_t PMUXEN:1; /**< bit: 16 Peripheral Multiplexer Enable */
  207. uint32_t INEN:1; /**< bit: 17 Input Enable */
  208. uint32_t PULLEN:1; /**< bit: 18 Pull Enable */
  209. uint32_t :3; /**< bit: 19..21 Reserved */
  210. uint32_t DRVSTR:1; /**< bit: 22 Output Driver Strength Selection */
  211. uint32_t :1; /**< bit: 23 Reserved */
  212. uint32_t PMUX:4; /**< bit: 24..27 Peripheral Multiplexing */
  213. uint32_t WRPMUX:1; /**< bit: 28 Write PMUX */
  214. uint32_t :1; /**< bit: 29 Reserved */
  215. uint32_t WRPINCFG:1; /**< bit: 30 Write PINCFG */
  216. uint32_t HWSEL:1; /**< bit: 31 Half-Word Select */
  217. } bit; /**< Structure used for bit access */
  218. uint32_t reg; /**< Type used for register access */
  219. } PORT_WRCONFIG_Type;
  220. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  221. #define PORT_WRCONFIG_OFFSET (0x28) /**< (PORT_WRCONFIG) Write Configuration Offset */
  222. #define PORT_WRCONFIG_RESETVALUE _U_(0x00) /**< (PORT_WRCONFIG) Write Configuration Reset Value */
  223. #define PORT_WRCONFIG_PINMASK_Pos 0 /**< (PORT_WRCONFIG) Pin Mask for Multiple Pin Configuration Position */
  224. #define PORT_WRCONFIG_PINMASK_Msk (_U_(0xFFFF) << PORT_WRCONFIG_PINMASK_Pos) /**< (PORT_WRCONFIG) Pin Mask for Multiple Pin Configuration Mask */
  225. #define PORT_WRCONFIG_PINMASK(value) (PORT_WRCONFIG_PINMASK_Msk & ((value) << PORT_WRCONFIG_PINMASK_Pos))
  226. #define PORT_WRCONFIG_PMUXEN_Pos 16 /**< (PORT_WRCONFIG) Peripheral Multiplexer Enable Position */
  227. #define PORT_WRCONFIG_PMUXEN_Msk (_U_(0x1) << PORT_WRCONFIG_PMUXEN_Pos) /**< (PORT_WRCONFIG) Peripheral Multiplexer Enable Mask */
  228. #define PORT_WRCONFIG_PMUXEN PORT_WRCONFIG_PMUXEN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_WRCONFIG_PMUXEN_Msk instead */
  229. #define PORT_WRCONFIG_INEN_Pos 17 /**< (PORT_WRCONFIG) Input Enable Position */
  230. #define PORT_WRCONFIG_INEN_Msk (_U_(0x1) << PORT_WRCONFIG_INEN_Pos) /**< (PORT_WRCONFIG) Input Enable Mask */
  231. #define PORT_WRCONFIG_INEN PORT_WRCONFIG_INEN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_WRCONFIG_INEN_Msk instead */
  232. #define PORT_WRCONFIG_PULLEN_Pos 18 /**< (PORT_WRCONFIG) Pull Enable Position */
  233. #define PORT_WRCONFIG_PULLEN_Msk (_U_(0x1) << PORT_WRCONFIG_PULLEN_Pos) /**< (PORT_WRCONFIG) Pull Enable Mask */
  234. #define PORT_WRCONFIG_PULLEN PORT_WRCONFIG_PULLEN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_WRCONFIG_PULLEN_Msk instead */
  235. #define PORT_WRCONFIG_DRVSTR_Pos 22 /**< (PORT_WRCONFIG) Output Driver Strength Selection Position */
  236. #define PORT_WRCONFIG_DRVSTR_Msk (_U_(0x1) << PORT_WRCONFIG_DRVSTR_Pos) /**< (PORT_WRCONFIG) Output Driver Strength Selection Mask */
  237. #define PORT_WRCONFIG_DRVSTR PORT_WRCONFIG_DRVSTR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_WRCONFIG_DRVSTR_Msk instead */
  238. #define PORT_WRCONFIG_PMUX_Pos 24 /**< (PORT_WRCONFIG) Peripheral Multiplexing Position */
  239. #define PORT_WRCONFIG_PMUX_Msk (_U_(0xF) << PORT_WRCONFIG_PMUX_Pos) /**< (PORT_WRCONFIG) Peripheral Multiplexing Mask */
  240. #define PORT_WRCONFIG_PMUX(value) (PORT_WRCONFIG_PMUX_Msk & ((value) << PORT_WRCONFIG_PMUX_Pos))
  241. #define PORT_WRCONFIG_WRPMUX_Pos 28 /**< (PORT_WRCONFIG) Write PMUX Position */
  242. #define PORT_WRCONFIG_WRPMUX_Msk (_U_(0x1) << PORT_WRCONFIG_WRPMUX_Pos) /**< (PORT_WRCONFIG) Write PMUX Mask */
  243. #define PORT_WRCONFIG_WRPMUX PORT_WRCONFIG_WRPMUX_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_WRCONFIG_WRPMUX_Msk instead */
  244. #define PORT_WRCONFIG_WRPINCFG_Pos 30 /**< (PORT_WRCONFIG) Write PINCFG Position */
  245. #define PORT_WRCONFIG_WRPINCFG_Msk (_U_(0x1) << PORT_WRCONFIG_WRPINCFG_Pos) /**< (PORT_WRCONFIG) Write PINCFG Mask */
  246. #define PORT_WRCONFIG_WRPINCFG PORT_WRCONFIG_WRPINCFG_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_WRCONFIG_WRPINCFG_Msk instead */
  247. #define PORT_WRCONFIG_HWSEL_Pos 31 /**< (PORT_WRCONFIG) Half-Word Select Position */
  248. #define PORT_WRCONFIG_HWSEL_Msk (_U_(0x1) << PORT_WRCONFIG_HWSEL_Pos) /**< (PORT_WRCONFIG) Half-Word Select Mask */
  249. #define PORT_WRCONFIG_HWSEL PORT_WRCONFIG_HWSEL_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_WRCONFIG_HWSEL_Msk instead */
  250. #define PORT_WRCONFIG_Msk _U_(0xDF47FFFF) /**< (PORT_WRCONFIG) Register Mask */
  251. /* -------- PORT_EVCTRL : (PORT Offset: 0x2c) (R/W 32) Event Input Control -------- */
  252. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  253. typedef union {
  254. struct {
  255. uint32_t PID0:5; /**< bit: 0..4 PORT Event Pin Identifier 0 */
  256. uint32_t EVACT0:2; /**< bit: 5..6 PORT Event Action 0 */
  257. uint32_t PORTEI0:1; /**< bit: 7 PORT Event Input Enable 0 */
  258. uint32_t PID1:5; /**< bit: 8..12 PORT Event Pin Identifier 1 */
  259. uint32_t EVACT1:2; /**< bit: 13..14 PORT Event Action 1 */
  260. uint32_t PORTEI1:1; /**< bit: 15 PORT Event Input Enable 1 */
  261. uint32_t PID2:5; /**< bit: 16..20 PORT Event Pin Identifier 2 */
  262. uint32_t EVACT2:2; /**< bit: 21..22 PORT Event Action 2 */
  263. uint32_t PORTEI2:1; /**< bit: 23 PORT Event Input Enable 2 */
  264. uint32_t PID3:5; /**< bit: 24..28 PORT Event Pin Identifier 3 */
  265. uint32_t EVACT3:2; /**< bit: 29..30 PORT Event Action 3 */
  266. uint32_t PORTEI3:1; /**< bit: 31 PORT Event Input Enable 3 */
  267. } bit; /**< Structure used for bit access */
  268. uint32_t reg; /**< Type used for register access */
  269. } PORT_EVCTRL_Type;
  270. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  271. #define PORT_EVCTRL_OFFSET (0x2C) /**< (PORT_EVCTRL) Event Input Control Offset */
  272. #define PORT_EVCTRL_RESETVALUE _U_(0x00) /**< (PORT_EVCTRL) Event Input Control Reset Value */
  273. #define PORT_EVCTRL_PID0_Pos 0 /**< (PORT_EVCTRL) PORT Event Pin Identifier 0 Position */
  274. #define PORT_EVCTRL_PID0_Msk (_U_(0x1F) << PORT_EVCTRL_PID0_Pos) /**< (PORT_EVCTRL) PORT Event Pin Identifier 0 Mask */
  275. #define PORT_EVCTRL_PID0(value) (PORT_EVCTRL_PID0_Msk & ((value) << PORT_EVCTRL_PID0_Pos))
  276. #define PORT_EVCTRL_EVACT0_Pos 5 /**< (PORT_EVCTRL) PORT Event Action 0 Position */
  277. #define PORT_EVCTRL_EVACT0_Msk (_U_(0x3) << PORT_EVCTRL_EVACT0_Pos) /**< (PORT_EVCTRL) PORT Event Action 0 Mask */
  278. #define PORT_EVCTRL_EVACT0(value) (PORT_EVCTRL_EVACT0_Msk & ((value) << PORT_EVCTRL_EVACT0_Pos))
  279. #define PORT_EVCTRL_EVACT0_OUT_Val _U_(0x0) /**< (PORT_EVCTRL) Event output to pin */
  280. #define PORT_EVCTRL_EVACT0_SET_Val _U_(0x1) /**< (PORT_EVCTRL) Set output register of pin on event */
  281. #define PORT_EVCTRL_EVACT0_CLR_Val _U_(0x2) /**< (PORT_EVCTRL) Clear output register of pin on event */
  282. #define PORT_EVCTRL_EVACT0_TGL_Val _U_(0x3) /**< (PORT_EVCTRL) Toggle output register of pin on event */
  283. #define PORT_EVCTRL_EVACT0_OUT (PORT_EVCTRL_EVACT0_OUT_Val << PORT_EVCTRL_EVACT0_Pos) /**< (PORT_EVCTRL) Event output to pin Position */
  284. #define PORT_EVCTRL_EVACT0_SET (PORT_EVCTRL_EVACT0_SET_Val << PORT_EVCTRL_EVACT0_Pos) /**< (PORT_EVCTRL) Set output register of pin on event Position */
  285. #define PORT_EVCTRL_EVACT0_CLR (PORT_EVCTRL_EVACT0_CLR_Val << PORT_EVCTRL_EVACT0_Pos) /**< (PORT_EVCTRL) Clear output register of pin on event Position */
  286. #define PORT_EVCTRL_EVACT0_TGL (PORT_EVCTRL_EVACT0_TGL_Val << PORT_EVCTRL_EVACT0_Pos) /**< (PORT_EVCTRL) Toggle output register of pin on event Position */
  287. #define PORT_EVCTRL_PORTEI0_Pos 7 /**< (PORT_EVCTRL) PORT Event Input Enable 0 Position */
  288. #define PORT_EVCTRL_PORTEI0_Msk (_U_(0x1) << PORT_EVCTRL_PORTEI0_Pos) /**< (PORT_EVCTRL) PORT Event Input Enable 0 Mask */
  289. #define PORT_EVCTRL_PORTEI0 PORT_EVCTRL_PORTEI0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_EVCTRL_PORTEI0_Msk instead */
  290. #define PORT_EVCTRL_PID1_Pos 8 /**< (PORT_EVCTRL) PORT Event Pin Identifier 1 Position */
  291. #define PORT_EVCTRL_PID1_Msk (_U_(0x1F) << PORT_EVCTRL_PID1_Pos) /**< (PORT_EVCTRL) PORT Event Pin Identifier 1 Mask */
  292. #define PORT_EVCTRL_PID1(value) (PORT_EVCTRL_PID1_Msk & ((value) << PORT_EVCTRL_PID1_Pos))
  293. #define PORT_EVCTRL_EVACT1_Pos 13 /**< (PORT_EVCTRL) PORT Event Action 1 Position */
  294. #define PORT_EVCTRL_EVACT1_Msk (_U_(0x3) << PORT_EVCTRL_EVACT1_Pos) /**< (PORT_EVCTRL) PORT Event Action 1 Mask */
  295. #define PORT_EVCTRL_EVACT1(value) (PORT_EVCTRL_EVACT1_Msk & ((value) << PORT_EVCTRL_EVACT1_Pos))
  296. #define PORT_EVCTRL_PORTEI1_Pos 15 /**< (PORT_EVCTRL) PORT Event Input Enable 1 Position */
  297. #define PORT_EVCTRL_PORTEI1_Msk (_U_(0x1) << PORT_EVCTRL_PORTEI1_Pos) /**< (PORT_EVCTRL) PORT Event Input Enable 1 Mask */
  298. #define PORT_EVCTRL_PORTEI1 PORT_EVCTRL_PORTEI1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_EVCTRL_PORTEI1_Msk instead */
  299. #define PORT_EVCTRL_PID2_Pos 16 /**< (PORT_EVCTRL) PORT Event Pin Identifier 2 Position */
  300. #define PORT_EVCTRL_PID2_Msk (_U_(0x1F) << PORT_EVCTRL_PID2_Pos) /**< (PORT_EVCTRL) PORT Event Pin Identifier 2 Mask */
  301. #define PORT_EVCTRL_PID2(value) (PORT_EVCTRL_PID2_Msk & ((value) << PORT_EVCTRL_PID2_Pos))
  302. #define PORT_EVCTRL_EVACT2_Pos 21 /**< (PORT_EVCTRL) PORT Event Action 2 Position */
  303. #define PORT_EVCTRL_EVACT2_Msk (_U_(0x3) << PORT_EVCTRL_EVACT2_Pos) /**< (PORT_EVCTRL) PORT Event Action 2 Mask */
  304. #define PORT_EVCTRL_EVACT2(value) (PORT_EVCTRL_EVACT2_Msk & ((value) << PORT_EVCTRL_EVACT2_Pos))
  305. #define PORT_EVCTRL_PORTEI2_Pos 23 /**< (PORT_EVCTRL) PORT Event Input Enable 2 Position */
  306. #define PORT_EVCTRL_PORTEI2_Msk (_U_(0x1) << PORT_EVCTRL_PORTEI2_Pos) /**< (PORT_EVCTRL) PORT Event Input Enable 2 Mask */
  307. #define PORT_EVCTRL_PORTEI2 PORT_EVCTRL_PORTEI2_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_EVCTRL_PORTEI2_Msk instead */
  308. #define PORT_EVCTRL_PID3_Pos 24 /**< (PORT_EVCTRL) PORT Event Pin Identifier 3 Position */
  309. #define PORT_EVCTRL_PID3_Msk (_U_(0x1F) << PORT_EVCTRL_PID3_Pos) /**< (PORT_EVCTRL) PORT Event Pin Identifier 3 Mask */
  310. #define PORT_EVCTRL_PID3(value) (PORT_EVCTRL_PID3_Msk & ((value) << PORT_EVCTRL_PID3_Pos))
  311. #define PORT_EVCTRL_EVACT3_Pos 29 /**< (PORT_EVCTRL) PORT Event Action 3 Position */
  312. #define PORT_EVCTRL_EVACT3_Msk (_U_(0x3) << PORT_EVCTRL_EVACT3_Pos) /**< (PORT_EVCTRL) PORT Event Action 3 Mask */
  313. #define PORT_EVCTRL_EVACT3(value) (PORT_EVCTRL_EVACT3_Msk & ((value) << PORT_EVCTRL_EVACT3_Pos))
  314. #define PORT_EVCTRL_PORTEI3_Pos 31 /**< (PORT_EVCTRL) PORT Event Input Enable 3 Position */
  315. #define PORT_EVCTRL_PORTEI3_Msk (_U_(0x1) << PORT_EVCTRL_PORTEI3_Pos) /**< (PORT_EVCTRL) PORT Event Input Enable 3 Mask */
  316. #define PORT_EVCTRL_PORTEI3 PORT_EVCTRL_PORTEI3_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_EVCTRL_PORTEI3_Msk instead */
  317. #define PORT_EVCTRL_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_EVCTRL) Register MASK (Use PORT_EVCTRL_Msk instead) */
  318. #define PORT_EVCTRL_Msk _U_(0xFFFFFFFF) /**< (PORT_EVCTRL) Register Mask */
  319. /* -------- PORT_PMUX : (PORT Offset: 0x30) (R/W 8) Peripheral Multiplexing -------- */
  320. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  321. typedef union {
  322. struct {
  323. uint8_t PMUXE:4; /**< bit: 0..3 Peripheral Multiplexing for Even-Numbered Pin */
  324. uint8_t PMUXO:4; /**< bit: 4..7 Peripheral Multiplexing for Odd-Numbered Pin */
  325. } bit; /**< Structure used for bit access */
  326. uint8_t reg; /**< Type used for register access */
  327. } PORT_PMUX_Type;
  328. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  329. #define PORT_PMUX_OFFSET (0x30) /**< (PORT_PMUX) Peripheral Multiplexing Offset */
  330. #define PORT_PMUX_RESETVALUE _U_(0x00) /**< (PORT_PMUX) Peripheral Multiplexing Reset Value */
  331. #define PORT_PMUX_PMUXE_Pos 0 /**< (PORT_PMUX) Peripheral Multiplexing for Even-Numbered Pin Position */
  332. #define PORT_PMUX_PMUXE_Msk (_U_(0xF) << PORT_PMUX_PMUXE_Pos) /**< (PORT_PMUX) Peripheral Multiplexing for Even-Numbered Pin Mask */
  333. #define PORT_PMUX_PMUXE(value) (PORT_PMUX_PMUXE_Msk & ((value) << PORT_PMUX_PMUXE_Pos))
  334. #define PORT_PMUX_PMUXO_Pos 4 /**< (PORT_PMUX) Peripheral Multiplexing for Odd-Numbered Pin Position */
  335. #define PORT_PMUX_PMUXO_Msk (_U_(0xF) << PORT_PMUX_PMUXO_Pos) /**< (PORT_PMUX) Peripheral Multiplexing for Odd-Numbered Pin Mask */
  336. #define PORT_PMUX_PMUXO(value) (PORT_PMUX_PMUXO_Msk & ((value) << PORT_PMUX_PMUXO_Pos))
  337. #define PORT_PMUX_MASK _U_(0xFF) /**< \deprecated (PORT_PMUX) Register MASK (Use PORT_PMUX_Msk instead) */
  338. #define PORT_PMUX_Msk _U_(0xFF) /**< (PORT_PMUX) Register Mask */
  339. /* -------- PORT_PINCFG : (PORT Offset: 0x40) (R/W 8) Pin Configuration -------- */
  340. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  341. typedef union {
  342. struct {
  343. uint8_t PMUXEN:1; /**< bit: 0 Peripheral Multiplexer Enable */
  344. uint8_t INEN:1; /**< bit: 1 Input Enable */
  345. uint8_t PULLEN:1; /**< bit: 2 Pull Enable */
  346. uint8_t :3; /**< bit: 3..5 Reserved */
  347. uint8_t DRVSTR:1; /**< bit: 6 Output Driver Strength Selection */
  348. uint8_t :1; /**< bit: 7 Reserved */
  349. } bit; /**< Structure used for bit access */
  350. uint8_t reg; /**< Type used for register access */
  351. } PORT_PINCFG_Type;
  352. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  353. #define PORT_PINCFG_OFFSET (0x40) /**< (PORT_PINCFG) Pin Configuration Offset */
  354. #define PORT_PINCFG_RESETVALUE _U_(0x00) /**< (PORT_PINCFG) Pin Configuration Reset Value */
  355. #define PORT_PINCFG_PMUXEN_Pos 0 /**< (PORT_PINCFG) Peripheral Multiplexer Enable Position */
  356. #define PORT_PINCFG_PMUXEN_Msk (_U_(0x1) << PORT_PINCFG_PMUXEN_Pos) /**< (PORT_PINCFG) Peripheral Multiplexer Enable Mask */
  357. #define PORT_PINCFG_PMUXEN PORT_PINCFG_PMUXEN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_PINCFG_PMUXEN_Msk instead */
  358. #define PORT_PINCFG_INEN_Pos 1 /**< (PORT_PINCFG) Input Enable Position */
  359. #define PORT_PINCFG_INEN_Msk (_U_(0x1) << PORT_PINCFG_INEN_Pos) /**< (PORT_PINCFG) Input Enable Mask */
  360. #define PORT_PINCFG_INEN PORT_PINCFG_INEN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_PINCFG_INEN_Msk instead */
  361. #define PORT_PINCFG_PULLEN_Pos 2 /**< (PORT_PINCFG) Pull Enable Position */
  362. #define PORT_PINCFG_PULLEN_Msk (_U_(0x1) << PORT_PINCFG_PULLEN_Pos) /**< (PORT_PINCFG) Pull Enable Mask */
  363. #define PORT_PINCFG_PULLEN PORT_PINCFG_PULLEN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_PINCFG_PULLEN_Msk instead */
  364. #define PORT_PINCFG_DRVSTR_Pos 6 /**< (PORT_PINCFG) Output Driver Strength Selection Position */
  365. #define PORT_PINCFG_DRVSTR_Msk (_U_(0x1) << PORT_PINCFG_DRVSTR_Pos) /**< (PORT_PINCFG) Output Driver Strength Selection Mask */
  366. #define PORT_PINCFG_DRVSTR PORT_PINCFG_DRVSTR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_PINCFG_DRVSTR_Msk instead */
  367. #define PORT_PINCFG_MASK _U_(0x47) /**< \deprecated (PORT_PINCFG) Register MASK (Use PORT_PINCFG_Msk instead) */
  368. #define PORT_PINCFG_Msk _U_(0x47) /**< (PORT_PINCFG) Register Mask */
  369. /* -------- PORT_INTENCLR : (PORT Offset: 0x60) (R/W 32) Interrupt Enable Clear -------- */
  370. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  371. typedef union {
  372. struct {
  373. uint32_t NSCHK:1; /**< bit: 0 Non-Secure Check Interrupt Enable */
  374. uint32_t :31; /**< bit: 1..31 Reserved */
  375. } bit; /**< Structure used for bit access */
  376. uint32_t reg; /**< Type used for register access */
  377. } PORT_INTENCLR_Type;
  378. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  379. #define PORT_INTENCLR_OFFSET (0x60) /**< (PORT_INTENCLR) Interrupt Enable Clear Offset */
  380. #define PORT_INTENCLR_RESETVALUE _U_(0x00) /**< (PORT_INTENCLR) Interrupt Enable Clear Reset Value */
  381. #define PORT_INTENCLR_NSCHK_Pos 0 /**< (PORT_INTENCLR) Non-Secure Check Interrupt Enable Position */
  382. #define PORT_INTENCLR_NSCHK_Msk (_U_(0x1) << PORT_INTENCLR_NSCHK_Pos) /**< (PORT_INTENCLR) Non-Secure Check Interrupt Enable Mask */
  383. #define PORT_INTENCLR_NSCHK PORT_INTENCLR_NSCHK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_INTENCLR_NSCHK_Msk instead */
  384. #define PORT_INTENCLR_MASK _U_(0x01) /**< \deprecated (PORT_INTENCLR) Register MASK (Use PORT_INTENCLR_Msk instead) */
  385. #define PORT_INTENCLR_Msk _U_(0x01) /**< (PORT_INTENCLR) Register Mask */
  386. /* -------- PORT_INTENSET : (PORT Offset: 0x64) (R/W 32) Interrupt Enable Set -------- */
  387. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  388. typedef union {
  389. struct {
  390. uint32_t NSCHK:1; /**< bit: 0 Non-Secure Check Interrupt Enable */
  391. uint32_t :31; /**< bit: 1..31 Reserved */
  392. } bit; /**< Structure used for bit access */
  393. uint32_t reg; /**< Type used for register access */
  394. } PORT_INTENSET_Type;
  395. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  396. #define PORT_INTENSET_OFFSET (0x64) /**< (PORT_INTENSET) Interrupt Enable Set Offset */
  397. #define PORT_INTENSET_RESETVALUE _U_(0x00) /**< (PORT_INTENSET) Interrupt Enable Set Reset Value */
  398. #define PORT_INTENSET_NSCHK_Pos 0 /**< (PORT_INTENSET) Non-Secure Check Interrupt Enable Position */
  399. #define PORT_INTENSET_NSCHK_Msk (_U_(0x1) << PORT_INTENSET_NSCHK_Pos) /**< (PORT_INTENSET) Non-Secure Check Interrupt Enable Mask */
  400. #define PORT_INTENSET_NSCHK PORT_INTENSET_NSCHK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_INTENSET_NSCHK_Msk instead */
  401. #define PORT_INTENSET_MASK _U_(0x01) /**< \deprecated (PORT_INTENSET) Register MASK (Use PORT_INTENSET_Msk instead) */
  402. #define PORT_INTENSET_Msk _U_(0x01) /**< (PORT_INTENSET) Register Mask */
  403. /* -------- PORT_INTFLAG : (PORT Offset: 0x68) (R/W 32) Interrupt Flag Status and Clear -------- */
  404. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  405. typedef union { // __I to avoid read-modify-write on write-to-clear register
  406. struct {
  407. __I uint32_t NSCHK:1; /**< bit: 0 Non-Secure Check */
  408. __I uint32_t :31; /**< bit: 1..31 Reserved */
  409. } bit; /**< Structure used for bit access */
  410. uint32_t reg; /**< Type used for register access */
  411. } PORT_INTFLAG_Type;
  412. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  413. #define PORT_INTFLAG_OFFSET (0x68) /**< (PORT_INTFLAG) Interrupt Flag Status and Clear Offset */
  414. #define PORT_INTFLAG_RESETVALUE _U_(0x00) /**< (PORT_INTFLAG) Interrupt Flag Status and Clear Reset Value */
  415. #define PORT_INTFLAG_NSCHK_Pos 0 /**< (PORT_INTFLAG) Non-Secure Check Position */
  416. #define PORT_INTFLAG_NSCHK_Msk (_U_(0x1) << PORT_INTFLAG_NSCHK_Pos) /**< (PORT_INTFLAG) Non-Secure Check Mask */
  417. #define PORT_INTFLAG_NSCHK PORT_INTFLAG_NSCHK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use PORT_INTFLAG_NSCHK_Msk instead */
  418. #define PORT_INTFLAG_MASK _U_(0x01) /**< \deprecated (PORT_INTFLAG) Register MASK (Use PORT_INTFLAG_Msk instead) */
  419. #define PORT_INTFLAG_Msk _U_(0x01) /**< (PORT_INTFLAG) Register Mask */
  420. /* -------- PORT_NONSEC : (PORT Offset: 0x6c) (R/W 32) Security Attribution -------- */
  421. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  422. typedef union {
  423. struct {
  424. uint32_t NONSEC:32; /**< bit: 0..31 Port Security Attribution */
  425. } bit; /**< Structure used for bit access */
  426. uint32_t reg; /**< Type used for register access */
  427. } PORT_NONSEC_Type;
  428. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  429. #define PORT_NONSEC_OFFSET (0x6C) /**< (PORT_NONSEC) Security Attribution Offset */
  430. #define PORT_NONSEC_RESETVALUE _U_(0x00) /**< (PORT_NONSEC) Security Attribution Reset Value */
  431. #define PORT_NONSEC_NONSEC_Pos 0 /**< (PORT_NONSEC) Port Security Attribution Position */
  432. #define PORT_NONSEC_NONSEC_Msk (_U_(0xFFFFFFFF) << PORT_NONSEC_NONSEC_Pos) /**< (PORT_NONSEC) Port Security Attribution Mask */
  433. #define PORT_NONSEC_NONSEC(value) (PORT_NONSEC_NONSEC_Msk & ((value) << PORT_NONSEC_NONSEC_Pos))
  434. #define PORT_NONSEC_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_NONSEC) Register MASK (Use PORT_NONSEC_Msk instead) */
  435. #define PORT_NONSEC_Msk _U_(0xFFFFFFFF) /**< (PORT_NONSEC) Register Mask */
  436. /* -------- PORT_NSCHK : (PORT Offset: 0x70) (R/W 32) Security Attribution Check -------- */
  437. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  438. typedef union {
  439. struct {
  440. uint32_t NSCHK:32; /**< bit: 0..31 Port Security Attribution Check */
  441. } bit; /**< Structure used for bit access */
  442. uint32_t reg; /**< Type used for register access */
  443. } PORT_NSCHK_Type;
  444. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  445. #define PORT_NSCHK_OFFSET (0x70) /**< (PORT_NSCHK) Security Attribution Check Offset */
  446. #define PORT_NSCHK_RESETVALUE _U_(0x00) /**< (PORT_NSCHK) Security Attribution Check Reset Value */
  447. #define PORT_NSCHK_NSCHK_Pos 0 /**< (PORT_NSCHK) Port Security Attribution Check Position */
  448. #define PORT_NSCHK_NSCHK_Msk (_U_(0xFFFFFFFF) << PORT_NSCHK_NSCHK_Pos) /**< (PORT_NSCHK) Port Security Attribution Check Mask */
  449. #define PORT_NSCHK_NSCHK(value) (PORT_NSCHK_NSCHK_Msk & ((value) << PORT_NSCHK_NSCHK_Pos))
  450. #define PORT_NSCHK_MASK _U_(0xFFFFFFFF) /**< \deprecated (PORT_NSCHK) Register MASK (Use PORT_NSCHK_Msk instead) */
  451. #define PORT_NSCHK_Msk _U_(0xFFFFFFFF) /**< (PORT_NSCHK) Register Mask */
  452. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  453. /** \brief GROUP hardware registers */
  454. typedef struct {
  455. __IO PORT_DIR_Type DIR; /**< Offset: 0x00 (R/W 32) Data Direction */
  456. __IO PORT_DIRCLR_Type DIRCLR; /**< Offset: 0x04 (R/W 32) Data Direction Clear */
  457. __IO PORT_DIRSET_Type DIRSET; /**< Offset: 0x08 (R/W 32) Data Direction Set */
  458. __IO PORT_DIRTGL_Type DIRTGL; /**< Offset: 0x0C (R/W 32) Data Direction Toggle */
  459. __IO PORT_OUT_Type OUT; /**< Offset: 0x10 (R/W 32) Data Output Value */
  460. __IO PORT_OUTCLR_Type OUTCLR; /**< Offset: 0x14 (R/W 32) Data Output Value Clear */
  461. __IO PORT_OUTSET_Type OUTSET; /**< Offset: 0x18 (R/W 32) Data Output Value Set */
  462. __IO PORT_OUTTGL_Type OUTTGL; /**< Offset: 0x1C (R/W 32) Data Output Value Toggle */
  463. __I PORT_IN_Type IN; /**< Offset: 0x20 (R/ 32) Data Input Value */
  464. __IO PORT_CTRL_Type CTRL; /**< Offset: 0x24 (R/W 32) Control */
  465. __O PORT_WRCONFIG_Type WRCONFIG; /**< Offset: 0x28 ( /W 32) Write Configuration */
  466. __IO PORT_EVCTRL_Type EVCTRL; /**< Offset: 0x2C (R/W 32) Event Input Control */
  467. __IO PORT_PMUX_Type PMUX[16]; /**< Offset: 0x30 (R/W 8) Peripheral Multiplexing */
  468. __IO PORT_PINCFG_Type PINCFG[32]; /**< Offset: 0x40 (R/W 8) Pin Configuration */
  469. __IO PORT_INTENCLR_Type INTENCLR; /**< Offset: 0x60 (R/W 32) Interrupt Enable Clear */
  470. __IO PORT_INTENSET_Type INTENSET; /**< Offset: 0x64 (R/W 32) Interrupt Enable Set */
  471. __IO PORT_INTFLAG_Type INTFLAG; /**< Offset: 0x68 (R/W 32) Interrupt Flag Status and Clear */
  472. __IO PORT_NONSEC_Type NONSEC; /**< Offset: 0x6C (R/W 32) Security Attribution */
  473. __IO PORT_NSCHK_Type NSCHK; /**< Offset: 0x70 (R/W 32) Security Attribution Check */
  474. __I uint8_t Reserved1[12];
  475. } PortGroup;
  476. /** \brief PORT hardware registers */
  477. typedef struct { /* Port Module */
  478. PortGroup Group[1]; /**< Offset: 0x00 */
  479. } Port;
  480. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  481. /** @} end of Port Module */
  482. #endif /* _SAML11_PORT_COMPONENT_H_ */