1 /***************************************************************************//**
2  * @file
3  * @brief Reset Management Unit (RMU) peripheral API
4  * @author Energy Micro AS
5  * @version 3.0.0
6  *******************************************************************************
7  * @section License
8  * <b>(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com</b>
9  *******************************************************************************
10  *
11  * Permission is granted to anyone to use this software for any purpose,
12  * including commercial applications, and to alter it and redistribute it
13  * freely, subject to the following restrictions:
14  *
15  * 1. The origin of this software must not be misrepresented; you must not
16  *    claim that you wrote the original software.
17  * 2. Altered source versions must be plainly marked as such, and must not be
18  *    misrepresented as being the original software.
19  * 3. This notice may not be removed or altered from any source distribution.
20  *
21  * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
22  * obligation to support this Software. Energy Micro AS is providing the
23  * Software "AS IS", with no express or implied warranties of any kind,
24  * including, but not limited to, any implied warranties of merchantability
25  * or fitness for any particular purpose or warranties against infringement
26  * of any proprietary rights of a third party.
27  *
28  * Energy Micro AS will not be liable for any consequential, incidental, or
29  * special damages, or any other relief, or for any claim by any third party,
30  * arising from your use of this Software.
31  *
32  ******************************************************************************/
33 #ifndef __EM_RMU_H
34 #define __EM_RMU_H
35 
36 #include <stdbool.h>
37 #include "em_part.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /***************************************************************************//**
44  * @addtogroup EM_Library
45  * @{
46  ******************************************************************************/
47 
48 /***************************************************************************//**
49  * @addtogroup RMU
50  * @{
51  ******************************************************************************/
52 
53 /*******************************************************************************
54  ********************************   ENUMS   ************************************
55  ******************************************************************************/
56 
57 /** RMU controlled peripheral reset control and reset source control */
58 typedef enum
59 {
60 #if defined(_EFM32_GIANT_FAMILY)
61   /** Reset control over Backup Power Domain */
62   rmuResetBU = _RMU_CTRL_BURSTEN_SHIFT,
63 #endif
64   /** Allow Cortex-M3 lock up signal */
65   rmuResetLockUp = _RMU_CTRL_LOCKUPRDIS_SHIFT
66 } RMU_Reset_TypeDef;
67 
68 /*******************************************************************************
69  *****************************   PROTOTYPES   **********************************
70  ******************************************************************************/
71 
72 /** RMU_LockupResetDisable kept for backwards compatibility */
73 #define RMU_LockupResetDisable(A) RMU_ResetControl(rmuResetLockUp, A)
74 
75 void RMU_ResetControl(RMU_Reset_TypeDef reset, bool enable);
76 void RMU_ResetCauseClear(void);
77 uint32_t RMU_ResetCauseGet(void);
78 
79 /** @} (end addtogroup RMU) */
80 /** @} (end addtogroup EM_Library) */
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* __EM_RMU_H */
87