Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_SAMD21J18A/ins_evsys.h@120:2eb10e18b8d7, 2016-04-13 (annotated)
- Committer:
- elijahorr
- Date:
- Wed Apr 13 12:29:27 2016 +0000
- Revision:
- 120:2eb10e18b8d7
- Parent:
- 111:4336505e4b1c
V1.1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 111:4336505e4b1c | 1 | /** |
Kojto | 111:4336505e4b1c | 2 | * \file |
Kojto | 111:4336505e4b1c | 3 | * |
Kojto | 111:4336505e4b1c | 4 | * \brief Instance description for EVSYS |
Kojto | 111:4336505e4b1c | 5 | * |
Kojto | 111:4336505e4b1c | 6 | * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved. |
Kojto | 111:4336505e4b1c | 7 | * |
Kojto | 111:4336505e4b1c | 8 | * \asf_license_start |
Kojto | 111:4336505e4b1c | 9 | * |
Kojto | 111:4336505e4b1c | 10 | * \page License |
Kojto | 111:4336505e4b1c | 11 | * |
Kojto | 111:4336505e4b1c | 12 | * Redistribution and use in source and binary forms, with or without |
Kojto | 111:4336505e4b1c | 13 | * modification, are permitted provided that the following conditions are met: |
Kojto | 111:4336505e4b1c | 14 | * |
Kojto | 111:4336505e4b1c | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 111:4336505e4b1c | 16 | * this list of conditions and the following disclaimer. |
Kojto | 111:4336505e4b1c | 17 | * |
Kojto | 111:4336505e4b1c | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 111:4336505e4b1c | 19 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 111:4336505e4b1c | 20 | * and/or other materials provided with the distribution. |
Kojto | 111:4336505e4b1c | 21 | * |
Kojto | 111:4336505e4b1c | 22 | * 3. The name of Atmel may not be used to endorse or promote products derived |
Kojto | 111:4336505e4b1c | 23 | * from this software without specific prior written permission. |
Kojto | 111:4336505e4b1c | 24 | * |
Kojto | 111:4336505e4b1c | 25 | * 4. This software may only be redistributed and used in connection with an |
Kojto | 111:4336505e4b1c | 26 | * Atmel microcontroller product. |
Kojto | 111:4336505e4b1c | 27 | * |
Kojto | 111:4336505e4b1c | 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED |
Kojto | 111:4336505e4b1c | 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
Kojto | 111:4336505e4b1c | 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE |
Kojto | 111:4336505e4b1c | 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR |
Kojto | 111:4336505e4b1c | 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 111:4336505e4b1c | 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
Kojto | 111:4336505e4b1c | 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
Kojto | 111:4336505e4b1c | 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
Kojto | 111:4336505e4b1c | 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
Kojto | 111:4336505e4b1c | 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
Kojto | 111:4336505e4b1c | 38 | * POSSIBILITY OF SUCH DAMAGE. |
Kojto | 111:4336505e4b1c | 39 | * |
Kojto | 111:4336505e4b1c | 40 | * \asf_license_stop |
Kojto | 111:4336505e4b1c | 41 | * |
Kojto | 111:4336505e4b1c | 42 | */ |
Kojto | 111:4336505e4b1c | 43 | /* |
Kojto | 111:4336505e4b1c | 44 | * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> |
Kojto | 111:4336505e4b1c | 45 | */ |
Kojto | 111:4336505e4b1c | 46 | |
Kojto | 111:4336505e4b1c | 47 | #ifndef _SAMD21_EVSYS_INSTANCE_ |
Kojto | 111:4336505e4b1c | 48 | #define _SAMD21_EVSYS_INSTANCE_ |
Kojto | 111:4336505e4b1c | 49 | |
Kojto | 111:4336505e4b1c | 50 | /* ========== Register definition for EVSYS peripheral ========== */ |
Kojto | 111:4336505e4b1c | 51 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
Kojto | 111:4336505e4b1c | 52 | #define REG_EVSYS_CTRL (0x42000400U) /**< \brief (EVSYS) Control */ |
Kojto | 111:4336505e4b1c | 53 | #define REG_EVSYS_CHANNEL (0x42000404U) /**< \brief (EVSYS) Channel */ |
Kojto | 111:4336505e4b1c | 54 | #define REG_EVSYS_USER (0x42000408U) /**< \brief (EVSYS) User Multiplexer */ |
Kojto | 111:4336505e4b1c | 55 | #define REG_EVSYS_CHSTATUS (0x4200040CU) /**< \brief (EVSYS) Channel Status */ |
Kojto | 111:4336505e4b1c | 56 | #define REG_EVSYS_INTENCLR (0x42000410U) /**< \brief (EVSYS) Interrupt Enable Clear */ |
Kojto | 111:4336505e4b1c | 57 | #define REG_EVSYS_INTENSET (0x42000414U) /**< \brief (EVSYS) Interrupt Enable Set */ |
Kojto | 111:4336505e4b1c | 58 | #define REG_EVSYS_INTFLAG (0x42000418U) /**< \brief (EVSYS) Interrupt Flag Status and Clear */ |
Kojto | 111:4336505e4b1c | 59 | #else |
Kojto | 111:4336505e4b1c | 60 | #define REG_EVSYS_CTRL (*(WoReg8 *)0x42000400U) /**< \brief (EVSYS) Control */ |
Kojto | 111:4336505e4b1c | 61 | #define REG_EVSYS_CHANNEL (*(RwReg *)0x42000404U) /**< \brief (EVSYS) Channel */ |
Kojto | 111:4336505e4b1c | 62 | #define REG_EVSYS_USER (*(RwReg16*)0x42000408U) /**< \brief (EVSYS) User Multiplexer */ |
Kojto | 111:4336505e4b1c | 63 | #define REG_EVSYS_CHSTATUS (*(RoReg *)0x4200040CU) /**< \brief (EVSYS) Channel Status */ |
Kojto | 111:4336505e4b1c | 64 | #define REG_EVSYS_INTENCLR (*(RwReg *)0x42000410U) /**< \brief (EVSYS) Interrupt Enable Clear */ |
Kojto | 111:4336505e4b1c | 65 | #define REG_EVSYS_INTENSET (*(RwReg *)0x42000414U) /**< \brief (EVSYS) Interrupt Enable Set */ |
Kojto | 111:4336505e4b1c | 66 | #define REG_EVSYS_INTFLAG (*(RwReg *)0x42000418U) /**< \brief (EVSYS) Interrupt Flag Status and Clear */ |
Kojto | 111:4336505e4b1c | 67 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
Kojto | 111:4336505e4b1c | 68 | |
Kojto | 111:4336505e4b1c | 69 | /* ========== Instance parameters for EVSYS peripheral ========== */ |
Kojto | 111:4336505e4b1c | 70 | #define EVSYS_CHANNELS 12 // Number of Channels |
Kojto | 111:4336505e4b1c | 71 | #define EVSYS_CHANNELS_BITS 4 // Number of bits to select Channel |
Kojto | 111:4336505e4b1c | 72 | #define EVSYS_CHANNELS_MSB 11 // Number of Channels - 1 |
Kojto | 111:4336505e4b1c | 73 | #define EVSYS_EXTEVT_NUM 0 // Number of External Event Generators |
Kojto | 111:4336505e4b1c | 74 | #define EVSYS_GCLK_ID_0 7 |
Kojto | 111:4336505e4b1c | 75 | #define EVSYS_GCLK_ID_1 8 |
Kojto | 111:4336505e4b1c | 76 | #define EVSYS_GCLK_ID_2 9 |
Kojto | 111:4336505e4b1c | 77 | #define EVSYS_GCLK_ID_3 10 |
Kojto | 111:4336505e4b1c | 78 | #define EVSYS_GCLK_ID_4 11 |
Kojto | 111:4336505e4b1c | 79 | #define EVSYS_GCLK_ID_5 12 |
Kojto | 111:4336505e4b1c | 80 | #define EVSYS_GCLK_ID_6 13 |
Kojto | 111:4336505e4b1c | 81 | #define EVSYS_GCLK_ID_7 14 |
Kojto | 111:4336505e4b1c | 82 | #define EVSYS_GCLK_ID_8 15 |
Kojto | 111:4336505e4b1c | 83 | #define EVSYS_GCLK_ID_9 16 |
Kojto | 111:4336505e4b1c | 84 | #define EVSYS_GCLK_ID_10 17 |
Kojto | 111:4336505e4b1c | 85 | #define EVSYS_GCLK_ID_11 18 |
Kojto | 111:4336505e4b1c | 86 | #define EVSYS_GCLK_ID_LSB 7 |
Kojto | 111:4336505e4b1c | 87 | #define EVSYS_GCLK_ID_MSB 18 |
Kojto | 111:4336505e4b1c | 88 | #define EVSYS_GCLK_ID_SIZE 12 |
Kojto | 111:4336505e4b1c | 89 | #define EVSYS_GENERATORS 76 // Total Number of Event Generators |
Kojto | 111:4336505e4b1c | 90 | #define EVSYS_GENERATORS_BITS 7 // Number of bits to select Event Generator |
Kojto | 111:4336505e4b1c | 91 | #define EVSYS_USERS 31 // Total Number of Event Users |
Kojto | 111:4336505e4b1c | 92 | #define EVSYS_USERS_BITS 5 // Number of bits to select Event User |
Kojto | 111:4336505e4b1c | 93 | |
Kojto | 111:4336505e4b1c | 94 | // GENERATORS |
Kojto | 111:4336505e4b1c | 95 | #define EVSYS_ID_GEN_RTC_CMP_0 1 |
Kojto | 111:4336505e4b1c | 96 | #define EVSYS_ID_GEN_RTC_CMP_1 2 |
Kojto | 111:4336505e4b1c | 97 | #define EVSYS_ID_GEN_RTC_OVF 3 |
Kojto | 111:4336505e4b1c | 98 | #define EVSYS_ID_GEN_RTC_PER_0 4 |
Kojto | 111:4336505e4b1c | 99 | #define EVSYS_ID_GEN_RTC_PER_1 5 |
Kojto | 111:4336505e4b1c | 100 | #define EVSYS_ID_GEN_RTC_PER_2 6 |
Kojto | 111:4336505e4b1c | 101 | #define EVSYS_ID_GEN_RTC_PER_3 7 |
Kojto | 111:4336505e4b1c | 102 | #define EVSYS_ID_GEN_RTC_PER_4 8 |
Kojto | 111:4336505e4b1c | 103 | #define EVSYS_ID_GEN_RTC_PER_5 9 |
Kojto | 111:4336505e4b1c | 104 | #define EVSYS_ID_GEN_RTC_PER_6 10 |
Kojto | 111:4336505e4b1c | 105 | #define EVSYS_ID_GEN_RTC_PER_7 11 |
Kojto | 111:4336505e4b1c | 106 | #define EVSYS_ID_GEN_EIC_EXTINT_0 12 |
Kojto | 111:4336505e4b1c | 107 | #define EVSYS_ID_GEN_EIC_EXTINT_1 13 |
Kojto | 111:4336505e4b1c | 108 | #define EVSYS_ID_GEN_EIC_EXTINT_2 14 |
Kojto | 111:4336505e4b1c | 109 | #define EVSYS_ID_GEN_EIC_EXTINT_3 15 |
Kojto | 111:4336505e4b1c | 110 | #define EVSYS_ID_GEN_EIC_EXTINT_4 16 |
Kojto | 111:4336505e4b1c | 111 | #define EVSYS_ID_GEN_EIC_EXTINT_5 17 |
Kojto | 111:4336505e4b1c | 112 | #define EVSYS_ID_GEN_EIC_EXTINT_6 18 |
Kojto | 111:4336505e4b1c | 113 | #define EVSYS_ID_GEN_EIC_EXTINT_7 19 |
Kojto | 111:4336505e4b1c | 114 | #define EVSYS_ID_GEN_EIC_EXTINT_8 20 |
Kojto | 111:4336505e4b1c | 115 | #define EVSYS_ID_GEN_EIC_EXTINT_9 21 |
Kojto | 111:4336505e4b1c | 116 | #define EVSYS_ID_GEN_EIC_EXTINT_10 22 |
Kojto | 111:4336505e4b1c | 117 | #define EVSYS_ID_GEN_EIC_EXTINT_11 23 |
Kojto | 111:4336505e4b1c | 118 | #define EVSYS_ID_GEN_EIC_EXTINT_12 24 |
Kojto | 111:4336505e4b1c | 119 | #define EVSYS_ID_GEN_EIC_EXTINT_13 25 |
Kojto | 111:4336505e4b1c | 120 | #define EVSYS_ID_GEN_EIC_EXTINT_14 26 |
Kojto | 111:4336505e4b1c | 121 | #define EVSYS_ID_GEN_EIC_EXTINT_15 27 |
Kojto | 111:4336505e4b1c | 122 | #define EVSYS_ID_GEN_EIC_EXTINT_16 28 |
Kojto | 111:4336505e4b1c | 123 | #define EVSYS_ID_GEN_EIC_EXTINT_17 29 |
Kojto | 111:4336505e4b1c | 124 | #define EVSYS_ID_GEN_DMAC_CH_0 30 |
Kojto | 111:4336505e4b1c | 125 | #define EVSYS_ID_GEN_DMAC_CH_1 31 |
Kojto | 111:4336505e4b1c | 126 | #define EVSYS_ID_GEN_DMAC_CH_2 32 |
Kojto | 111:4336505e4b1c | 127 | #define EVSYS_ID_GEN_DMAC_CH_3 33 |
Kojto | 111:4336505e4b1c | 128 | #define EVSYS_ID_GEN_TCC0_OVF 34 |
Kojto | 111:4336505e4b1c | 129 | #define EVSYS_ID_GEN_TCC0_TRG 35 |
Kojto | 111:4336505e4b1c | 130 | #define EVSYS_ID_GEN_TCC0_CNT 36 |
Kojto | 111:4336505e4b1c | 131 | #define EVSYS_ID_GEN_TCC0_MCX_0 37 |
Kojto | 111:4336505e4b1c | 132 | #define EVSYS_ID_GEN_TCC0_MCX_1 38 |
Kojto | 111:4336505e4b1c | 133 | #define EVSYS_ID_GEN_TCC0_MCX_2 39 |
Kojto | 111:4336505e4b1c | 134 | #define EVSYS_ID_GEN_TCC0_MCX_3 40 |
Kojto | 111:4336505e4b1c | 135 | #define EVSYS_ID_GEN_TCC1_OVF 41 |
Kojto | 111:4336505e4b1c | 136 | #define EVSYS_ID_GEN_TCC1_TRG 42 |
Kojto | 111:4336505e4b1c | 137 | #define EVSYS_ID_GEN_TCC1_CNT 43 |
Kojto | 111:4336505e4b1c | 138 | #define EVSYS_ID_GEN_TCC1_MCX_0 44 |
Kojto | 111:4336505e4b1c | 139 | #define EVSYS_ID_GEN_TCC1_MCX_1 45 |
Kojto | 111:4336505e4b1c | 140 | #define EVSYS_ID_GEN_TCC2_OVF 46 |
Kojto | 111:4336505e4b1c | 141 | #define EVSYS_ID_GEN_TCC2_TRG 47 |
Kojto | 111:4336505e4b1c | 142 | #define EVSYS_ID_GEN_TCC2_CNT 48 |
Kojto | 111:4336505e4b1c | 143 | #define EVSYS_ID_GEN_TCC2_MCX_0 49 |
Kojto | 111:4336505e4b1c | 144 | #define EVSYS_ID_GEN_TCC2_MCX_1 50 |
Kojto | 111:4336505e4b1c | 145 | #define EVSYS_ID_GEN_TC3_OVF 51 |
Kojto | 111:4336505e4b1c | 146 | #define EVSYS_ID_GEN_TC3_MCX_0 52 |
Kojto | 111:4336505e4b1c | 147 | #define EVSYS_ID_GEN_TC3_MCX_1 53 |
Kojto | 111:4336505e4b1c | 148 | #define EVSYS_ID_GEN_TC4_OVF 54 |
Kojto | 111:4336505e4b1c | 149 | #define EVSYS_ID_GEN_TC4_MCX_0 55 |
Kojto | 111:4336505e4b1c | 150 | #define EVSYS_ID_GEN_TC4_MCX_1 56 |
Kojto | 111:4336505e4b1c | 151 | #define EVSYS_ID_GEN_TC5_OVF 57 |
Kojto | 111:4336505e4b1c | 152 | #define EVSYS_ID_GEN_TC5_MCX_0 58 |
Kojto | 111:4336505e4b1c | 153 | #define EVSYS_ID_GEN_TC5_MCX_1 59 |
Kojto | 111:4336505e4b1c | 154 | #define EVSYS_ID_GEN_TC6_OVF 60 |
Kojto | 111:4336505e4b1c | 155 | #define EVSYS_ID_GEN_TC6_MCX_0 61 |
Kojto | 111:4336505e4b1c | 156 | #define EVSYS_ID_GEN_TC6_MCX_1 62 |
Kojto | 111:4336505e4b1c | 157 | #define EVSYS_ID_GEN_TC7_OVF 63 |
Kojto | 111:4336505e4b1c | 158 | #define EVSYS_ID_GEN_TC7_MCX_0 64 |
Kojto | 111:4336505e4b1c | 159 | #define EVSYS_ID_GEN_TC7_MCX_1 65 |
Kojto | 111:4336505e4b1c | 160 | #define EVSYS_ID_GEN_ADC_RESRDY 66 |
Kojto | 111:4336505e4b1c | 161 | #define EVSYS_ID_GEN_ADC_WINMON 67 |
Kojto | 111:4336505e4b1c | 162 | #define EVSYS_ID_GEN_AC_COMP_0 68 |
Kojto | 111:4336505e4b1c | 163 | #define EVSYS_ID_GEN_AC_COMP_1 69 |
Kojto | 111:4336505e4b1c | 164 | #define EVSYS_ID_GEN_AC_WIN_0 70 |
Kojto | 111:4336505e4b1c | 165 | #define EVSYS_ID_GEN_DAC_EMPTY 71 |
Kojto | 111:4336505e4b1c | 166 | #define EVSYS_ID_GEN_PTC_EOC 72 |
Kojto | 111:4336505e4b1c | 167 | #define EVSYS_ID_GEN_PTC_WCOMP 73 |
Kojto | 111:4336505e4b1c | 168 | #define EVSYS_ID_GEN_AC1_COMP_0 74 |
Kojto | 111:4336505e4b1c | 169 | #define EVSYS_ID_GEN_AC1_COMP_1 75 |
Kojto | 111:4336505e4b1c | 170 | #define EVSYS_ID_GEN_AC1_WIN_0 76 |
Kojto | 111:4336505e4b1c | 171 | |
Kojto | 111:4336505e4b1c | 172 | // USERS |
Kojto | 111:4336505e4b1c | 173 | #define EVSYS_ID_USER_DMAC_CH_0 0 |
Kojto | 111:4336505e4b1c | 174 | #define EVSYS_ID_USER_DMAC_CH_1 1 |
Kojto | 111:4336505e4b1c | 175 | #define EVSYS_ID_USER_DMAC_CH_2 2 |
Kojto | 111:4336505e4b1c | 176 | #define EVSYS_ID_USER_DMAC_CH_3 3 |
Kojto | 111:4336505e4b1c | 177 | #define EVSYS_ID_USER_TCC0_EV_0 4 |
Kojto | 111:4336505e4b1c | 178 | #define EVSYS_ID_USER_TCC0_EV_1 5 |
Kojto | 111:4336505e4b1c | 179 | #define EVSYS_ID_USER_TCC0_MC_0 6 |
Kojto | 111:4336505e4b1c | 180 | #define EVSYS_ID_USER_TCC0_MC_1 7 |
Kojto | 111:4336505e4b1c | 181 | #define EVSYS_ID_USER_TCC0_MC_2 8 |
Kojto | 111:4336505e4b1c | 182 | #define EVSYS_ID_USER_TCC0_MC_3 9 |
Kojto | 111:4336505e4b1c | 183 | #define EVSYS_ID_USER_TCC1_EV_0 10 |
Kojto | 111:4336505e4b1c | 184 | #define EVSYS_ID_USER_TCC1_EV_1 11 |
Kojto | 111:4336505e4b1c | 185 | #define EVSYS_ID_USER_TCC1_MC_0 12 |
Kojto | 111:4336505e4b1c | 186 | #define EVSYS_ID_USER_TCC1_MC_1 13 |
Kojto | 111:4336505e4b1c | 187 | #define EVSYS_ID_USER_TCC2_EV_0 14 |
Kojto | 111:4336505e4b1c | 188 | #define EVSYS_ID_USER_TCC2_EV_1 15 |
Kojto | 111:4336505e4b1c | 189 | #define EVSYS_ID_USER_TCC2_MC_0 16 |
Kojto | 111:4336505e4b1c | 190 | #define EVSYS_ID_USER_TCC2_MC_1 17 |
Kojto | 111:4336505e4b1c | 191 | #define EVSYS_ID_USER_TC3_EVU 18 |
Kojto | 111:4336505e4b1c | 192 | #define EVSYS_ID_USER_TC4_EVU 19 |
Kojto | 111:4336505e4b1c | 193 | #define EVSYS_ID_USER_TC5_EVU 20 |
Kojto | 111:4336505e4b1c | 194 | #define EVSYS_ID_USER_TC6_EVU 21 |
Kojto | 111:4336505e4b1c | 195 | #define EVSYS_ID_USER_TC7_EVU 22 |
Kojto | 111:4336505e4b1c | 196 | #define EVSYS_ID_USER_ADC_START 23 |
Kojto | 111:4336505e4b1c | 197 | #define EVSYS_ID_USER_ADC_SYNC 24 |
Kojto | 111:4336505e4b1c | 198 | #define EVSYS_ID_USER_AC_SOC_0 25 |
Kojto | 111:4336505e4b1c | 199 | #define EVSYS_ID_USER_AC_SOC_1 26 |
Kojto | 111:4336505e4b1c | 200 | #define EVSYS_ID_USER_DAC_START 27 |
Kojto | 111:4336505e4b1c | 201 | #define EVSYS_ID_USER_PTC_STCONV 28 |
Kojto | 111:4336505e4b1c | 202 | #define EVSYS_ID_USER_AC1_SOC_0 29 |
Kojto | 111:4336505e4b1c | 203 | #define EVSYS_ID_USER_AC1_SOC_1 30 |
Kojto | 111:4336505e4b1c | 204 | |
Kojto | 111:4336505e4b1c | 205 | #endif /* _SAMD21_EVSYS_INSTANCE_ */ |