1 /**
2  * \file
3  *
4  * \brief Instance description for RSTC
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_RSTC_INSTANCE_
30 #define _SAML21_RSTC_INSTANCE_
31 
32 /* ========== Register definition for RSTC peripheral ========== */
33 #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
34 #define REG_RSTC_RCAUSE            (0x40000800) /**< \brief (RSTC) Reset Cause */
35 #define REG_RSTC_BKUPEXIT          (0x40000802) /**< \brief (RSTC) Backup Exit Source */
36 #define REG_RSTC_WKDBCONF          (0x40000804) /**< \brief (RSTC) Wakeup Debounce Configuration */
37 #define REG_RSTC_WKPOL             (0x40000808) /**< \brief (RSTC) Wakeup Polarity */
38 #define REG_RSTC_WKEN              (0x4000080C) /**< \brief (RSTC) Wakeup Enable */
39 #define REG_RSTC_WKCAUSE           (0x40000810) /**< \brief (RSTC) Wakeup Cause */
40 #else
41 #define REG_RSTC_RCAUSE            (*(RoReg8 *)0x40000800UL) /**< \brief (RSTC) Reset Cause */
42 #define REG_RSTC_BKUPEXIT          (*(RoReg8 *)0x40000802UL) /**< \brief (RSTC) Backup Exit Source */
43 #define REG_RSTC_WKDBCONF          (*(RwReg8 *)0x40000804UL) /**< \brief (RSTC) Wakeup Debounce Configuration */
44 #define REG_RSTC_WKPOL             (*(RwReg16*)0x40000808UL) /**< \brief (RSTC) Wakeup Polarity */
45 #define REG_RSTC_WKEN              (*(RwReg16*)0x4000080CUL) /**< \brief (RSTC) Wakeup Enable */
46 #define REG_RSTC_WKCAUSE           (*(RwReg16*)0x40000810UL) /**< \brief (RSTC) Wakeup Cause */
47 #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
48 
49 /* ========== Instance parameters for RSTC peripheral ========== */
50 #define RSTC_NUMBER_OF_EXTWAKE      8        // number of external wakeup line
51 
52 #endif /* _SAML21_RSTC_INSTANCE_ */
53