1 /** 2 * \file 3 * 4 * \brief Component description for EVSYS 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 30 #ifndef _SAMC21_EVSYS_COMPONENT_ 31 #define _SAMC21_EVSYS_COMPONENT_ 32 33 /* ========================================================================== */ 34 /** SOFTWARE API DEFINITION FOR EVSYS */ 35 /* ========================================================================== */ 36 /** \addtogroup SAMC21_EVSYS Event System Interface */ 37 /*@{*/ 38 39 #define EVSYS_U2256 40 #define REV_EVSYS 0x110 41 42 /* -------- EVSYS_CTRLA : (EVSYS Offset: 0x00) (R/W 8) Control -------- */ 43 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 44 typedef union { 45 struct { 46 uint8_t SWRST:1; /*!< bit: 0 Software Reset */ 47 uint8_t :7; /*!< bit: 1.. 7 Reserved */ 48 } bit; /*!< Structure used for bit access */ 49 uint8_t reg; /*!< Type used for register access */ 50 } EVSYS_CTRLA_Type; 51 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 52 53 #define EVSYS_CTRLA_OFFSET 0x00 /**< \brief (EVSYS_CTRLA offset) Control */ 54 #define EVSYS_CTRLA_RESETVALUE _U_(0x00) /**< \brief (EVSYS_CTRLA reset_value) Control */ 55 56 #define EVSYS_CTRLA_SWRST_Pos 0 /**< \brief (EVSYS_CTRLA) Software Reset */ 57 #define EVSYS_CTRLA_SWRST (_U_(0x1) << EVSYS_CTRLA_SWRST_Pos) 58 #define EVSYS_CTRLA_MASK _U_(0x01) /**< \brief (EVSYS_CTRLA) MASK Register */ 59 60 /* -------- EVSYS_CHSTATUS : (EVSYS Offset: 0x0C) (R/ 32) Channel Status -------- */ 61 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 62 typedef union { 63 struct { 64 uint32_t USRRDY0:1; /*!< bit: 0 Channel 0 User Ready */ 65 uint32_t USRRDY1:1; /*!< bit: 1 Channel 1 User Ready */ 66 uint32_t USRRDY2:1; /*!< bit: 2 Channel 2 User Ready */ 67 uint32_t USRRDY3:1; /*!< bit: 3 Channel 3 User Ready */ 68 uint32_t USRRDY4:1; /*!< bit: 4 Channel 4 User Ready */ 69 uint32_t USRRDY5:1; /*!< bit: 5 Channel 5 User Ready */ 70 uint32_t USRRDY6:1; /*!< bit: 6 Channel 6 User Ready */ 71 uint32_t USRRDY7:1; /*!< bit: 7 Channel 7 User Ready */ 72 uint32_t USRRDY8:1; /*!< bit: 8 Channel 8 User Ready */ 73 uint32_t USRRDY9:1; /*!< bit: 9 Channel 9 User Ready */ 74 uint32_t USRRDY10:1; /*!< bit: 10 Channel 10 User Ready */ 75 uint32_t USRRDY11:1; /*!< bit: 11 Channel 11 User Ready */ 76 uint32_t :4; /*!< bit: 12..15 Reserved */ 77 uint32_t CHBUSY0:1; /*!< bit: 16 Channel 0 Busy */ 78 uint32_t CHBUSY1:1; /*!< bit: 17 Channel 1 Busy */ 79 uint32_t CHBUSY2:1; /*!< bit: 18 Channel 2 Busy */ 80 uint32_t CHBUSY3:1; /*!< bit: 19 Channel 3 Busy */ 81 uint32_t CHBUSY4:1; /*!< bit: 20 Channel 4 Busy */ 82 uint32_t CHBUSY5:1; /*!< bit: 21 Channel 5 Busy */ 83 uint32_t CHBUSY6:1; /*!< bit: 22 Channel 6 Busy */ 84 uint32_t CHBUSY7:1; /*!< bit: 23 Channel 7 Busy */ 85 uint32_t CHBUSY8:1; /*!< bit: 24 Channel 8 Busy */ 86 uint32_t CHBUSY9:1; /*!< bit: 25 Channel 9 Busy */ 87 uint32_t CHBUSY10:1; /*!< bit: 26 Channel 10 Busy */ 88 uint32_t CHBUSY11:1; /*!< bit: 27 Channel 11 Busy */ 89 uint32_t :4; /*!< bit: 28..31 Reserved */ 90 } bit; /*!< Structure used for bit access */ 91 struct { 92 uint32_t USRRDY:12; /*!< bit: 0..11 Channel x User Ready */ 93 uint32_t :4; /*!< bit: 12..15 Reserved */ 94 uint32_t CHBUSY:12; /*!< bit: 16..27 Channel x Busy */ 95 uint32_t :4; /*!< bit: 28..31 Reserved */ 96 } vec; /*!< Structure used for vec access */ 97 uint32_t reg; /*!< Type used for register access */ 98 } EVSYS_CHSTATUS_Type; 99 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 100 101 #define EVSYS_CHSTATUS_OFFSET 0x0C /**< \brief (EVSYS_CHSTATUS offset) Channel Status */ 102 #define EVSYS_CHSTATUS_RESETVALUE _U_(0x00000000) /**< \brief (EVSYS_CHSTATUS reset_value) Channel Status */ 103 104 #define EVSYS_CHSTATUS_USRRDY0_Pos 0 /**< \brief (EVSYS_CHSTATUS) Channel 0 User Ready */ 105 #define EVSYS_CHSTATUS_USRRDY0 (_U_(1) << EVSYS_CHSTATUS_USRRDY0_Pos) 106 #define EVSYS_CHSTATUS_USRRDY1_Pos 1 /**< \brief (EVSYS_CHSTATUS) Channel 1 User Ready */ 107 #define EVSYS_CHSTATUS_USRRDY1 (_U_(1) << EVSYS_CHSTATUS_USRRDY1_Pos) 108 #define EVSYS_CHSTATUS_USRRDY2_Pos 2 /**< \brief (EVSYS_CHSTATUS) Channel 2 User Ready */ 109 #define EVSYS_CHSTATUS_USRRDY2 (_U_(1) << EVSYS_CHSTATUS_USRRDY2_Pos) 110 #define EVSYS_CHSTATUS_USRRDY3_Pos 3 /**< \brief (EVSYS_CHSTATUS) Channel 3 User Ready */ 111 #define EVSYS_CHSTATUS_USRRDY3 (_U_(1) << EVSYS_CHSTATUS_USRRDY3_Pos) 112 #define EVSYS_CHSTATUS_USRRDY4_Pos 4 /**< \brief (EVSYS_CHSTATUS) Channel 4 User Ready */ 113 #define EVSYS_CHSTATUS_USRRDY4 (_U_(1) << EVSYS_CHSTATUS_USRRDY4_Pos) 114 #define EVSYS_CHSTATUS_USRRDY5_Pos 5 /**< \brief (EVSYS_CHSTATUS) Channel 5 User Ready */ 115 #define EVSYS_CHSTATUS_USRRDY5 (_U_(1) << EVSYS_CHSTATUS_USRRDY5_Pos) 116 #define EVSYS_CHSTATUS_USRRDY6_Pos 6 /**< \brief (EVSYS_CHSTATUS) Channel 6 User Ready */ 117 #define EVSYS_CHSTATUS_USRRDY6 (_U_(1) << EVSYS_CHSTATUS_USRRDY6_Pos) 118 #define EVSYS_CHSTATUS_USRRDY7_Pos 7 /**< \brief (EVSYS_CHSTATUS) Channel 7 User Ready */ 119 #define EVSYS_CHSTATUS_USRRDY7 (_U_(1) << EVSYS_CHSTATUS_USRRDY7_Pos) 120 #define EVSYS_CHSTATUS_USRRDY8_Pos 8 /**< \brief (EVSYS_CHSTATUS) Channel 8 User Ready */ 121 #define EVSYS_CHSTATUS_USRRDY8 (_U_(1) << EVSYS_CHSTATUS_USRRDY8_Pos) 122 #define EVSYS_CHSTATUS_USRRDY9_Pos 9 /**< \brief (EVSYS_CHSTATUS) Channel 9 User Ready */ 123 #define EVSYS_CHSTATUS_USRRDY9 (_U_(1) << EVSYS_CHSTATUS_USRRDY9_Pos) 124 #define EVSYS_CHSTATUS_USRRDY10_Pos 10 /**< \brief (EVSYS_CHSTATUS) Channel 10 User Ready */ 125 #define EVSYS_CHSTATUS_USRRDY10 (_U_(1) << EVSYS_CHSTATUS_USRRDY10_Pos) 126 #define EVSYS_CHSTATUS_USRRDY11_Pos 11 /**< \brief (EVSYS_CHSTATUS) Channel 11 User Ready */ 127 #define EVSYS_CHSTATUS_USRRDY11 (_U_(1) << EVSYS_CHSTATUS_USRRDY11_Pos) 128 #define EVSYS_CHSTATUS_USRRDY_Pos 0 /**< \brief (EVSYS_CHSTATUS) Channel x User Ready */ 129 #define EVSYS_CHSTATUS_USRRDY_Msk (_U_(0xFFF) << EVSYS_CHSTATUS_USRRDY_Pos) 130 #define EVSYS_CHSTATUS_USRRDY(value) (EVSYS_CHSTATUS_USRRDY_Msk & ((value) << EVSYS_CHSTATUS_USRRDY_Pos)) 131 #define EVSYS_CHSTATUS_CHBUSY0_Pos 16 /**< \brief (EVSYS_CHSTATUS) Channel 0 Busy */ 132 #define EVSYS_CHSTATUS_CHBUSY0 (_U_(1) << EVSYS_CHSTATUS_CHBUSY0_Pos) 133 #define EVSYS_CHSTATUS_CHBUSY1_Pos 17 /**< \brief (EVSYS_CHSTATUS) Channel 1 Busy */ 134 #define EVSYS_CHSTATUS_CHBUSY1 (_U_(1) << EVSYS_CHSTATUS_CHBUSY1_Pos) 135 #define EVSYS_CHSTATUS_CHBUSY2_Pos 18 /**< \brief (EVSYS_CHSTATUS) Channel 2 Busy */ 136 #define EVSYS_CHSTATUS_CHBUSY2 (_U_(1) << EVSYS_CHSTATUS_CHBUSY2_Pos) 137 #define EVSYS_CHSTATUS_CHBUSY3_Pos 19 /**< \brief (EVSYS_CHSTATUS) Channel 3 Busy */ 138 #define EVSYS_CHSTATUS_CHBUSY3 (_U_(1) << EVSYS_CHSTATUS_CHBUSY3_Pos) 139 #define EVSYS_CHSTATUS_CHBUSY4_Pos 20 /**< \brief (EVSYS_CHSTATUS) Channel 4 Busy */ 140 #define EVSYS_CHSTATUS_CHBUSY4 (_U_(1) << EVSYS_CHSTATUS_CHBUSY4_Pos) 141 #define EVSYS_CHSTATUS_CHBUSY5_Pos 21 /**< \brief (EVSYS_CHSTATUS) Channel 5 Busy */ 142 #define EVSYS_CHSTATUS_CHBUSY5 (_U_(1) << EVSYS_CHSTATUS_CHBUSY5_Pos) 143 #define EVSYS_CHSTATUS_CHBUSY6_Pos 22 /**< \brief (EVSYS_CHSTATUS) Channel 6 Busy */ 144 #define EVSYS_CHSTATUS_CHBUSY6 (_U_(1) << EVSYS_CHSTATUS_CHBUSY6_Pos) 145 #define EVSYS_CHSTATUS_CHBUSY7_Pos 23 /**< \brief (EVSYS_CHSTATUS) Channel 7 Busy */ 146 #define EVSYS_CHSTATUS_CHBUSY7 (_U_(1) << EVSYS_CHSTATUS_CHBUSY7_Pos) 147 #define EVSYS_CHSTATUS_CHBUSY8_Pos 24 /**< \brief (EVSYS_CHSTATUS) Channel 8 Busy */ 148 #define EVSYS_CHSTATUS_CHBUSY8 (_U_(1) << EVSYS_CHSTATUS_CHBUSY8_Pos) 149 #define EVSYS_CHSTATUS_CHBUSY9_Pos 25 /**< \brief (EVSYS_CHSTATUS) Channel 9 Busy */ 150 #define EVSYS_CHSTATUS_CHBUSY9 (_U_(1) << EVSYS_CHSTATUS_CHBUSY9_Pos) 151 #define EVSYS_CHSTATUS_CHBUSY10_Pos 26 /**< \brief (EVSYS_CHSTATUS) Channel 10 Busy */ 152 #define EVSYS_CHSTATUS_CHBUSY10 (_U_(1) << EVSYS_CHSTATUS_CHBUSY10_Pos) 153 #define EVSYS_CHSTATUS_CHBUSY11_Pos 27 /**< \brief (EVSYS_CHSTATUS) Channel 11 Busy */ 154 #define EVSYS_CHSTATUS_CHBUSY11 (_U_(1) << EVSYS_CHSTATUS_CHBUSY11_Pos) 155 #define EVSYS_CHSTATUS_CHBUSY_Pos 16 /**< \brief (EVSYS_CHSTATUS) Channel x Busy */ 156 #define EVSYS_CHSTATUS_CHBUSY_Msk (_U_(0xFFF) << EVSYS_CHSTATUS_CHBUSY_Pos) 157 #define EVSYS_CHSTATUS_CHBUSY(value) (EVSYS_CHSTATUS_CHBUSY_Msk & ((value) << EVSYS_CHSTATUS_CHBUSY_Pos)) 158 #define EVSYS_CHSTATUS_MASK _U_(0x0FFF0FFF) /**< \brief (EVSYS_CHSTATUS) MASK Register */ 159 160 /* -------- EVSYS_INTENCLR : (EVSYS Offset: 0x10) (R/W 32) Interrupt Enable Clear -------- */ 161 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 162 typedef union { 163 struct { 164 uint32_t OVR0:1; /*!< bit: 0 Channel 0 Overrun Interrupt Enable */ 165 uint32_t OVR1:1; /*!< bit: 1 Channel 1 Overrun Interrupt Enable */ 166 uint32_t OVR2:1; /*!< bit: 2 Channel 2 Overrun Interrupt Enable */ 167 uint32_t OVR3:1; /*!< bit: 3 Channel 3 Overrun Interrupt Enable */ 168 uint32_t OVR4:1; /*!< bit: 4 Channel 4 Overrun Interrupt Enable */ 169 uint32_t OVR5:1; /*!< bit: 5 Channel 5 Overrun Interrupt Enable */ 170 uint32_t OVR6:1; /*!< bit: 6 Channel 6 Overrun Interrupt Enable */ 171 uint32_t OVR7:1; /*!< bit: 7 Channel 7 Overrun Interrupt Enable */ 172 uint32_t OVR8:1; /*!< bit: 8 Channel 8 Overrun Interrupt Enable */ 173 uint32_t OVR9:1; /*!< bit: 9 Channel 9 Overrun Interrupt Enable */ 174 uint32_t OVR10:1; /*!< bit: 10 Channel 10 Overrun Interrupt Enable */ 175 uint32_t OVR11:1; /*!< bit: 11 Channel 11 Overrun Interrupt Enable */ 176 uint32_t :4; /*!< bit: 12..15 Reserved */ 177 uint32_t EVD0:1; /*!< bit: 16 Channel 0 Event Detection Interrupt Enable */ 178 uint32_t EVD1:1; /*!< bit: 17 Channel 1 Event Detection Interrupt Enable */ 179 uint32_t EVD2:1; /*!< bit: 18 Channel 2 Event Detection Interrupt Enable */ 180 uint32_t EVD3:1; /*!< bit: 19 Channel 3 Event Detection Interrupt Enable */ 181 uint32_t EVD4:1; /*!< bit: 20 Channel 4 Event Detection Interrupt Enable */ 182 uint32_t EVD5:1; /*!< bit: 21 Channel 5 Event Detection Interrupt Enable */ 183 uint32_t EVD6:1; /*!< bit: 22 Channel 6 Event Detection Interrupt Enable */ 184 uint32_t EVD7:1; /*!< bit: 23 Channel 7 Event Detection Interrupt Enable */ 185 uint32_t EVD8:1; /*!< bit: 24 Channel 8 Event Detection Interrupt Enable */ 186 uint32_t EVD9:1; /*!< bit: 25 Channel 9 Event Detection Interrupt Enable */ 187 uint32_t EVD10:1; /*!< bit: 26 Channel 10 Event Detection Interrupt Enable */ 188 uint32_t EVD11:1; /*!< bit: 27 Channel 11 Event Detection Interrupt Enable */ 189 uint32_t :4; /*!< bit: 28..31 Reserved */ 190 } bit; /*!< Structure used for bit access */ 191 struct { 192 uint32_t OVR:12; /*!< bit: 0..11 Channel x Overrun Interrupt Enable */ 193 uint32_t :4; /*!< bit: 12..15 Reserved */ 194 uint32_t EVD:12; /*!< bit: 16..27 Channel x Event Detection Interrupt Enable */ 195 uint32_t :4; /*!< bit: 28..31 Reserved */ 196 } vec; /*!< Structure used for vec access */ 197 uint32_t reg; /*!< Type used for register access */ 198 } EVSYS_INTENCLR_Type; 199 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 200 201 #define EVSYS_INTENCLR_OFFSET 0x10 /**< \brief (EVSYS_INTENCLR offset) Interrupt Enable Clear */ 202 #define EVSYS_INTENCLR_RESETVALUE _U_(0x00000000) /**< \brief (EVSYS_INTENCLR reset_value) Interrupt Enable Clear */ 203 204 #define EVSYS_INTENCLR_OVR0_Pos 0 /**< \brief (EVSYS_INTENCLR) Channel 0 Overrun Interrupt Enable */ 205 #define EVSYS_INTENCLR_OVR0 (_U_(1) << EVSYS_INTENCLR_OVR0_Pos) 206 #define EVSYS_INTENCLR_OVR1_Pos 1 /**< \brief (EVSYS_INTENCLR) Channel 1 Overrun Interrupt Enable */ 207 #define EVSYS_INTENCLR_OVR1 (_U_(1) << EVSYS_INTENCLR_OVR1_Pos) 208 #define EVSYS_INTENCLR_OVR2_Pos 2 /**< \brief (EVSYS_INTENCLR) Channel 2 Overrun Interrupt Enable */ 209 #define EVSYS_INTENCLR_OVR2 (_U_(1) << EVSYS_INTENCLR_OVR2_Pos) 210 #define EVSYS_INTENCLR_OVR3_Pos 3 /**< \brief (EVSYS_INTENCLR) Channel 3 Overrun Interrupt Enable */ 211 #define EVSYS_INTENCLR_OVR3 (_U_(1) << EVSYS_INTENCLR_OVR3_Pos) 212 #define EVSYS_INTENCLR_OVR4_Pos 4 /**< \brief (EVSYS_INTENCLR) Channel 4 Overrun Interrupt Enable */ 213 #define EVSYS_INTENCLR_OVR4 (_U_(1) << EVSYS_INTENCLR_OVR4_Pos) 214 #define EVSYS_INTENCLR_OVR5_Pos 5 /**< \brief (EVSYS_INTENCLR) Channel 5 Overrun Interrupt Enable */ 215 #define EVSYS_INTENCLR_OVR5 (_U_(1) << EVSYS_INTENCLR_OVR5_Pos) 216 #define EVSYS_INTENCLR_OVR6_Pos 6 /**< \brief (EVSYS_INTENCLR) Channel 6 Overrun Interrupt Enable */ 217 #define EVSYS_INTENCLR_OVR6 (_U_(1) << EVSYS_INTENCLR_OVR6_Pos) 218 #define EVSYS_INTENCLR_OVR7_Pos 7 /**< \brief (EVSYS_INTENCLR) Channel 7 Overrun Interrupt Enable */ 219 #define EVSYS_INTENCLR_OVR7 (_U_(1) << EVSYS_INTENCLR_OVR7_Pos) 220 #define EVSYS_INTENCLR_OVR8_Pos 8 /**< \brief (EVSYS_INTENCLR) Channel 8 Overrun Interrupt Enable */ 221 #define EVSYS_INTENCLR_OVR8 (_U_(1) << EVSYS_INTENCLR_OVR8_Pos) 222 #define EVSYS_INTENCLR_OVR9_Pos 9 /**< \brief (EVSYS_INTENCLR) Channel 9 Overrun Interrupt Enable */ 223 #define EVSYS_INTENCLR_OVR9 (_U_(1) << EVSYS_INTENCLR_OVR9_Pos) 224 #define EVSYS_INTENCLR_OVR10_Pos 10 /**< \brief (EVSYS_INTENCLR) Channel 10 Overrun Interrupt Enable */ 225 #define EVSYS_INTENCLR_OVR10 (_U_(1) << EVSYS_INTENCLR_OVR10_Pos) 226 #define EVSYS_INTENCLR_OVR11_Pos 11 /**< \brief (EVSYS_INTENCLR) Channel 11 Overrun Interrupt Enable */ 227 #define EVSYS_INTENCLR_OVR11 (_U_(1) << EVSYS_INTENCLR_OVR11_Pos) 228 #define EVSYS_INTENCLR_OVR_Pos 0 /**< \brief (EVSYS_INTENCLR) Channel x Overrun Interrupt Enable */ 229 #define EVSYS_INTENCLR_OVR_Msk (_U_(0xFFF) << EVSYS_INTENCLR_OVR_Pos) 230 #define EVSYS_INTENCLR_OVR(value) (EVSYS_INTENCLR_OVR_Msk & ((value) << EVSYS_INTENCLR_OVR_Pos)) 231 #define EVSYS_INTENCLR_EVD0_Pos 16 /**< \brief (EVSYS_INTENCLR) Channel 0 Event Detection Interrupt Enable */ 232 #define EVSYS_INTENCLR_EVD0 (_U_(1) << EVSYS_INTENCLR_EVD0_Pos) 233 #define EVSYS_INTENCLR_EVD1_Pos 17 /**< \brief (EVSYS_INTENCLR) Channel 1 Event Detection Interrupt Enable */ 234 #define EVSYS_INTENCLR_EVD1 (_U_(1) << EVSYS_INTENCLR_EVD1_Pos) 235 #define EVSYS_INTENCLR_EVD2_Pos 18 /**< \brief (EVSYS_INTENCLR) Channel 2 Event Detection Interrupt Enable */ 236 #define EVSYS_INTENCLR_EVD2 (_U_(1) << EVSYS_INTENCLR_EVD2_Pos) 237 #define EVSYS_INTENCLR_EVD3_Pos 19 /**< \brief (EVSYS_INTENCLR) Channel 3 Event Detection Interrupt Enable */ 238 #define EVSYS_INTENCLR_EVD3 (_U_(1) << EVSYS_INTENCLR_EVD3_Pos) 239 #define EVSYS_INTENCLR_EVD4_Pos 20 /**< \brief (EVSYS_INTENCLR) Channel 4 Event Detection Interrupt Enable */ 240 #define EVSYS_INTENCLR_EVD4 (_U_(1) << EVSYS_INTENCLR_EVD4_Pos) 241 #define EVSYS_INTENCLR_EVD5_Pos 21 /**< \brief (EVSYS_INTENCLR) Channel 5 Event Detection Interrupt Enable */ 242 #define EVSYS_INTENCLR_EVD5 (_U_(1) << EVSYS_INTENCLR_EVD5_Pos) 243 #define EVSYS_INTENCLR_EVD6_Pos 22 /**< \brief (EVSYS_INTENCLR) Channel 6 Event Detection Interrupt Enable */ 244 #define EVSYS_INTENCLR_EVD6 (_U_(1) << EVSYS_INTENCLR_EVD6_Pos) 245 #define EVSYS_INTENCLR_EVD7_Pos 23 /**< \brief (EVSYS_INTENCLR) Channel 7 Event Detection Interrupt Enable */ 246 #define EVSYS_INTENCLR_EVD7 (_U_(1) << EVSYS_INTENCLR_EVD7_Pos) 247 #define EVSYS_INTENCLR_EVD8_Pos 24 /**< \brief (EVSYS_INTENCLR) Channel 8 Event Detection Interrupt Enable */ 248 #define EVSYS_INTENCLR_EVD8 (_U_(1) << EVSYS_INTENCLR_EVD8_Pos) 249 #define EVSYS_INTENCLR_EVD9_Pos 25 /**< \brief (EVSYS_INTENCLR) Channel 9 Event Detection Interrupt Enable */ 250 #define EVSYS_INTENCLR_EVD9 (_U_(1) << EVSYS_INTENCLR_EVD9_Pos) 251 #define EVSYS_INTENCLR_EVD10_Pos 26 /**< \brief (EVSYS_INTENCLR) Channel 10 Event Detection Interrupt Enable */ 252 #define EVSYS_INTENCLR_EVD10 (_U_(1) << EVSYS_INTENCLR_EVD10_Pos) 253 #define EVSYS_INTENCLR_EVD11_Pos 27 /**< \brief (EVSYS_INTENCLR) Channel 11 Event Detection Interrupt Enable */ 254 #define EVSYS_INTENCLR_EVD11 (_U_(1) << EVSYS_INTENCLR_EVD11_Pos) 255 #define EVSYS_INTENCLR_EVD_Pos 16 /**< \brief (EVSYS_INTENCLR) Channel x Event Detection Interrupt Enable */ 256 #define EVSYS_INTENCLR_EVD_Msk (_U_(0xFFF) << EVSYS_INTENCLR_EVD_Pos) 257 #define EVSYS_INTENCLR_EVD(value) (EVSYS_INTENCLR_EVD_Msk & ((value) << EVSYS_INTENCLR_EVD_Pos)) 258 #define EVSYS_INTENCLR_MASK _U_(0x0FFF0FFF) /**< \brief (EVSYS_INTENCLR) MASK Register */ 259 260 /* -------- EVSYS_INTENSET : (EVSYS Offset: 0x14) (R/W 32) Interrupt Enable Set -------- */ 261 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 262 typedef union { 263 struct { 264 uint32_t OVR0:1; /*!< bit: 0 Channel 0 Overrun Interrupt Enable */ 265 uint32_t OVR1:1; /*!< bit: 1 Channel 1 Overrun Interrupt Enable */ 266 uint32_t OVR2:1; /*!< bit: 2 Channel 2 Overrun Interrupt Enable */ 267 uint32_t OVR3:1; /*!< bit: 3 Channel 3 Overrun Interrupt Enable */ 268 uint32_t OVR4:1; /*!< bit: 4 Channel 4 Overrun Interrupt Enable */ 269 uint32_t OVR5:1; /*!< bit: 5 Channel 5 Overrun Interrupt Enable */ 270 uint32_t OVR6:1; /*!< bit: 6 Channel 6 Overrun Interrupt Enable */ 271 uint32_t OVR7:1; /*!< bit: 7 Channel 7 Overrun Interrupt Enable */ 272 uint32_t OVR8:1; /*!< bit: 8 Channel 8 Overrun Interrupt Enable */ 273 uint32_t OVR9:1; /*!< bit: 9 Channel 9 Overrun Interrupt Enable */ 274 uint32_t OVR10:1; /*!< bit: 10 Channel 10 Overrun Interrupt Enable */ 275 uint32_t OVR11:1; /*!< bit: 11 Channel 11 Overrun Interrupt Enable */ 276 uint32_t :4; /*!< bit: 12..15 Reserved */ 277 uint32_t EVD0:1; /*!< bit: 16 Channel 0 Event Detection Interrupt Enable */ 278 uint32_t EVD1:1; /*!< bit: 17 Channel 1 Event Detection Interrupt Enable */ 279 uint32_t EVD2:1; /*!< bit: 18 Channel 2 Event Detection Interrupt Enable */ 280 uint32_t EVD3:1; /*!< bit: 19 Channel 3 Event Detection Interrupt Enable */ 281 uint32_t EVD4:1; /*!< bit: 20 Channel 4 Event Detection Interrupt Enable */ 282 uint32_t EVD5:1; /*!< bit: 21 Channel 5 Event Detection Interrupt Enable */ 283 uint32_t EVD6:1; /*!< bit: 22 Channel 6 Event Detection Interrupt Enable */ 284 uint32_t EVD7:1; /*!< bit: 23 Channel 7 Event Detection Interrupt Enable */ 285 uint32_t EVD8:1; /*!< bit: 24 Channel 8 Event Detection Interrupt Enable */ 286 uint32_t EVD9:1; /*!< bit: 25 Channel 9 Event Detection Interrupt Enable */ 287 uint32_t EVD10:1; /*!< bit: 26 Channel 10 Event Detection Interrupt Enable */ 288 uint32_t EVD11:1; /*!< bit: 27 Channel 11 Event Detection Interrupt Enable */ 289 uint32_t :4; /*!< bit: 28..31 Reserved */ 290 } bit; /*!< Structure used for bit access */ 291 struct { 292 uint32_t OVR:12; /*!< bit: 0..11 Channel x Overrun Interrupt Enable */ 293 uint32_t :4; /*!< bit: 12..15 Reserved */ 294 uint32_t EVD:12; /*!< bit: 16..27 Channel x Event Detection Interrupt Enable */ 295 uint32_t :4; /*!< bit: 28..31 Reserved */ 296 } vec; /*!< Structure used for vec access */ 297 uint32_t reg; /*!< Type used for register access */ 298 } EVSYS_INTENSET_Type; 299 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 300 301 #define EVSYS_INTENSET_OFFSET 0x14 /**< \brief (EVSYS_INTENSET offset) Interrupt Enable Set */ 302 #define EVSYS_INTENSET_RESETVALUE _U_(0x00000000) /**< \brief (EVSYS_INTENSET reset_value) Interrupt Enable Set */ 303 304 #define EVSYS_INTENSET_OVR0_Pos 0 /**< \brief (EVSYS_INTENSET) Channel 0 Overrun Interrupt Enable */ 305 #define EVSYS_INTENSET_OVR0 (_U_(1) << EVSYS_INTENSET_OVR0_Pos) 306 #define EVSYS_INTENSET_OVR1_Pos 1 /**< \brief (EVSYS_INTENSET) Channel 1 Overrun Interrupt Enable */ 307 #define EVSYS_INTENSET_OVR1 (_U_(1) << EVSYS_INTENSET_OVR1_Pos) 308 #define EVSYS_INTENSET_OVR2_Pos 2 /**< \brief (EVSYS_INTENSET) Channel 2 Overrun Interrupt Enable */ 309 #define EVSYS_INTENSET_OVR2 (_U_(1) << EVSYS_INTENSET_OVR2_Pos) 310 #define EVSYS_INTENSET_OVR3_Pos 3 /**< \brief (EVSYS_INTENSET) Channel 3 Overrun Interrupt Enable */ 311 #define EVSYS_INTENSET_OVR3 (_U_(1) << EVSYS_INTENSET_OVR3_Pos) 312 #define EVSYS_INTENSET_OVR4_Pos 4 /**< \brief (EVSYS_INTENSET) Channel 4 Overrun Interrupt Enable */ 313 #define EVSYS_INTENSET_OVR4 (_U_(1) << EVSYS_INTENSET_OVR4_Pos) 314 #define EVSYS_INTENSET_OVR5_Pos 5 /**< \brief (EVSYS_INTENSET) Channel 5 Overrun Interrupt Enable */ 315 #define EVSYS_INTENSET_OVR5 (_U_(1) << EVSYS_INTENSET_OVR5_Pos) 316 #define EVSYS_INTENSET_OVR6_Pos 6 /**< \brief (EVSYS_INTENSET) Channel 6 Overrun Interrupt Enable */ 317 #define EVSYS_INTENSET_OVR6 (_U_(1) << EVSYS_INTENSET_OVR6_Pos) 318 #define EVSYS_INTENSET_OVR7_Pos 7 /**< \brief (EVSYS_INTENSET) Channel 7 Overrun Interrupt Enable */ 319 #define EVSYS_INTENSET_OVR7 (_U_(1) << EVSYS_INTENSET_OVR7_Pos) 320 #define EVSYS_INTENSET_OVR8_Pos 8 /**< \brief (EVSYS_INTENSET) Channel 8 Overrun Interrupt Enable */ 321 #define EVSYS_INTENSET_OVR8 (_U_(1) << EVSYS_INTENSET_OVR8_Pos) 322 #define EVSYS_INTENSET_OVR9_Pos 9 /**< \brief (EVSYS_INTENSET) Channel 9 Overrun Interrupt Enable */ 323 #define EVSYS_INTENSET_OVR9 (_U_(1) << EVSYS_INTENSET_OVR9_Pos) 324 #define EVSYS_INTENSET_OVR10_Pos 10 /**< \brief (EVSYS_INTENSET) Channel 10 Overrun Interrupt Enable */ 325 #define EVSYS_INTENSET_OVR10 (_U_(1) << EVSYS_INTENSET_OVR10_Pos) 326 #define EVSYS_INTENSET_OVR11_Pos 11 /**< \brief (EVSYS_INTENSET) Channel 11 Overrun Interrupt Enable */ 327 #define EVSYS_INTENSET_OVR11 (_U_(1) << EVSYS_INTENSET_OVR11_Pos) 328 #define EVSYS_INTENSET_OVR_Pos 0 /**< \brief (EVSYS_INTENSET) Channel x Overrun Interrupt Enable */ 329 #define EVSYS_INTENSET_OVR_Msk (_U_(0xFFF) << EVSYS_INTENSET_OVR_Pos) 330 #define EVSYS_INTENSET_OVR(value) (EVSYS_INTENSET_OVR_Msk & ((value) << EVSYS_INTENSET_OVR_Pos)) 331 #define EVSYS_INTENSET_EVD0_Pos 16 /**< \brief (EVSYS_INTENSET) Channel 0 Event Detection Interrupt Enable */ 332 #define EVSYS_INTENSET_EVD0 (_U_(1) << EVSYS_INTENSET_EVD0_Pos) 333 #define EVSYS_INTENSET_EVD1_Pos 17 /**< \brief (EVSYS_INTENSET) Channel 1 Event Detection Interrupt Enable */ 334 #define EVSYS_INTENSET_EVD1 (_U_(1) << EVSYS_INTENSET_EVD1_Pos) 335 #define EVSYS_INTENSET_EVD2_Pos 18 /**< \brief (EVSYS_INTENSET) Channel 2 Event Detection Interrupt Enable */ 336 #define EVSYS_INTENSET_EVD2 (_U_(1) << EVSYS_INTENSET_EVD2_Pos) 337 #define EVSYS_INTENSET_EVD3_Pos 19 /**< \brief (EVSYS_INTENSET) Channel 3 Event Detection Interrupt Enable */ 338 #define EVSYS_INTENSET_EVD3 (_U_(1) << EVSYS_INTENSET_EVD3_Pos) 339 #define EVSYS_INTENSET_EVD4_Pos 20 /**< \brief (EVSYS_INTENSET) Channel 4 Event Detection Interrupt Enable */ 340 #define EVSYS_INTENSET_EVD4 (_U_(1) << EVSYS_INTENSET_EVD4_Pos) 341 #define EVSYS_INTENSET_EVD5_Pos 21 /**< \brief (EVSYS_INTENSET) Channel 5 Event Detection Interrupt Enable */ 342 #define EVSYS_INTENSET_EVD5 (_U_(1) << EVSYS_INTENSET_EVD5_Pos) 343 #define EVSYS_INTENSET_EVD6_Pos 22 /**< \brief (EVSYS_INTENSET) Channel 6 Event Detection Interrupt Enable */ 344 #define EVSYS_INTENSET_EVD6 (_U_(1) << EVSYS_INTENSET_EVD6_Pos) 345 #define EVSYS_INTENSET_EVD7_Pos 23 /**< \brief (EVSYS_INTENSET) Channel 7 Event Detection Interrupt Enable */ 346 #define EVSYS_INTENSET_EVD7 (_U_(1) << EVSYS_INTENSET_EVD7_Pos) 347 #define EVSYS_INTENSET_EVD8_Pos 24 /**< \brief (EVSYS_INTENSET) Channel 8 Event Detection Interrupt Enable */ 348 #define EVSYS_INTENSET_EVD8 (_U_(1) << EVSYS_INTENSET_EVD8_Pos) 349 #define EVSYS_INTENSET_EVD9_Pos 25 /**< \brief (EVSYS_INTENSET) Channel 9 Event Detection Interrupt Enable */ 350 #define EVSYS_INTENSET_EVD9 (_U_(1) << EVSYS_INTENSET_EVD9_Pos) 351 #define EVSYS_INTENSET_EVD10_Pos 26 /**< \brief (EVSYS_INTENSET) Channel 10 Event Detection Interrupt Enable */ 352 #define EVSYS_INTENSET_EVD10 (_U_(1) << EVSYS_INTENSET_EVD10_Pos) 353 #define EVSYS_INTENSET_EVD11_Pos 27 /**< \brief (EVSYS_INTENSET) Channel 11 Event Detection Interrupt Enable */ 354 #define EVSYS_INTENSET_EVD11 (_U_(1) << EVSYS_INTENSET_EVD11_Pos) 355 #define EVSYS_INTENSET_EVD_Pos 16 /**< \brief (EVSYS_INTENSET) Channel x Event Detection Interrupt Enable */ 356 #define EVSYS_INTENSET_EVD_Msk (_U_(0xFFF) << EVSYS_INTENSET_EVD_Pos) 357 #define EVSYS_INTENSET_EVD(value) (EVSYS_INTENSET_EVD_Msk & ((value) << EVSYS_INTENSET_EVD_Pos)) 358 #define EVSYS_INTENSET_MASK _U_(0x0FFF0FFF) /**< \brief (EVSYS_INTENSET) MASK Register */ 359 360 /* -------- EVSYS_INTFLAG : (EVSYS Offset: 0x18) (R/W 32) Interrupt Flag Status and Clear -------- */ 361 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 362 typedef union { // __I to avoid read-modify-write on write-to-clear register 363 struct { 364 __I uint32_t OVR0:1; /*!< bit: 0 Channel 0 Overrun */ 365 __I uint32_t OVR1:1; /*!< bit: 1 Channel 1 Overrun */ 366 __I uint32_t OVR2:1; /*!< bit: 2 Channel 2 Overrun */ 367 __I uint32_t OVR3:1; /*!< bit: 3 Channel 3 Overrun */ 368 __I uint32_t OVR4:1; /*!< bit: 4 Channel 4 Overrun */ 369 __I uint32_t OVR5:1; /*!< bit: 5 Channel 5 Overrun */ 370 __I uint32_t OVR6:1; /*!< bit: 6 Channel 6 Overrun */ 371 __I uint32_t OVR7:1; /*!< bit: 7 Channel 7 Overrun */ 372 __I uint32_t OVR8:1; /*!< bit: 8 Channel 8 Overrun */ 373 __I uint32_t OVR9:1; /*!< bit: 9 Channel 9 Overrun */ 374 __I uint32_t OVR10:1; /*!< bit: 10 Channel 10 Overrun */ 375 __I uint32_t OVR11:1; /*!< bit: 11 Channel 11 Overrun */ 376 __I uint32_t :4; /*!< bit: 12..15 Reserved */ 377 __I uint32_t EVD0:1; /*!< bit: 16 Channel 0 Event Detection */ 378 __I uint32_t EVD1:1; /*!< bit: 17 Channel 1 Event Detection */ 379 __I uint32_t EVD2:1; /*!< bit: 18 Channel 2 Event Detection */ 380 __I uint32_t EVD3:1; /*!< bit: 19 Channel 3 Event Detection */ 381 __I uint32_t EVD4:1; /*!< bit: 20 Channel 4 Event Detection */ 382 __I uint32_t EVD5:1; /*!< bit: 21 Channel 5 Event Detection */ 383 __I uint32_t EVD6:1; /*!< bit: 22 Channel 6 Event Detection */ 384 __I uint32_t EVD7:1; /*!< bit: 23 Channel 7 Event Detection */ 385 __I uint32_t EVD8:1; /*!< bit: 24 Channel 8 Event Detection */ 386 __I uint32_t EVD9:1; /*!< bit: 25 Channel 9 Event Detection */ 387 __I uint32_t EVD10:1; /*!< bit: 26 Channel 10 Event Detection */ 388 __I uint32_t EVD11:1; /*!< bit: 27 Channel 11 Event Detection */ 389 __I uint32_t :4; /*!< bit: 28..31 Reserved */ 390 } bit; /*!< Structure used for bit access */ 391 struct { 392 __I uint32_t OVR:12; /*!< bit: 0..11 Channel x Overrun */ 393 __I uint32_t :4; /*!< bit: 12..15 Reserved */ 394 __I uint32_t EVD:12; /*!< bit: 16..27 Channel x Event Detection */ 395 __I uint32_t :4; /*!< bit: 28..31 Reserved */ 396 } vec; /*!< Structure used for vec access */ 397 uint32_t reg; /*!< Type used for register access */ 398 } EVSYS_INTFLAG_Type; 399 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 400 401 #define EVSYS_INTFLAG_OFFSET 0x18 /**< \brief (EVSYS_INTFLAG offset) Interrupt Flag Status and Clear */ 402 #define EVSYS_INTFLAG_RESETVALUE _U_(0x00000000) /**< \brief (EVSYS_INTFLAG reset_value) Interrupt Flag Status and Clear */ 403 404 #define EVSYS_INTFLAG_OVR0_Pos 0 /**< \brief (EVSYS_INTFLAG) Channel 0 Overrun */ 405 #define EVSYS_INTFLAG_OVR0 (_U_(1) << EVSYS_INTFLAG_OVR0_Pos) 406 #define EVSYS_INTFLAG_OVR1_Pos 1 /**< \brief (EVSYS_INTFLAG) Channel 1 Overrun */ 407 #define EVSYS_INTFLAG_OVR1 (_U_(1) << EVSYS_INTFLAG_OVR1_Pos) 408 #define EVSYS_INTFLAG_OVR2_Pos 2 /**< \brief (EVSYS_INTFLAG) Channel 2 Overrun */ 409 #define EVSYS_INTFLAG_OVR2 (_U_(1) << EVSYS_INTFLAG_OVR2_Pos) 410 #define EVSYS_INTFLAG_OVR3_Pos 3 /**< \brief (EVSYS_INTFLAG) Channel 3 Overrun */ 411 #define EVSYS_INTFLAG_OVR3 (_U_(1) << EVSYS_INTFLAG_OVR3_Pos) 412 #define EVSYS_INTFLAG_OVR4_Pos 4 /**< \brief (EVSYS_INTFLAG) Channel 4 Overrun */ 413 #define EVSYS_INTFLAG_OVR4 (_U_(1) << EVSYS_INTFLAG_OVR4_Pos) 414 #define EVSYS_INTFLAG_OVR5_Pos 5 /**< \brief (EVSYS_INTFLAG) Channel 5 Overrun */ 415 #define EVSYS_INTFLAG_OVR5 (_U_(1) << EVSYS_INTFLAG_OVR5_Pos) 416 #define EVSYS_INTFLAG_OVR6_Pos 6 /**< \brief (EVSYS_INTFLAG) Channel 6 Overrun */ 417 #define EVSYS_INTFLAG_OVR6 (_U_(1) << EVSYS_INTFLAG_OVR6_Pos) 418 #define EVSYS_INTFLAG_OVR7_Pos 7 /**< \brief (EVSYS_INTFLAG) Channel 7 Overrun */ 419 #define EVSYS_INTFLAG_OVR7 (_U_(1) << EVSYS_INTFLAG_OVR7_Pos) 420 #define EVSYS_INTFLAG_OVR8_Pos 8 /**< \brief (EVSYS_INTFLAG) Channel 8 Overrun */ 421 #define EVSYS_INTFLAG_OVR8 (_U_(1) << EVSYS_INTFLAG_OVR8_Pos) 422 #define EVSYS_INTFLAG_OVR9_Pos 9 /**< \brief (EVSYS_INTFLAG) Channel 9 Overrun */ 423 #define EVSYS_INTFLAG_OVR9 (_U_(1) << EVSYS_INTFLAG_OVR9_Pos) 424 #define EVSYS_INTFLAG_OVR10_Pos 10 /**< \brief (EVSYS_INTFLAG) Channel 10 Overrun */ 425 #define EVSYS_INTFLAG_OVR10 (_U_(1) << EVSYS_INTFLAG_OVR10_Pos) 426 #define EVSYS_INTFLAG_OVR11_Pos 11 /**< \brief (EVSYS_INTFLAG) Channel 11 Overrun */ 427 #define EVSYS_INTFLAG_OVR11 (_U_(1) << EVSYS_INTFLAG_OVR11_Pos) 428 #define EVSYS_INTFLAG_OVR_Pos 0 /**< \brief (EVSYS_INTFLAG) Channel x Overrun */ 429 #define EVSYS_INTFLAG_OVR_Msk (_U_(0xFFF) << EVSYS_INTFLAG_OVR_Pos) 430 #define EVSYS_INTFLAG_OVR(value) (EVSYS_INTFLAG_OVR_Msk & ((value) << EVSYS_INTFLAG_OVR_Pos)) 431 #define EVSYS_INTFLAG_EVD0_Pos 16 /**< \brief (EVSYS_INTFLAG) Channel 0 Event Detection */ 432 #define EVSYS_INTFLAG_EVD0 (_U_(1) << EVSYS_INTFLAG_EVD0_Pos) 433 #define EVSYS_INTFLAG_EVD1_Pos 17 /**< \brief (EVSYS_INTFLAG) Channel 1 Event Detection */ 434 #define EVSYS_INTFLAG_EVD1 (_U_(1) << EVSYS_INTFLAG_EVD1_Pos) 435 #define EVSYS_INTFLAG_EVD2_Pos 18 /**< \brief (EVSYS_INTFLAG) Channel 2 Event Detection */ 436 #define EVSYS_INTFLAG_EVD2 (_U_(1) << EVSYS_INTFLAG_EVD2_Pos) 437 #define EVSYS_INTFLAG_EVD3_Pos 19 /**< \brief (EVSYS_INTFLAG) Channel 3 Event Detection */ 438 #define EVSYS_INTFLAG_EVD3 (_U_(1) << EVSYS_INTFLAG_EVD3_Pos) 439 #define EVSYS_INTFLAG_EVD4_Pos 20 /**< \brief (EVSYS_INTFLAG) Channel 4 Event Detection */ 440 #define EVSYS_INTFLAG_EVD4 (_U_(1) << EVSYS_INTFLAG_EVD4_Pos) 441 #define EVSYS_INTFLAG_EVD5_Pos 21 /**< \brief (EVSYS_INTFLAG) Channel 5 Event Detection */ 442 #define EVSYS_INTFLAG_EVD5 (_U_(1) << EVSYS_INTFLAG_EVD5_Pos) 443 #define EVSYS_INTFLAG_EVD6_Pos 22 /**< \brief (EVSYS_INTFLAG) Channel 6 Event Detection */ 444 #define EVSYS_INTFLAG_EVD6 (_U_(1) << EVSYS_INTFLAG_EVD6_Pos) 445 #define EVSYS_INTFLAG_EVD7_Pos 23 /**< \brief (EVSYS_INTFLAG) Channel 7 Event Detection */ 446 #define EVSYS_INTFLAG_EVD7 (_U_(1) << EVSYS_INTFLAG_EVD7_Pos) 447 #define EVSYS_INTFLAG_EVD8_Pos 24 /**< \brief (EVSYS_INTFLAG) Channel 8 Event Detection */ 448 #define EVSYS_INTFLAG_EVD8 (_U_(1) << EVSYS_INTFLAG_EVD8_Pos) 449 #define EVSYS_INTFLAG_EVD9_Pos 25 /**< \brief (EVSYS_INTFLAG) Channel 9 Event Detection */ 450 #define EVSYS_INTFLAG_EVD9 (_U_(1) << EVSYS_INTFLAG_EVD9_Pos) 451 #define EVSYS_INTFLAG_EVD10_Pos 26 /**< \brief (EVSYS_INTFLAG) Channel 10 Event Detection */ 452 #define EVSYS_INTFLAG_EVD10 (_U_(1) << EVSYS_INTFLAG_EVD10_Pos) 453 #define EVSYS_INTFLAG_EVD11_Pos 27 /**< \brief (EVSYS_INTFLAG) Channel 11 Event Detection */ 454 #define EVSYS_INTFLAG_EVD11 (_U_(1) << EVSYS_INTFLAG_EVD11_Pos) 455 #define EVSYS_INTFLAG_EVD_Pos 16 /**< \brief (EVSYS_INTFLAG) Channel x Event Detection */ 456 #define EVSYS_INTFLAG_EVD_Msk (_U_(0xFFF) << EVSYS_INTFLAG_EVD_Pos) 457 #define EVSYS_INTFLAG_EVD(value) (EVSYS_INTFLAG_EVD_Msk & ((value) << EVSYS_INTFLAG_EVD_Pos)) 458 #define EVSYS_INTFLAG_MASK _U_(0x0FFF0FFF) /**< \brief (EVSYS_INTFLAG) MASK Register */ 459 460 /* -------- EVSYS_SWEVT : (EVSYS Offset: 0x1C) ( /W 32) Software Event -------- */ 461 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 462 typedef union { 463 struct { 464 uint32_t CHANNEL0:1; /*!< bit: 0 Channel 0 Software Selection */ 465 uint32_t CHANNEL1:1; /*!< bit: 1 Channel 1 Software Selection */ 466 uint32_t CHANNEL2:1; /*!< bit: 2 Channel 2 Software Selection */ 467 uint32_t CHANNEL3:1; /*!< bit: 3 Channel 3 Software Selection */ 468 uint32_t CHANNEL4:1; /*!< bit: 4 Channel 4 Software Selection */ 469 uint32_t CHANNEL5:1; /*!< bit: 5 Channel 5 Software Selection */ 470 uint32_t CHANNEL6:1; /*!< bit: 6 Channel 6 Software Selection */ 471 uint32_t CHANNEL7:1; /*!< bit: 7 Channel 7 Software Selection */ 472 uint32_t CHANNEL8:1; /*!< bit: 8 Channel 8 Software Selection */ 473 uint32_t CHANNEL9:1; /*!< bit: 9 Channel 9 Software Selection */ 474 uint32_t CHANNEL10:1; /*!< bit: 10 Channel 10 Software Selection */ 475 uint32_t CHANNEL11:1; /*!< bit: 11 Channel 11 Software Selection */ 476 uint32_t :20; /*!< bit: 12..31 Reserved */ 477 } bit; /*!< Structure used for bit access */ 478 struct { 479 uint32_t CHANNEL:12; /*!< bit: 0..11 Channel x Software Selection */ 480 uint32_t :20; /*!< bit: 12..31 Reserved */ 481 } vec; /*!< Structure used for vec access */ 482 uint32_t reg; /*!< Type used for register access */ 483 } EVSYS_SWEVT_Type; 484 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 485 486 #define EVSYS_SWEVT_OFFSET 0x1C /**< \brief (EVSYS_SWEVT offset) Software Event */ 487 #define EVSYS_SWEVT_RESETVALUE _U_(0x00000000) /**< \brief (EVSYS_SWEVT reset_value) Software Event */ 488 489 #define EVSYS_SWEVT_CHANNEL0_Pos 0 /**< \brief (EVSYS_SWEVT) Channel 0 Software Selection */ 490 #define EVSYS_SWEVT_CHANNEL0 (_U_(1) << EVSYS_SWEVT_CHANNEL0_Pos) 491 #define EVSYS_SWEVT_CHANNEL1_Pos 1 /**< \brief (EVSYS_SWEVT) Channel 1 Software Selection */ 492 #define EVSYS_SWEVT_CHANNEL1 (_U_(1) << EVSYS_SWEVT_CHANNEL1_Pos) 493 #define EVSYS_SWEVT_CHANNEL2_Pos 2 /**< \brief (EVSYS_SWEVT) Channel 2 Software Selection */ 494 #define EVSYS_SWEVT_CHANNEL2 (_U_(1) << EVSYS_SWEVT_CHANNEL2_Pos) 495 #define EVSYS_SWEVT_CHANNEL3_Pos 3 /**< \brief (EVSYS_SWEVT) Channel 3 Software Selection */ 496 #define EVSYS_SWEVT_CHANNEL3 (_U_(1) << EVSYS_SWEVT_CHANNEL3_Pos) 497 #define EVSYS_SWEVT_CHANNEL4_Pos 4 /**< \brief (EVSYS_SWEVT) Channel 4 Software Selection */ 498 #define EVSYS_SWEVT_CHANNEL4 (_U_(1) << EVSYS_SWEVT_CHANNEL4_Pos) 499 #define EVSYS_SWEVT_CHANNEL5_Pos 5 /**< \brief (EVSYS_SWEVT) Channel 5 Software Selection */ 500 #define EVSYS_SWEVT_CHANNEL5 (_U_(1) << EVSYS_SWEVT_CHANNEL5_Pos) 501 #define EVSYS_SWEVT_CHANNEL6_Pos 6 /**< \brief (EVSYS_SWEVT) Channel 6 Software Selection */ 502 #define EVSYS_SWEVT_CHANNEL6 (_U_(1) << EVSYS_SWEVT_CHANNEL6_Pos) 503 #define EVSYS_SWEVT_CHANNEL7_Pos 7 /**< \brief (EVSYS_SWEVT) Channel 7 Software Selection */ 504 #define EVSYS_SWEVT_CHANNEL7 (_U_(1) << EVSYS_SWEVT_CHANNEL7_Pos) 505 #define EVSYS_SWEVT_CHANNEL8_Pos 8 /**< \brief (EVSYS_SWEVT) Channel 8 Software Selection */ 506 #define EVSYS_SWEVT_CHANNEL8 (_U_(1) << EVSYS_SWEVT_CHANNEL8_Pos) 507 #define EVSYS_SWEVT_CHANNEL9_Pos 9 /**< \brief (EVSYS_SWEVT) Channel 9 Software Selection */ 508 #define EVSYS_SWEVT_CHANNEL9 (_U_(1) << EVSYS_SWEVT_CHANNEL9_Pos) 509 #define EVSYS_SWEVT_CHANNEL10_Pos 10 /**< \brief (EVSYS_SWEVT) Channel 10 Software Selection */ 510 #define EVSYS_SWEVT_CHANNEL10 (_U_(1) << EVSYS_SWEVT_CHANNEL10_Pos) 511 #define EVSYS_SWEVT_CHANNEL11_Pos 11 /**< \brief (EVSYS_SWEVT) Channel 11 Software Selection */ 512 #define EVSYS_SWEVT_CHANNEL11 (_U_(1) << EVSYS_SWEVT_CHANNEL11_Pos) 513 #define EVSYS_SWEVT_CHANNEL_Pos 0 /**< \brief (EVSYS_SWEVT) Channel x Software Selection */ 514 #define EVSYS_SWEVT_CHANNEL_Msk (_U_(0xFFF) << EVSYS_SWEVT_CHANNEL_Pos) 515 #define EVSYS_SWEVT_CHANNEL(value) (EVSYS_SWEVT_CHANNEL_Msk & ((value) << EVSYS_SWEVT_CHANNEL_Pos)) 516 #define EVSYS_SWEVT_MASK _U_(0x00000FFF) /**< \brief (EVSYS_SWEVT) MASK Register */ 517 518 /* -------- EVSYS_CHANNEL : (EVSYS Offset: 0x20) (R/W 32) Channel n -------- */ 519 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 520 typedef union { 521 struct { 522 uint32_t EVGEN:7; /*!< bit: 0.. 6 Event Generator Selection */ 523 uint32_t :1; /*!< bit: 7 Reserved */ 524 uint32_t PATH:2; /*!< bit: 8.. 9 Path Selection */ 525 uint32_t EDGSEL:2; /*!< bit: 10..11 Edge Detection Selection */ 526 uint32_t :2; /*!< bit: 12..13 Reserved */ 527 uint32_t RUNSTDBY:1; /*!< bit: 14 Run in standby */ 528 uint32_t ONDEMAND:1; /*!< bit: 15 Generic Clock On Demand */ 529 uint32_t :16; /*!< bit: 16..31 Reserved */ 530 } bit; /*!< Structure used for bit access */ 531 uint32_t reg; /*!< Type used for register access */ 532 } EVSYS_CHANNEL_Type; 533 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 534 535 #define EVSYS_CHANNEL_OFFSET 0x20 /**< \brief (EVSYS_CHANNEL offset) Channel n */ 536 #define EVSYS_CHANNEL_RESETVALUE _U_(0x00008000) /**< \brief (EVSYS_CHANNEL reset_value) Channel n */ 537 538 #define EVSYS_CHANNEL_EVGEN_Pos 0 /**< \brief (EVSYS_CHANNEL) Event Generator Selection */ 539 #define EVSYS_CHANNEL_EVGEN_Msk (_U_(0x7F) << EVSYS_CHANNEL_EVGEN_Pos) 540 #define EVSYS_CHANNEL_EVGEN(value) (EVSYS_CHANNEL_EVGEN_Msk & ((value) << EVSYS_CHANNEL_EVGEN_Pos)) 541 #define EVSYS_CHANNEL_PATH_Pos 8 /**< \brief (EVSYS_CHANNEL) Path Selection */ 542 #define EVSYS_CHANNEL_PATH_Msk (_U_(0x3) << EVSYS_CHANNEL_PATH_Pos) 543 #define EVSYS_CHANNEL_PATH(value) (EVSYS_CHANNEL_PATH_Msk & ((value) << EVSYS_CHANNEL_PATH_Pos)) 544 #define EVSYS_CHANNEL_PATH_SYNCHRONOUS_Val _U_(0x0) /**< \brief (EVSYS_CHANNEL) Synchronous path */ 545 #define EVSYS_CHANNEL_PATH_RESYNCHRONIZED_Val _U_(0x1) /**< \brief (EVSYS_CHANNEL) Resynchronized path */ 546 #define EVSYS_CHANNEL_PATH_ASYNCHRONOUS_Val _U_(0x2) /**< \brief (EVSYS_CHANNEL) Asynchronous path */ 547 #define EVSYS_CHANNEL_PATH_SYNCHRONOUS (EVSYS_CHANNEL_PATH_SYNCHRONOUS_Val << EVSYS_CHANNEL_PATH_Pos) 548 #define EVSYS_CHANNEL_PATH_RESYNCHRONIZED (EVSYS_CHANNEL_PATH_RESYNCHRONIZED_Val << EVSYS_CHANNEL_PATH_Pos) 549 #define EVSYS_CHANNEL_PATH_ASYNCHRONOUS (EVSYS_CHANNEL_PATH_ASYNCHRONOUS_Val << EVSYS_CHANNEL_PATH_Pos) 550 #define EVSYS_CHANNEL_EDGSEL_Pos 10 /**< \brief (EVSYS_CHANNEL) Edge Detection Selection */ 551 #define EVSYS_CHANNEL_EDGSEL_Msk (_U_(0x3) << EVSYS_CHANNEL_EDGSEL_Pos) 552 #define EVSYS_CHANNEL_EDGSEL(value) (EVSYS_CHANNEL_EDGSEL_Msk & ((value) << EVSYS_CHANNEL_EDGSEL_Pos)) 553 #define EVSYS_CHANNEL_EDGSEL_NO_EVT_OUTPUT_Val _U_(0x0) /**< \brief (EVSYS_CHANNEL) No event output when using the resynchronized or synchronous path */ 554 #define EVSYS_CHANNEL_EDGSEL_RISING_EDGE_Val _U_(0x1) /**< \brief (EVSYS_CHANNEL) Event detection only on the rising edge of the signal from the event generator when using the resynchronized or synchronous path */ 555 #define EVSYS_CHANNEL_EDGSEL_FALLING_EDGE_Val _U_(0x2) /**< \brief (EVSYS_CHANNEL) Event detection only on the falling edge of the signal from the event generator when using the resynchronized or synchronous path */ 556 #define EVSYS_CHANNEL_EDGSEL_BOTH_EDGES_Val _U_(0x3) /**< \brief (EVSYS_CHANNEL) Event detection on rising and falling edges of the signal from the event generator when using the resynchronized or synchronous path */ 557 #define EVSYS_CHANNEL_EDGSEL_NO_EVT_OUTPUT (EVSYS_CHANNEL_EDGSEL_NO_EVT_OUTPUT_Val << EVSYS_CHANNEL_EDGSEL_Pos) 558 #define EVSYS_CHANNEL_EDGSEL_RISING_EDGE (EVSYS_CHANNEL_EDGSEL_RISING_EDGE_Val << EVSYS_CHANNEL_EDGSEL_Pos) 559 #define EVSYS_CHANNEL_EDGSEL_FALLING_EDGE (EVSYS_CHANNEL_EDGSEL_FALLING_EDGE_Val << EVSYS_CHANNEL_EDGSEL_Pos) 560 #define EVSYS_CHANNEL_EDGSEL_BOTH_EDGES (EVSYS_CHANNEL_EDGSEL_BOTH_EDGES_Val << EVSYS_CHANNEL_EDGSEL_Pos) 561 #define EVSYS_CHANNEL_RUNSTDBY_Pos 14 /**< \brief (EVSYS_CHANNEL) Run in standby */ 562 #define EVSYS_CHANNEL_RUNSTDBY (_U_(0x1) << EVSYS_CHANNEL_RUNSTDBY_Pos) 563 #define EVSYS_CHANNEL_ONDEMAND_Pos 15 /**< \brief (EVSYS_CHANNEL) Generic Clock On Demand */ 564 #define EVSYS_CHANNEL_ONDEMAND (_U_(0x1) << EVSYS_CHANNEL_ONDEMAND_Pos) 565 #define EVSYS_CHANNEL_MASK _U_(0x0000CF7F) /**< \brief (EVSYS_CHANNEL) MASK Register */ 566 567 /* -------- EVSYS_USER : (EVSYS Offset: 0x80) (R/W 32) User Multiplexer n -------- */ 568 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 569 typedef union { 570 struct { 571 uint32_t CHANNEL:5; /*!< bit: 0.. 4 Channel Event Selection */ 572 uint32_t :27; /*!< bit: 5..31 Reserved */ 573 } bit; /*!< Structure used for bit access */ 574 uint32_t reg; /*!< Type used for register access */ 575 } EVSYS_USER_Type; 576 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 577 578 #define EVSYS_USER_OFFSET 0x80 /**< \brief (EVSYS_USER offset) User Multiplexer n */ 579 #define EVSYS_USER_RESETVALUE _U_(0x00000000) /**< \brief (EVSYS_USER reset_value) User Multiplexer n */ 580 581 #define EVSYS_USER_CHANNEL_Pos 0 /**< \brief (EVSYS_USER) Channel Event Selection */ 582 #define EVSYS_USER_CHANNEL_Msk (_U_(0x1F) << EVSYS_USER_CHANNEL_Pos) 583 #define EVSYS_USER_CHANNEL(value) (EVSYS_USER_CHANNEL_Msk & ((value) << EVSYS_USER_CHANNEL_Pos)) 584 #define EVSYS_USER_MASK _U_(0x0000001F) /**< \brief (EVSYS_USER) MASK Register */ 585 586 /** \brief EVSYS hardware registers */ 587 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 588 typedef struct { 589 __IO EVSYS_CTRLA_Type CTRLA; /**< \brief Offset: 0x00 (R/W 8) Control */ 590 RoReg8 Reserved1[0xB]; 591 __I EVSYS_CHSTATUS_Type CHSTATUS; /**< \brief Offset: 0x0C (R/ 32) Channel Status */ 592 __IO EVSYS_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x10 (R/W 32) Interrupt Enable Clear */ 593 __IO EVSYS_INTENSET_Type INTENSET; /**< \brief Offset: 0x14 (R/W 32) Interrupt Enable Set */ 594 __IO EVSYS_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x18 (R/W 32) Interrupt Flag Status and Clear */ 595 __O EVSYS_SWEVT_Type SWEVT; /**< \brief Offset: 0x1C ( /W 32) Software Event */ 596 __IO EVSYS_CHANNEL_Type CHANNEL[12]; /**< \brief Offset: 0x20 (R/W 32) Channel n */ 597 RoReg8 Reserved2[0x30]; 598 __IO EVSYS_USER_Type USER[50]; /**< \brief Offset: 0x80 (R/W 32) User Multiplexer n */ 599 } Evsys; 600 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 601 602 /*@}*/ 603 604 #endif /* _SAMC21_EVSYS_COMPONENT_ */ 605