mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
targets/hal/TARGET_Atmel/TARGET_SAM_CortexM0P/drivers/system/interrupt/TARGET_SAMD21/system_interrupt_features.h@18:da299f395b9e, 2015-11-09 (annotated)
- Committer:
- mbed_official
- Date:
- Mon Nov 09 13:30:11 2015 +0000
- Revision:
- 18:da299f395b9e
- Parent:
- targets/hal/TARGET_Atmel/TARGET_SAM_CortexM0P/drivers/system/interrupt/system_interrupt_SAMD21/system_interrupt_features.h@15:a81a8d6c1dfe
Synchronized with git revision f605825f66bb2e462ff7dbc5fb4ed2dbe979d1c3
Full URL: https://github.com/mbedmicro/mbed/commit/f605825f66bb2e462ff7dbc5fb4ed2dbe979d1c3/
Added support for SAML21
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 15:a81a8d6c1dfe | 1 | /** |
mbed_official | 15:a81a8d6c1dfe | 2 | * \file |
mbed_official | 15:a81a8d6c1dfe | 3 | * |
mbed_official | 15:a81a8d6c1dfe | 4 | * \brief SAM D21 System Interrupt Driver |
mbed_official | 15:a81a8d6c1dfe | 5 | * |
mbed_official | 15:a81a8d6c1dfe | 6 | * Copyright (C) 2013-2015 Atmel Corporation. All rights reserved. |
mbed_official | 15:a81a8d6c1dfe | 7 | * |
mbed_official | 15:a81a8d6c1dfe | 8 | * \asf_license_start |
mbed_official | 15:a81a8d6c1dfe | 9 | * |
mbed_official | 15:a81a8d6c1dfe | 10 | * \page License |
mbed_official | 15:a81a8d6c1dfe | 11 | * |
mbed_official | 15:a81a8d6c1dfe | 12 | * Redistribution and use in source and binary forms, with or without |
mbed_official | 15:a81a8d6c1dfe | 13 | * modification, are permitted provided that the following conditions are met: |
mbed_official | 15:a81a8d6c1dfe | 14 | * |
mbed_official | 15:a81a8d6c1dfe | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 15:a81a8d6c1dfe | 16 | * this list of conditions and the following disclaimer. |
mbed_official | 15:a81a8d6c1dfe | 17 | * |
mbed_official | 15:a81a8d6c1dfe | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 15:a81a8d6c1dfe | 19 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 15:a81a8d6c1dfe | 20 | * and/or other materials provided with the distribution. |
mbed_official | 15:a81a8d6c1dfe | 21 | * |
mbed_official | 15:a81a8d6c1dfe | 22 | * 3. The name of Atmel may not be used to endorse or promote products derived |
mbed_official | 15:a81a8d6c1dfe | 23 | * from this software without specific prior written permission. |
mbed_official | 15:a81a8d6c1dfe | 24 | * |
mbed_official | 15:a81a8d6c1dfe | 25 | * 4. This software may only be redistributed and used in connection with an |
mbed_official | 15:a81a8d6c1dfe | 26 | * Atmel microcontroller product. |
mbed_official | 15:a81a8d6c1dfe | 27 | * |
mbed_official | 15:a81a8d6c1dfe | 28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED |
mbed_official | 15:a81a8d6c1dfe | 29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
mbed_official | 15:a81a8d6c1dfe | 30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE |
mbed_official | 15:a81a8d6c1dfe | 31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR |
mbed_official | 15:a81a8d6c1dfe | 32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 15:a81a8d6c1dfe | 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
mbed_official | 15:a81a8d6c1dfe | 34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
mbed_official | 15:a81a8d6c1dfe | 35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
mbed_official | 15:a81a8d6c1dfe | 36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
mbed_official | 15:a81a8d6c1dfe | 37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
mbed_official | 15:a81a8d6c1dfe | 38 | * POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 15:a81a8d6c1dfe | 39 | * |
mbed_official | 15:a81a8d6c1dfe | 40 | * \asf_license_stop |
mbed_official | 15:a81a8d6c1dfe | 41 | * |
mbed_official | 15:a81a8d6c1dfe | 42 | */ |
mbed_official | 15:a81a8d6c1dfe | 43 | /* |
mbed_official | 15:a81a8d6c1dfe | 44 | * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> |
mbed_official | 15:a81a8d6c1dfe | 45 | */ |
mbed_official | 15:a81a8d6c1dfe | 46 | |
mbed_official | 15:a81a8d6c1dfe | 47 | #ifndef SYSTEM_INTERRUPT_FEATURES_H_INCLUDED |
mbed_official | 15:a81a8d6c1dfe | 48 | #define SYSTEM_INTERRUPT_FEATURES_H_INCLUDED |
mbed_official | 15:a81a8d6c1dfe | 49 | |
mbed_official | 15:a81a8d6c1dfe | 50 | #if !defined(__DOXYGEN__) |
mbed_official | 15:a81a8d6c1dfe | 51 | |
mbed_official | 15:a81a8d6c1dfe | 52 | /* Generates a interrupt vector table enum list entry for a given module type |
mbed_official | 15:a81a8d6c1dfe | 53 | and index (e.g. "SYSTEM_INTERRUPT_MODULE_TC0 = TC0_IRQn,"). */ |
mbed_official | 15:a81a8d6c1dfe | 54 | # define _MODULE_IRQn(n, module) \ |
mbed_official | 15:a81a8d6c1dfe | 55 | SYSTEM_INTERRUPT_MODULE_##module##n = module##n##_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 56 | |
mbed_official | 15:a81a8d6c1dfe | 57 | /* Generates interrupt vector table enum list entries for all instances of a |
mbed_official | 15:a81a8d6c1dfe | 58 | given module type on the selected device. */ |
mbed_official | 15:a81a8d6c1dfe | 59 | # define _SYSTEM_INTERRUPT_MODULES(name) \ |
mbed_official | 15:a81a8d6c1dfe | 60 | MREPEAT(name##_INST_NUM, _MODULE_IRQn, name) |
mbed_official | 15:a81a8d6c1dfe | 61 | |
mbed_official | 15:a81a8d6c1dfe | 62 | # define _SYSTEM_INTERRUPT_IPSR_MASK 0x0000003f |
mbed_official | 15:a81a8d6c1dfe | 63 | # define _SYSTEM_INTERRUPT_PRIORITY_MASK 0x00000003 |
mbed_official | 15:a81a8d6c1dfe | 64 | |
mbed_official | 15:a81a8d6c1dfe | 65 | # define _SYSTEM_INTERRUPT_EXTERNAL_VECTOR_START 0 |
mbed_official | 15:a81a8d6c1dfe | 66 | |
mbed_official | 15:a81a8d6c1dfe | 67 | # define _SYSTEM_INTERRUPT_SYSTICK_PRI_POS 30 |
mbed_official | 15:a81a8d6c1dfe | 68 | #endif |
mbed_official | 15:a81a8d6c1dfe | 69 | |
mbed_official | 15:a81a8d6c1dfe | 70 | /** |
mbed_official | 15:a81a8d6c1dfe | 71 | * \addtogroup asfdoc_sam0_system_interrupt_group |
mbed_official | 15:a81a8d6c1dfe | 72 | * @{ |
mbed_official | 15:a81a8d6c1dfe | 73 | */ |
mbed_official | 15:a81a8d6c1dfe | 74 | |
mbed_official | 15:a81a8d6c1dfe | 75 | /** |
mbed_official | 15:a81a8d6c1dfe | 76 | * \brief Table of possible system interrupt/exception vector numbers. |
mbed_official | 15:a81a8d6c1dfe | 77 | * |
mbed_official | 15:a81a8d6c1dfe | 78 | * Table of all possible interrupt and exception vector indexes within the |
mbed_official | 15:a81a8d6c1dfe | 79 | * SAMD21 device. Check peripherals configuration in SAMD21 datasheet for |
mbed_official | 15:a81a8d6c1dfe | 80 | * available vector index for specific device. |
mbed_official | 15:a81a8d6c1dfe | 81 | * |
mbed_official | 15:a81a8d6c1dfe | 82 | */ |
mbed_official | 15:a81a8d6c1dfe | 83 | #if defined(__DOXYGEN__) |
mbed_official | 15:a81a8d6c1dfe | 84 | /** \note The actual enumeration name is "system_interrupt_vector". */ |
mbed_official | 15:a81a8d6c1dfe | 85 | enum system_interrupt_vector_samd21 { |
mbed_official | 15:a81a8d6c1dfe | 86 | #else |
mbed_official | 15:a81a8d6c1dfe | 87 | enum system_interrupt_vector { |
mbed_official | 15:a81a8d6c1dfe | 88 | #endif |
mbed_official | 15:a81a8d6c1dfe | 89 | /** Interrupt vector index for a NMI interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 90 | SYSTEM_INTERRUPT_NON_MASKABLE = NonMaskableInt_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 91 | /** Interrupt vector index for a Hard Fault memory access exception. */ |
mbed_official | 15:a81a8d6c1dfe | 92 | SYSTEM_INTERRUPT_HARD_FAULT = HardFault_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 93 | /** Interrupt vector index for a Supervisor Call exception. */ |
mbed_official | 15:a81a8d6c1dfe | 94 | SYSTEM_INTERRUPT_SV_CALL = SVCall_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 95 | /** Interrupt vector index for a Pending Supervisor interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 96 | SYSTEM_INTERRUPT_PENDING_SV = PendSV_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 97 | /** Interrupt vector index for a System Tick interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 98 | SYSTEM_INTERRUPT_SYSTICK = SysTick_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 99 | |
mbed_official | 15:a81a8d6c1dfe | 100 | /** Interrupt vector index for a Power Manager peripheral interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 101 | SYSTEM_INTERRUPT_MODULE_PM = PM_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 102 | /** Interrupt vector index for a System Control peripheral interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 103 | SYSTEM_INTERRUPT_MODULE_SYSCTRL = SYSCTRL_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 104 | /** Interrupt vector index for a Watch Dog peripheral interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 105 | SYSTEM_INTERRUPT_MODULE_WDT = WDT_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 106 | /** Interrupt vector index for a Real Time Clock peripheral interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 107 | SYSTEM_INTERRUPT_MODULE_RTC = RTC_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 108 | /** Interrupt vector index for an External Interrupt peripheral interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 109 | SYSTEM_INTERRUPT_MODULE_EIC = EIC_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 110 | /** Interrupt vector index for a Non Volatile Memory Controller interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 111 | SYSTEM_INTERRUPT_MODULE_NVMCTRL = NVMCTRL_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 112 | /** Interrupt vector index for a Direct Memory Access interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 113 | SYSTEM_INTERRUPT_MODULE_DMA = DMAC_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 114 | #if defined(__DOXYGEN__) || defined(ID_USB) |
mbed_official | 15:a81a8d6c1dfe | 115 | /** Interrupt vector index for a Universal Serial Bus interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 116 | SYSTEM_INTERRUPT_MODULE_USB = USB_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 117 | #endif |
mbed_official | 15:a81a8d6c1dfe | 118 | /** Interrupt vector index for an Event System interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 119 | SYSTEM_INTERRUPT_MODULE_EVSYS = EVSYS_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 120 | #if defined(__DOXYGEN__) |
mbed_official | 15:a81a8d6c1dfe | 121 | /** Interrupt vector index for a SERCOM peripheral interrupt. |
mbed_official | 15:a81a8d6c1dfe | 122 | * |
mbed_official | 15:a81a8d6c1dfe | 123 | * Each specific device may contain several SERCOM peripherals; each module |
mbed_official | 15:a81a8d6c1dfe | 124 | * instance will have its own entry in the table, with the instance number |
mbed_official | 15:a81a8d6c1dfe | 125 | * substituted for "n" in the entry name (e.g. |
mbed_official | 15:a81a8d6c1dfe | 126 | * \c SYSTEM_INTERRUPT_MODULE_SERCOM0). |
mbed_official | 15:a81a8d6c1dfe | 127 | */ |
mbed_official | 15:a81a8d6c1dfe | 128 | SYSTEM_INTERRUPT_MODULE_SERCOMn = SERCOMn_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 129 | |
mbed_official | 15:a81a8d6c1dfe | 130 | /** Interrupt vector index for a Timer/Counter Control peripheral interrupt. |
mbed_official | 15:a81a8d6c1dfe | 131 | * |
mbed_official | 15:a81a8d6c1dfe | 132 | * Each specific device may contain several TCC peripherals; each module |
mbed_official | 15:a81a8d6c1dfe | 133 | * instance will have its own entry in the table, with the instance number |
mbed_official | 15:a81a8d6c1dfe | 134 | * substituted for "n" in the entry name (e.g. |
mbed_official | 15:a81a8d6c1dfe | 135 | * \c SYSTEM_INTERRUPT_MODULE_TCC0). |
mbed_official | 15:a81a8d6c1dfe | 136 | */ |
mbed_official | 15:a81a8d6c1dfe | 137 | SYSTEM_INTERRUPT_MODULE_TCCn = TCCn_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 138 | |
mbed_official | 15:a81a8d6c1dfe | 139 | /** Interrupt vector index for a Timer/Counter peripheral interrupt. |
mbed_official | 15:a81a8d6c1dfe | 140 | * |
mbed_official | 15:a81a8d6c1dfe | 141 | * Each specific device may contain several TC peripherals; each module |
mbed_official | 15:a81a8d6c1dfe | 142 | * instance will have its own entry in the table, with the instance number |
mbed_official | 15:a81a8d6c1dfe | 143 | * substituted for "n" in the entry name (e.g. |
mbed_official | 15:a81a8d6c1dfe | 144 | * \c SYSTEM_INTERRUPT_MODULE_TC3). |
mbed_official | 15:a81a8d6c1dfe | 145 | */ |
mbed_official | 15:a81a8d6c1dfe | 146 | SYSTEM_INTERRUPT_MODULE_TCn = TCn_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 147 | #else |
mbed_official | 15:a81a8d6c1dfe | 148 | _SYSTEM_INTERRUPT_MODULES(SERCOM) |
mbed_official | 15:a81a8d6c1dfe | 149 | |
mbed_official | 15:a81a8d6c1dfe | 150 | _SYSTEM_INTERRUPT_MODULES(TCC) |
mbed_official | 15:a81a8d6c1dfe | 151 | |
mbed_official | 15:a81a8d6c1dfe | 152 | SYSTEM_INTERRUPT_MODULE_TC3 = TC3_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 153 | SYSTEM_INTERRUPT_MODULE_TC4 = TC4_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 154 | SYSTEM_INTERRUPT_MODULE_TC5 = TC5_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 155 | # if defined(ID_TC6) |
mbed_official | 15:a81a8d6c1dfe | 156 | SYSTEM_INTERRUPT_MODULE_TC6 = TC6_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 157 | # endif |
mbed_official | 15:a81a8d6c1dfe | 158 | # if defined(ID_TC7) |
mbed_official | 15:a81a8d6c1dfe | 159 | SYSTEM_INTERRUPT_MODULE_TC7 = TC7_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 160 | # endif |
mbed_official | 15:a81a8d6c1dfe | 161 | #endif |
mbed_official | 15:a81a8d6c1dfe | 162 | |
mbed_official | 15:a81a8d6c1dfe | 163 | #if defined(__DOXYGEN__) || defined(ID_ADC) |
mbed_official | 15:a81a8d6c1dfe | 164 | /** Interrupt vector index for an Analog-to-Digital peripheral interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 165 | SYSTEM_INTERRUPT_MODULE_ADC = ADC_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 166 | #endif |
mbed_official | 15:a81a8d6c1dfe | 167 | |
mbed_official | 15:a81a8d6c1dfe | 168 | #if defined(__DOXYGEN__) || defined(ID_AC) |
mbed_official | 15:a81a8d6c1dfe | 169 | /** Interrupt vector index for an Analog Comparator peripheral interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 170 | SYSTEM_INTERRUPT_MODULE_AC = AC_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 171 | #endif |
mbed_official | 15:a81a8d6c1dfe | 172 | |
mbed_official | 15:a81a8d6c1dfe | 173 | #if defined(__DOXYGEN__) || defined(ID_DAC) |
mbed_official | 15:a81a8d6c1dfe | 174 | /** Interrupt vector index for a Digital-to-Analog peripheral interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 175 | SYSTEM_INTERRUPT_MODULE_DAC = DAC_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 176 | #endif |
mbed_official | 15:a81a8d6c1dfe | 177 | #if defined(__DOXYGEN__) || defined(ID_PTC) |
mbed_official | 15:a81a8d6c1dfe | 178 | /** Interrupt vector index for a Peripheral Touch Controller peripheral |
mbed_official | 15:a81a8d6c1dfe | 179 | * interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 180 | SYSTEM_INTERRUPT_MODULE_PTC = PTC_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 181 | #endif |
mbed_official | 15:a81a8d6c1dfe | 182 | #if defined(__DOXYGEN__) || defined(ID_I2S) |
mbed_official | 15:a81a8d6c1dfe | 183 | /** Interrupt vector index for a Inter-IC Sound Interface peripheral |
mbed_official | 15:a81a8d6c1dfe | 184 | * interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 185 | SYSTEM_INTERRUPT_MODULE_I2S = I2S_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 186 | #endif |
mbed_official | 15:a81a8d6c1dfe | 187 | #if defined(__DOXYGEN__) || defined(ID_AC1) |
mbed_official | 15:a81a8d6c1dfe | 188 | /** Interrupt vector index for an Analog Comparator 1 peripheral interrupt. */ |
mbed_official | 15:a81a8d6c1dfe | 189 | SYSTEM_INTERRUPT_MODULE_AC1 = AC1_IRQn, |
mbed_official | 15:a81a8d6c1dfe | 190 | #endif |
mbed_official | 15:a81a8d6c1dfe | 191 | }; |
mbed_official | 15:a81a8d6c1dfe | 192 | |
mbed_official | 15:a81a8d6c1dfe | 193 | /** @} */ |
mbed_official | 15:a81a8d6c1dfe | 194 | |
mbed_official | 15:a81a8d6c1dfe | 195 | #endif |