1 /***************************************************************************//**
2  * @file
3  * @brief Device initialization for EMU.
4  *******************************************************************************
5  * # License
6  * <b>Copyright 2019 Silicon Laboratories Inc. www.silabs.com</b>
7  *******************************************************************************
8  *
9  * SPDX-License-Identifier: Zlib
10  *
11  * The licensor of this software is Silicon Laboratories Inc.
12  *
13  * This software is provided 'as-is', without any express or implied
14  * warranty. In no event will the authors be held liable for any damages
15  * arising from the use of this software.
16  *
17  * Permission is granted to anyone to use this software for any purpose,
18  * including commercial applications, and to alter it and redistribute it
19  * freely, subject to the following restrictions:
20  *
21  * 1. The origin of this software must not be misrepresented; you must not
22  *    claim that you wrote the original software. If you use this software
23  *    in a product, an acknowledgment in the product documentation would be
24  *    appreciated but is not required.
25  * 2. Altered source versions must be plainly marked as such, and must not be
26  *    misrepresented as being the original software.
27  * 3. This notice may not be removed or altered from any source distribution.
28  *
29  ******************************************************************************/
30 #ifndef SL_DEVICE_INIT_EMU_H
31 #define SL_DEVICE_INIT_EMU_H
32 
33 #include "sl_status.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /**
40  * @addtogroup device_init
41  * @{
42  * @addtogroup device_init_emu EMU Initialization
43  * @brief Initialize the Energy Management Unit.
44  * @details
45  * Initializes the Energy Management Unit by configuring Energy Mode 4 (EM4)
46  * according to settings in the configuration header
47  * `sl_device_init_emu_config.h`.
48  *
49  * On Series 2 devices, debugging in EM2 is enabled by default by ensuring
50  * that power to the debug power domain is sustained on EM2 entry.
51  * Debugging in EM2 can be disabled through the configuration header. If
52  * using Simplicity Studio, this header can also be configured using the
53  * Project Configurator by selecting the "Device Init: EMU" configuration
54  * component.
55  *
56  * @note Voltage scaling for Energy Modes 0 to 3 are configured by the
57  * @ref power_manager.
58  * @{
59  */
60 
61 /**
62  * Initialize EMU
63  *
64  * @details
65  * Initializes the Energy Management Unit by configuring Energy Mode 4 (EM4)
66  * according to settings in the configuration header
67  * `sl_device_init_emu_config.h`.
68  *
69  * On Series 2 devices, debugging in EM2 is enabled by default by ensuring
70  * that power to the debug power domain is sustained on EM2 entry.
71  *
72  * @note Voltage scaling for Energy Modes 0 to 3 are configured by the
73  * @ref power_manager.
74  *
75  * @return Status code
76  * @retval SL_STATUS_OK EMU initialized successfully
77  */
78 sl_status_t sl_device_init_emu(void);
79 
80 /**
81  * @} device_init_emu
82  * @} device_init
83  */
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif // SL_DEVICE_INIT_EMU_H
90