1 /* 2 * Copyright (c) 2023 HPMicro 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #ifndef HPM_BCFG_DRV_H 9 #define HPM_BCFG_DRV_H 10 11 #include "hpm_common.h" 12 #include "hpm_bcfg_regs.h" 13 14 /** 15 * 16 * @brief BCFG driver APIs 17 * @defgroup bcfg_interface BCFG driver APIs 18 * @ingroup io_interfaces 19 * @{ 20 */ 21 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 /** 28 * @brief enable power save mode 29 * 30 * @param[in] ptr base address 31 */ bcfg_vbg_enable_power_save_mode(BCFG_Type * ptr)32static inline void bcfg_vbg_enable_power_save_mode(BCFG_Type *ptr) 33 { 34 ptr->VBG_CFG |= BCFG_VBG_CFG_POWER_SAVE_MASK; 35 } 36 37 /** 38 * @brief disable power save mode 39 * 40 * @param[in] ptr base address 41 */ bcfg_vbg_disable_power_save_mode(BCFG_Type * ptr)42static inline void bcfg_vbg_disable_power_save_mode(BCFG_Type *ptr) 43 { 44 ptr->VBG_CFG &= ~BCFG_VBG_CFG_POWER_SAVE_MASK; 45 } 46 47 #ifdef __cplusplus 48 } 49 #endif 50 /** 51 * @} 52 */ 53 #endif /* HPM_BCFG_DRV_H */ 54 55