The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_SAMD21G18A/TOOLCHAIN_ARM_MICRO/system_interrupt_features.h@171:3a7713b1edbc, 2018-11-08 (annotated)
- Committer:
- AnnaBridge
- Date:
- Thu Nov 08 11:45:42 2018 +0000
- Revision:
- 171:3a7713b1edbc
- Parent:
- TARGET_SAMD21G18A/TARGET_Atmel/TARGET_SAM_CortexM0P/drivers/system/interrupt/TARGET_SAMD21/system_interrupt_features.h@111:4336505e4b1c
mbed library. Release version 164
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 SAM D21 System Interrupt Driver |
Kojto | 111:4336505e4b1c | 5 | * |
Kojto | 111:4336505e4b1c | 6 | * Copyright (C) 2013-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 SYSTEM_INTERRUPT_FEATURES_H_INCLUDED |
Kojto | 111:4336505e4b1c | 48 | #define SYSTEM_INTERRUPT_FEATURES_H_INCLUDED |
Kojto | 111:4336505e4b1c | 49 | |
Kojto | 111:4336505e4b1c | 50 | #if !defined(__DOXYGEN__) |
Kojto | 111:4336505e4b1c | 51 | |
Kojto | 111:4336505e4b1c | 52 | /* Generates a interrupt vector table enum list entry for a given module type |
Kojto | 111:4336505e4b1c | 53 | and index (e.g. "SYSTEM_INTERRUPT_MODULE_TC0 = TC0_IRQn,"). */ |
Kojto | 111:4336505e4b1c | 54 | # define _MODULE_IRQn(n, module) \ |
Kojto | 111:4336505e4b1c | 55 | SYSTEM_INTERRUPT_MODULE_##module##n = module##n##_IRQn, |
Kojto | 111:4336505e4b1c | 56 | |
Kojto | 111:4336505e4b1c | 57 | /* Generates interrupt vector table enum list entries for all instances of a |
Kojto | 111:4336505e4b1c | 58 | given module type on the selected device. */ |
Kojto | 111:4336505e4b1c | 59 | # define _SYSTEM_INTERRUPT_MODULES(name) \ |
Kojto | 111:4336505e4b1c | 60 | MREPEAT(name##_INST_NUM, _MODULE_IRQn, name) |
Kojto | 111:4336505e4b1c | 61 | |
Kojto | 111:4336505e4b1c | 62 | # define _SYSTEM_INTERRUPT_IPSR_MASK 0x0000003f |
Kojto | 111:4336505e4b1c | 63 | # define _SYSTEM_INTERRUPT_PRIORITY_MASK 0x00000003 |
Kojto | 111:4336505e4b1c | 64 | |
Kojto | 111:4336505e4b1c | 65 | # define _SYSTEM_INTERRUPT_EXTERNAL_VECTOR_START 0 |
Kojto | 111:4336505e4b1c | 66 | |
Kojto | 111:4336505e4b1c | 67 | # define _SYSTEM_INTERRUPT_SYSTICK_PRI_POS 30 |
Kojto | 111:4336505e4b1c | 68 | #endif |
Kojto | 111:4336505e4b1c | 69 | |
Kojto | 111:4336505e4b1c | 70 | /** |
Kojto | 111:4336505e4b1c | 71 | * \addtogroup asfdoc_sam0_system_interrupt_group |
Kojto | 111:4336505e4b1c | 72 | * @{ |
Kojto | 111:4336505e4b1c | 73 | */ |
Kojto | 111:4336505e4b1c | 74 | |
Kojto | 111:4336505e4b1c | 75 | /** |
Kojto | 111:4336505e4b1c | 76 | * \brief Table of possible system interrupt/exception vector numbers. |
Kojto | 111:4336505e4b1c | 77 | * |
Kojto | 111:4336505e4b1c | 78 | * Table of all possible interrupt and exception vector indexes within the |
Kojto | 111:4336505e4b1c | 79 | * SAMD21 device. Check peripherals configuration in SAMD21 datasheet for |
Kojto | 111:4336505e4b1c | 80 | * available vector index for specific device. |
Kojto | 111:4336505e4b1c | 81 | * |
Kojto | 111:4336505e4b1c | 82 | */ |
Kojto | 111:4336505e4b1c | 83 | #if defined(__DOXYGEN__) |
Kojto | 111:4336505e4b1c | 84 | /** \note The actual enumeration name is "system_interrupt_vector". */ |
Kojto | 111:4336505e4b1c | 85 | enum system_interrupt_vector_samd21 { |
Kojto | 111:4336505e4b1c | 86 | #else |
Kojto | 111:4336505e4b1c | 87 | enum system_interrupt_vector { |
Kojto | 111:4336505e4b1c | 88 | #endif |
Kojto | 111:4336505e4b1c | 89 | /** Interrupt vector index for a NMI interrupt. */ |
Kojto | 111:4336505e4b1c | 90 | SYSTEM_INTERRUPT_NON_MASKABLE = NonMaskableInt_IRQn, |
Kojto | 111:4336505e4b1c | 91 | /** Interrupt vector index for a Hard Fault memory access exception. */ |
Kojto | 111:4336505e4b1c | 92 | SYSTEM_INTERRUPT_HARD_FAULT = HardFault_IRQn, |
Kojto | 111:4336505e4b1c | 93 | /** Interrupt vector index for a Supervisor Call exception. */ |
Kojto | 111:4336505e4b1c | 94 | SYSTEM_INTERRUPT_SV_CALL = SVCall_IRQn, |
Kojto | 111:4336505e4b1c | 95 | /** Interrupt vector index for a Pending Supervisor interrupt. */ |
Kojto | 111:4336505e4b1c | 96 | SYSTEM_INTERRUPT_PENDING_SV = PendSV_IRQn, |
Kojto | 111:4336505e4b1c | 97 | /** Interrupt vector index for a System Tick interrupt. */ |
Kojto | 111:4336505e4b1c | 98 | SYSTEM_INTERRUPT_SYSTICK = SysTick_IRQn, |
Kojto | 111:4336505e4b1c | 99 | |
Kojto | 111:4336505e4b1c | 100 | /** Interrupt vector index for a Power Manager peripheral interrupt. */ |
Kojto | 111:4336505e4b1c | 101 | SYSTEM_INTERRUPT_MODULE_PM = PM_IRQn, |
Kojto | 111:4336505e4b1c | 102 | /** Interrupt vector index for a System Control peripheral interrupt. */ |
Kojto | 111:4336505e4b1c | 103 | SYSTEM_INTERRUPT_MODULE_SYSCTRL = SYSCTRL_IRQn, |
Kojto | 111:4336505e4b1c | 104 | /** Interrupt vector index for a Watch Dog peripheral interrupt. */ |
Kojto | 111:4336505e4b1c | 105 | SYSTEM_INTERRUPT_MODULE_WDT = WDT_IRQn, |
Kojto | 111:4336505e4b1c | 106 | /** Interrupt vector index for a Real Time Clock peripheral interrupt. */ |
Kojto | 111:4336505e4b1c | 107 | SYSTEM_INTERRUPT_MODULE_RTC = RTC_IRQn, |
Kojto | 111:4336505e4b1c | 108 | /** Interrupt vector index for an External Interrupt peripheral interrupt. */ |
Kojto | 111:4336505e4b1c | 109 | SYSTEM_INTERRUPT_MODULE_EIC = EIC_IRQn, |
Kojto | 111:4336505e4b1c | 110 | /** Interrupt vector index for a Non Volatile Memory Controller interrupt. */ |
Kojto | 111:4336505e4b1c | 111 | SYSTEM_INTERRUPT_MODULE_NVMCTRL = NVMCTRL_IRQn, |
Kojto | 111:4336505e4b1c | 112 | /** Interrupt vector index for a Direct Memory Access interrupt. */ |
Kojto | 111:4336505e4b1c | 113 | SYSTEM_INTERRUPT_MODULE_DMA = DMAC_IRQn, |
Kojto | 111:4336505e4b1c | 114 | #if defined(__DOXYGEN__) || defined(ID_USB) |
Kojto | 111:4336505e4b1c | 115 | /** Interrupt vector index for a Universal Serial Bus interrupt. */ |
Kojto | 111:4336505e4b1c | 116 | SYSTEM_INTERRUPT_MODULE_USB = USB_IRQn, |
Kojto | 111:4336505e4b1c | 117 | #endif |
Kojto | 111:4336505e4b1c | 118 | /** Interrupt vector index for an Event System interrupt. */ |
Kojto | 111:4336505e4b1c | 119 | SYSTEM_INTERRUPT_MODULE_EVSYS = EVSYS_IRQn, |
Kojto | 111:4336505e4b1c | 120 | #if defined(__DOXYGEN__) |
Kojto | 111:4336505e4b1c | 121 | /** Interrupt vector index for a SERCOM peripheral interrupt. |
Kojto | 111:4336505e4b1c | 122 | * |
Kojto | 111:4336505e4b1c | 123 | * Each specific device may contain several SERCOM peripherals; each module |
Kojto | 111:4336505e4b1c | 124 | * instance will have its own entry in the table, with the instance number |
Kojto | 111:4336505e4b1c | 125 | * substituted for "n" in the entry name (e.g. |
Kojto | 111:4336505e4b1c | 126 | * \c SYSTEM_INTERRUPT_MODULE_SERCOM0). |
Kojto | 111:4336505e4b1c | 127 | */ |
Kojto | 111:4336505e4b1c | 128 | SYSTEM_INTERRUPT_MODULE_SERCOMn = SERCOMn_IRQn, |
Kojto | 111:4336505e4b1c | 129 | |
Kojto | 111:4336505e4b1c | 130 | /** Interrupt vector index for a Timer/Counter Control peripheral interrupt. |
Kojto | 111:4336505e4b1c | 131 | * |
Kojto | 111:4336505e4b1c | 132 | * Each specific device may contain several TCC peripherals; each module |
Kojto | 111:4336505e4b1c | 133 | * instance will have its own entry in the table, with the instance number |
Kojto | 111:4336505e4b1c | 134 | * substituted for "n" in the entry name (e.g. |
Kojto | 111:4336505e4b1c | 135 | * \c SYSTEM_INTERRUPT_MODULE_TCC0). |
Kojto | 111:4336505e4b1c | 136 | */ |
Kojto | 111:4336505e4b1c | 137 | SYSTEM_INTERRUPT_MODULE_TCCn = TCCn_IRQn, |
Kojto | 111:4336505e4b1c | 138 | |
Kojto | 111:4336505e4b1c | 139 | /** Interrupt vector index for a Timer/Counter peripheral interrupt. |
Kojto | 111:4336505e4b1c | 140 | * |
Kojto | 111:4336505e4b1c | 141 | * Each specific device may contain several TC peripherals; each module |
Kojto | 111:4336505e4b1c | 142 | * instance will have its own entry in the table, with the instance number |
Kojto | 111:4336505e4b1c | 143 | * substituted for "n" in the entry name (e.g. |
Kojto | 111:4336505e4b1c | 144 | * \c SYSTEM_INTERRUPT_MODULE_TC3). |
Kojto | 111:4336505e4b1c | 145 | */ |
Kojto | 111:4336505e4b1c | 146 | SYSTEM_INTERRUPT_MODULE_TCn = TCn_IRQn, |
Kojto | 111:4336505e4b1c | 147 | #else |
Kojto | 111:4336505e4b1c | 148 | _SYSTEM_INTERRUPT_MODULES(SERCOM) |
Kojto | 111:4336505e4b1c | 149 | |
Kojto | 111:4336505e4b1c | 150 | _SYSTEM_INTERRUPT_MODULES(TCC) |
Kojto | 111:4336505e4b1c | 151 | |
Kojto | 111:4336505e4b1c | 152 | SYSTEM_INTERRUPT_MODULE_TC3 = TC3_IRQn, |
Kojto | 111:4336505e4b1c | 153 | SYSTEM_INTERRUPT_MODULE_TC4 = TC4_IRQn, |
Kojto | 111:4336505e4b1c | 154 | SYSTEM_INTERRUPT_MODULE_TC5 = TC5_IRQn, |
Kojto | 111:4336505e4b1c | 155 | # if defined(ID_TC6) |
Kojto | 111:4336505e4b1c | 156 | SYSTEM_INTERRUPT_MODULE_TC6 = TC6_IRQn, |
Kojto | 111:4336505e4b1c | 157 | # endif |
Kojto | 111:4336505e4b1c | 158 | # if defined(ID_TC7) |
Kojto | 111:4336505e4b1c | 159 | SYSTEM_INTERRUPT_MODULE_TC7 = TC7_IRQn, |
Kojto | 111:4336505e4b1c | 160 | # endif |
Kojto | 111:4336505e4b1c | 161 | #endif |
Kojto | 111:4336505e4b1c | 162 | |
Kojto | 111:4336505e4b1c | 163 | #if defined(__DOXYGEN__) || defined(ID_ADC) |
Kojto | 111:4336505e4b1c | 164 | /** Interrupt vector index for an Analog-to-Digital peripheral interrupt. */ |
Kojto | 111:4336505e4b1c | 165 | SYSTEM_INTERRUPT_MODULE_ADC = ADC_IRQn, |
Kojto | 111:4336505e4b1c | 166 | #endif |
Kojto | 111:4336505e4b1c | 167 | |
Kojto | 111:4336505e4b1c | 168 | #if defined(__DOXYGEN__) || defined(ID_AC) |
Kojto | 111:4336505e4b1c | 169 | /** Interrupt vector index for an Analog Comparator peripheral interrupt. */ |
Kojto | 111:4336505e4b1c | 170 | SYSTEM_INTERRUPT_MODULE_AC = AC_IRQn, |
Kojto | 111:4336505e4b1c | 171 | #endif |
Kojto | 111:4336505e4b1c | 172 | |
Kojto | 111:4336505e4b1c | 173 | #if defined(__DOXYGEN__) || defined(ID_DAC) |
Kojto | 111:4336505e4b1c | 174 | /** Interrupt vector index for a Digital-to-Analog peripheral interrupt. */ |
Kojto | 111:4336505e4b1c | 175 | SYSTEM_INTERRUPT_MODULE_DAC = DAC_IRQn, |
Kojto | 111:4336505e4b1c | 176 | #endif |
Kojto | 111:4336505e4b1c | 177 | #if defined(__DOXYGEN__) || defined(ID_PTC) |
Kojto | 111:4336505e4b1c | 178 | /** Interrupt vector index for a Peripheral Touch Controller peripheral |
Kojto | 111:4336505e4b1c | 179 | * interrupt. */ |
Kojto | 111:4336505e4b1c | 180 | SYSTEM_INTERRUPT_MODULE_PTC = PTC_IRQn, |
Kojto | 111:4336505e4b1c | 181 | #endif |
Kojto | 111:4336505e4b1c | 182 | #if defined(__DOXYGEN__) || defined(ID_I2S) |
Kojto | 111:4336505e4b1c | 183 | /** Interrupt vector index for a Inter-IC Sound Interface peripheral |
Kojto | 111:4336505e4b1c | 184 | * interrupt. */ |
Kojto | 111:4336505e4b1c | 185 | SYSTEM_INTERRUPT_MODULE_I2S = I2S_IRQn, |
Kojto | 111:4336505e4b1c | 186 | #endif |
Kojto | 111:4336505e4b1c | 187 | #if defined(__DOXYGEN__) || defined(ID_AC1) |
Kojto | 111:4336505e4b1c | 188 | /** Interrupt vector index for an Analog Comparator 1 peripheral interrupt. */ |
Kojto | 111:4336505e4b1c | 189 | SYSTEM_INTERRUPT_MODULE_AC1 = AC1_IRQn, |
Kojto | 111:4336505e4b1c | 190 | #endif |
Kojto | 111:4336505e4b1c | 191 | }; |
Kojto | 111:4336505e4b1c | 192 | |
Kojto | 111:4336505e4b1c | 193 | /** @} */ |
Kojto | 111:4336505e4b1c | 194 | |
Kojto | 111:4336505e4b1c | 195 | #endif |