1 /** 2 * \file 3 * 4 * \brief Instance description for AC 5 * 6 * Copyright (c) 2016 Atmel Corporation, 7 * a wholly owned subsidiary of Microchip Technology Inc. 8 * 9 * \asf_license_start 10 * 11 * \page License 12 * 13 * Licensed under the Apache License, Version 2.0 (the "License"); 14 * you may not use this file except in compliance with the License. 15 * You may obtain a copy of the Licence at 16 * 17 * http://www.apache.org/licenses/LICENSE-2.0 18 * 19 * Unless required by applicable law or agreed to in writing, software 20 * distributed under the License is distributed on an "AS IS" BASIS, 21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 * See the License for the specific language governing permissions and 23 * limitations under the License. 24 * 25 * \asf_license_stop 26 * 27 */ 28 29 #ifndef _SAML21_AC_INSTANCE_ 30 #define _SAML21_AC_INSTANCE_ 31 32 /* ========== Register definition for AC peripheral ========== */ 33 #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 34 #define REG_AC_CTRLA (0x43001000) /**< \brief (AC) Control A */ 35 #define REG_AC_CTRLB (0x43001001) /**< \brief (AC) Control B */ 36 #define REG_AC_EVCTRL (0x43001002) /**< \brief (AC) Event Control */ 37 #define REG_AC_INTENCLR (0x43001004) /**< \brief (AC) Interrupt Enable Clear */ 38 #define REG_AC_INTENSET (0x43001005) /**< \brief (AC) Interrupt Enable Set */ 39 #define REG_AC_INTFLAG (0x43001006) /**< \brief (AC) Interrupt Flag Status and Clear */ 40 #define REG_AC_STATUSA (0x43001007) /**< \brief (AC) Status A */ 41 #define REG_AC_STATUSB (0x43001008) /**< \brief (AC) Status B */ 42 #define REG_AC_DBGCTRL (0x43001009) /**< \brief (AC) Debug Control */ 43 #define REG_AC_WINCTRL (0x4300100A) /**< \brief (AC) Window Control */ 44 #define REG_AC_SCALER0 (0x4300100C) /**< \brief (AC) Scaler 0 */ 45 #define REG_AC_SCALER1 (0x4300100D) /**< \brief (AC) Scaler 1 */ 46 #define REG_AC_COMPCTRL0 (0x43001010) /**< \brief (AC) Comparator Control 0 */ 47 #define REG_AC_COMPCTRL1 (0x43001014) /**< \brief (AC) Comparator Control 1 */ 48 #define REG_AC_SYNCBUSY (0x43001020) /**< \brief (AC) Synchronization Busy */ 49 #else 50 #define REG_AC_CTRLA (*(RwReg8 *)0x43001000UL) /**< \brief (AC) Control A */ 51 #define REG_AC_CTRLB (*(WoReg8 *)0x43001001UL) /**< \brief (AC) Control B */ 52 #define REG_AC_EVCTRL (*(RwReg16*)0x43001002UL) /**< \brief (AC) Event Control */ 53 #define REG_AC_INTENCLR (*(RwReg8 *)0x43001004UL) /**< \brief (AC) Interrupt Enable Clear */ 54 #define REG_AC_INTENSET (*(RwReg8 *)0x43001005UL) /**< \brief (AC) Interrupt Enable Set */ 55 #define REG_AC_INTFLAG (*(RwReg8 *)0x43001006UL) /**< \brief (AC) Interrupt Flag Status and Clear */ 56 #define REG_AC_STATUSA (*(RoReg8 *)0x43001007UL) /**< \brief (AC) Status A */ 57 #define REG_AC_STATUSB (*(RoReg8 *)0x43001008UL) /**< \brief (AC) Status B */ 58 #define REG_AC_DBGCTRL (*(RwReg8 *)0x43001009UL) /**< \brief (AC) Debug Control */ 59 #define REG_AC_WINCTRL (*(RwReg8 *)0x4300100AUL) /**< \brief (AC) Window Control */ 60 #define REG_AC_SCALER0 (*(RwReg8 *)0x4300100CUL) /**< \brief (AC) Scaler 0 */ 61 #define REG_AC_SCALER1 (*(RwReg8 *)0x4300100DUL) /**< \brief (AC) Scaler 1 */ 62 #define REG_AC_COMPCTRL0 (*(RwReg *)0x43001010UL) /**< \brief (AC) Comparator Control 0 */ 63 #define REG_AC_COMPCTRL1 (*(RwReg *)0x43001014UL) /**< \brief (AC) Comparator Control 1 */ 64 #define REG_AC_SYNCBUSY (*(RoReg *)0x43001020UL) /**< \brief (AC) Synchronization Busy */ 65 #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ 66 67 /* ========== Instance parameters for AC peripheral ========== */ 68 #define AC_COMPCTRL_MUXNEG_OPAMP 7 // OPAMP selection for MUXNEG 69 #define AC_GCLK_ID 31 // Index of Generic Clock 70 #define AC_NUM_CMP 2 // Number of comparators 71 #define AC_PAIRS 1 // Number of pairs of comparators 72 73 #endif /* _SAML21_AC_INSTANCE_ */ 74