1 /*
2 * Copyright (c) 2020 - 2024 Renesas Electronics Corporation and/or its affiliates
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6 
7 #ifndef BSP_REGISTER_PROTECTION_H
8 #define BSP_REGISTER_PROTECTION_H
9 
10 /***********************************************************************************************************************
11  * Includes   <System Includes> , "Project Includes"
12  **********************************************************************************************************************/
13 
14 /** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
15 FSP_HEADER
16 
17 /***********************************************************************************************************************
18  * Macro definitions
19  **********************************************************************************************************************/
20 
21 /***********************************************************************************************************************
22  * Typedef definitions
23  **********************************************************************************************************************/
24 
25 /*******************************************************************************************************************//**
26  * @addtogroup BSP_MCU
27  * @{
28  **********************************************************************************************************************/
29 
30 /** The different types of registers that can be protected. */
31 typedef enum e_bsp_reg_protect
32 {
33     /** Enables writing to the registers related to the clock generation circuit. */
34     BSP_REG_PROTECT_CGC = 0,
35 
36     /** Enables writing to the registers related to low power consumption and reset. */
37     BSP_REG_PROTECT_LPC_RESET,
38 
39     /** Enables writing to the registers related to GPIO. */
40     BSP_REG_PROTECT_GPIO,
41 
42     /** Enables writing to the registers related to Non-Safety reg. */
43     BSP_REG_PROTECT_SYSTEM,
44 } bsp_reg_protect_t;
45 
46 /** @} (end addtogroup BSP_MCU) */
47 
48 /***********************************************************************************************************************
49  * Exported global variables
50  **********************************************************************************************************************/
51 
52 /***********************************************************************************************************************
53  * Exported global functions (to be accessed by other files)
54  **********************************************************************************************************************/
55 
56 /* Public functions defined in bsp.h */
57 void bsp_register_protect_open(void);  // Used internally by BSP
58 
59 /** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
60 FSP_FOOTER
61 
62 #endif
63