1 /*
2  * Copyright (c) 2021-2024 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 
9 #ifndef HPM_BPOR_H
10 #define HPM_BPOR_H
11 
12 typedef struct {
13     __RW uint32_t POR_CONFIG;                  /* 0x0: Power on reset config */
14 } BPOR_Type;
15 
16 
17 /* Bitfield definition for register: POR_CONFIG */
18 /*
19  * RETENTION (RW)
20  *
21  * retention battery domain setting
22  * 0: battery reset on reset pin reset happen
23  * 1: battery domain retention when reset pin reset happen
24  */
25 #define BPOR_POR_CONFIG_RETENTION_MASK (0x1U)
26 #define BPOR_POR_CONFIG_RETENTION_SHIFT (0U)
27 #define BPOR_POR_CONFIG_RETENTION_SET(x) (((uint32_t)(x) << BPOR_POR_CONFIG_RETENTION_SHIFT) & BPOR_POR_CONFIG_RETENTION_MASK)
28 #define BPOR_POR_CONFIG_RETENTION_GET(x) (((uint32_t)(x) & BPOR_POR_CONFIG_RETENTION_MASK) >> BPOR_POR_CONFIG_RETENTION_SHIFT)
29 
30 
31 
32 
33 #endif /* HPM_BPOR_H */
34