HPM SDK
HPMicro Software Development Kit
hpm_bpor_drv.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef HPM_BPOR_DRV_H
9 #define HPM_BPOR_DRV_H
10 
11 #include "hpm_common.h"
12 #include "hpm_bpor_regs.h"
13 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
36 {
37  return (ptr->POR_CONFIG & BPOR_POR_CONFIG_RETENTION_MASK) ? true : false;
38 }
39 
46 {
48 }
49 
56 {
58 }
59 
60 
61 #ifdef __cplusplus
62 }
63 #endif
67 #endif /* HPM_BPOR_DRV_H */
#define BPOR_POR_CONFIG_RETENTION_MASK
Definition: hpm_bpor_regs.h:60
static void bpor_disable_reg_value_retention(BPOR_Type *ptr)
Disable register value retention when power down occurs.
Definition: hpm_bpor_drv.h:55
static void bpor_enable_reg_value_retention(BPOR_Type *ptr)
Enable register value retention when power down occurs.
Definition: hpm_bpor_drv.h:45
static bool bpor_is_reg_value_retention_enable(BPOR_Type *ptr)
Check register value retention enable status when power down occurs.
Definition: hpm_bpor_drv.h:35
Definition: hpm_bpor_regs.h:12
__RW uint32_t POR_CONFIG
Definition: hpm_bpor_regs.h:15