1 /*
2 * Copyright (c) 2020 - 2024 Renesas Electronics Corporation and/or its affiliates
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6 
7 /*******************************************************************************************************************//**
8  * @addtogroup LPM
9  * @{
10  **********************************************************************************************************************/
11 
12 #ifndef R_LPM_H
13 #define R_LPM_H
14 
15 /***********************************************************************************************************************
16  * Includes
17  **********************************************************************************************************************/
18 #include "bsp_api.h"
19 #include "r_lpm_cfg.h"
20 #include "r_lpm_api.h"
21 
22 /* Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
23 FSP_HEADER
24 
25 /***********************************************************************************************************************
26  * Macro definitions
27  **********************************************************************************************************************/
28 
29 /***********************************************************************************************************************
30  * Typedef definitions
31  **********************************************************************************************************************/
32 
33 /** LPM private control block. DO NOT MODIFY. Initialization occurs when R_LPM_Open() is called. */
34 typedef struct st_lpm_instance_ctrl
35 {
36     uint32_t          lpm_open;        // Indicates whether the open() API has been successfully called.
37     lpm_cfg_t const * p_cfg;           // Pointer to initial configurations
38 } lpm_instance_ctrl_t;
39 
40 /**********************************************************************************************************************
41  * Exported global variables
42  **********************************************************************************************************************/
43 
44 /** @cond INC_HEADER_DEFS_SEC */
45 /** Filled in Interface API structure for this Instance. */
46 extern const lpm_api_t g_lpm_on_lpm;
47 
48 /** @endcond */
49 
50 fsp_err_t R_LPM_Open(lpm_ctrl_t * const p_api_ctrl, lpm_cfg_t const * const p_cfg);
51 fsp_err_t R_LPM_Close(lpm_ctrl_t * const p_api_ctrl);
52 fsp_err_t R_LPM_LowPowerReconfigure(lpm_ctrl_t * const p_api_ctrl, lpm_cfg_t const * const p_cfg);
53 fsp_err_t R_LPM_LowPowerModeEnter(lpm_ctrl_t * const p_api_ctrl);
54 fsp_err_t R_LPM_IoKeepClear(lpm_ctrl_t * const p_api_ctrl);
55 
56 /** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
57 FSP_FOOTER
58 
59 #endif
60 
61 /*******************************************************************************************************************//**
62  * @} (end defgroup LPM)
63  **********************************************************************************************************************/
64