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