1 /** 2 * \file 3 * 4 * \brief Instance description for EIC 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_EIC_INSTANCE_ 31 #define _SAMC21_EIC_INSTANCE_ 32 33 /* ========== Register definition for EIC peripheral ========== */ 34 #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 35 #define REG_EIC_CTRLA (0x40002800) /**< \brief (EIC) Control A */ 36 #define REG_EIC_NMICTRL (0x40002801) /**< \brief (EIC) Non-Maskable Interrupt Control */ 37 #define REG_EIC_NMIFLAG (0x40002802) /**< \brief (EIC) Non-Maskable Interrupt Flag Status and Clear */ 38 #define REG_EIC_SYNCBUSY (0x40002804) /**< \brief (EIC) Synchronization Busy */ 39 #define REG_EIC_EVCTRL (0x40002808) /**< \brief (EIC) Event Control */ 40 #define REG_EIC_INTENCLR (0x4000280C) /**< \brief (EIC) Interrupt Enable Clear */ 41 #define REG_EIC_INTENSET (0x40002810) /**< \brief (EIC) Interrupt Enable Set */ 42 #define REG_EIC_INTFLAG (0x40002814) /**< \brief (EIC) Interrupt Flag Status and Clear */ 43 #define REG_EIC_ASYNCH (0x40002818) /**< \brief (EIC) External Interrupt Asynchronous Mode */ 44 #define REG_EIC_CONFIG0 (0x4000281C) /**< \brief (EIC) External Interrupt Sense Configuration 0 */ 45 #define REG_EIC_CONFIG1 (0x40002820) /**< \brief (EIC) External Interrupt Sense Configuration 1 */ 46 #define REG_EIC_DEBOUNCEN (0x40002830) /**< \brief (EIC) Debouncer Enable */ 47 #define REG_EIC_DPRESCALER (0x40002834) /**< \brief (EIC) Debouncer Prescaler */ 48 #define REG_EIC_PINSTATE (0x40002838) /**< \brief (EIC) Pin State */ 49 #else 50 #define REG_EIC_CTRLA (*(RwReg8 *)0x40002800UL) /**< \brief (EIC) Control A */ 51 #define REG_EIC_NMICTRL (*(RwReg8 *)0x40002801UL) /**< \brief (EIC) Non-Maskable Interrupt Control */ 52 #define REG_EIC_NMIFLAG (*(RwReg16*)0x40002802UL) /**< \brief (EIC) Non-Maskable Interrupt Flag Status and Clear */ 53 #define REG_EIC_SYNCBUSY (*(RoReg *)0x40002804UL) /**< \brief (EIC) Synchronization Busy */ 54 #define REG_EIC_EVCTRL (*(RwReg *)0x40002808UL) /**< \brief (EIC) Event Control */ 55 #define REG_EIC_INTENCLR (*(RwReg *)0x4000280CUL) /**< \brief (EIC) Interrupt Enable Clear */ 56 #define REG_EIC_INTENSET (*(RwReg *)0x40002810UL) /**< \brief (EIC) Interrupt Enable Set */ 57 #define REG_EIC_INTFLAG (*(RwReg *)0x40002814UL) /**< \brief (EIC) Interrupt Flag Status and Clear */ 58 #define REG_EIC_ASYNCH (*(RwReg *)0x40002818UL) /**< \brief (EIC) External Interrupt Asynchronous Mode */ 59 #define REG_EIC_CONFIG0 (*(RwReg *)0x4000281CUL) /**< \brief (EIC) External Interrupt Sense Configuration 0 */ 60 #define REG_EIC_CONFIG1 (*(RwReg *)0x40002820UL) /**< \brief (EIC) External Interrupt Sense Configuration 1 */ 61 #define REG_EIC_DEBOUNCEN (*(RwReg *)0x40002830UL) /**< \brief (EIC) Debouncer Enable */ 62 #define REG_EIC_DPRESCALER (*(RwReg *)0x40002834UL) /**< \brief (EIC) Debouncer Prescaler */ 63 #define REG_EIC_PINSTATE (*(RoReg *)0x40002838UL) /**< \brief (EIC) Pin State */ 64 #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 65 66 /* ========== Instance parameters for EIC peripheral ========== */ 67 #define EIC_EXTINT_NUM 16 // Number of external interrupts 68 #define EIC_GCLK_ID 2 // Generic Clock index 69 #define EIC_NUMBER_OF_CONFIG_REGS 2 // Number of CONFIG registers 70 #define EIC_NUMBER_OF_DPRESCALER_REGS 2 // Number of DPRESCALER registers 71 #define EIC_NUMBER_OF_INTERRUPTS 16 // Number of external interrupts (obsolete) 72 73 #endif /* _SAMC21_EIC_INSTANCE_ */ 74