HPM SDK
HPMicro Software Development Kit
hpm_bpor_drv.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 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 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
35 {
36  return (ptr->POR_CONFIG & BPOR_POR_CONFIG_RETENTION_MASK) ? true : false;
37 }
38 
45 {
47 }
48 
55 {
57 }
58 
59 #ifdef __cplusplus
60 }
61 #endif
65 #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:54
static void bpor_enable_reg_value_retention(BPOR_Type *ptr)
Enable register value retention when power down occurs.
Definition: hpm_bpor_drv.h:44
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:34
Definition: hpm_bpor_regs.h:12
__RW uint32_t POR_CONFIG
Definition: hpm_bpor_regs.h:15