Macros | Functions
ll_pwr.h File Reference

Header file containing functions prototypes of PWR LL library. More...

`#include "gr5405.h"`

Go to the source code of this file.

## Macros
#define | LL_PWR_WKUP_COND_EXT AON_CTL_MCU_WAKEUP_CTRL_EXT
#define | LL_PWR_WKUP_COND_TIMER AON_CTL_MCU_WAKEUP_CTRL_SLP_TIMER
#define | LL_PWR_WKUP_COND_BLE AON_CTL_MCU_WAKEUP_CTRL_SMS_OSC
#define | LL_PWR_WKUP_COND_CLDR AON_CTL_MCU_WAKEUP_CTRL_RTC0
#define | LL_PWR_WKUP_COND_AON_WDT AON_CTL_MCU_WAKEUP_CTRL_AON_WDT
#define | LL_PWR_WKUP_COND_COMP_RISE AON_CTL_MCU_WAKEUP_CTRL_COMP_RISE
#define | LL_PWR_WKUP_COND_COMP_FALL AON_CTL_MCU_WAKEUP_CTRL_COMP_FALL
#define | LL_PWR_WKUP_COND_ALL AON_CTL_WAKEUP_CTRL_SEL
#define | LL_PWR_WKUP_EVENT_BLE AON_CTL_SLP_EVENT_SMS_OSC
#define | LL_PWR_WKUP_EVENT_TIMER AON_CTL_SLP_EVENT_SLP_TIMER
#define | LL_PWR_WKUP_EVENT_EXT AON_CTL_SLP_EVENT_EXT
#define | LL_PWR_WKUP_EVENT_COMP_RISE AON_CTL_SLP_EVENT_COMP_RISE
#define | LL_PWR_WKUP_EVENT_COMP_FALL AON_CTL_SLP_EVENT_COMP_FALL
#define | LL_PWR_WKUP_EVENT_WDT AON_CTL_SLP_EVENT_AON_WDT
#define | LL_PWR_WKUP_EVENT_CLDR AON_CTL_SLP_EVENT_RTC0
#define | LL_PWR_WKUP_EVENT_ALL AON_CTL_SLP_EVENT_ALL
#define | LL_PWR_AON_IRQ_EVT_BLE_PWR_ON AON_CTL_AON_IRQ_BLE_PWR
#define | LL_PWR_AON_IRQ_EVT_BLE_PWR_DN AON_CTL_AON_IRQ_BLE_PWR_DN
#define | LL_PWR_AON_IRQ_EVT_BOD_RISE AON_CTL_AON_IRQ_PMU_BOD_RISE
#define | LL_PWR_AON_IRQ_EVT_CPLL_DN AON_CTL_AON_IRQ_AONPLL_CHG
#define | LL_PWR_AON_IRQ_EVT_BOD_FALL AON_CTL_AON_IRQ_PMU_BOD_FALL
#define | LL_PWR_AON_IRQ_EVT_BLE_MAC AON_CTL_AON_IRQ_BLE_MAC_IRQ
#define | LL_PWR_AON_IRQ_EVT_SLP_FAIL AON_CTL_AON_IRQ_SLP_FAIL_IRQ
#define | LL_PWR_AON_IRQ_EVT_ALL AON_CTL_AON_IRQ_BLE_ALL
#define | LL_PWR_AON_IRQ_EN_BLE_PWR_ON AON_CTL_AON_IRQ_EN_BLE_PWR_ON
#define | LL_PWR_AON_IRQ_EN_BLE_PWR_DN AON_CTL_AON_IRQ_EN_BLE_PWR_DN
#define | LL_PWR_AON_IRQ_EN_BOD_RISE AON_CTL_AON_IRQ_EN_PMU_BOD_RISE
#define | LL_PWR_AON_IRQ_EN_CPLL_DN AON_CTL_AON_IRQ_EN_AONPLL_CHG
#define | LL_PWR_AON_IRQ_EN_BOD_FALL AON_CTL_AON_IRQ_EN_PMU_BOD_FALL
#define | LL_PWR_AON_IRQ_EN_BLE_MAC AON_CTL_AON_IRQ_EN_BLE_MAC_IRQ
#define | LL_PWR_AON_IRQ_EN_SLP_FAIL AON_CTL_AON_IRQ_EN_SLP_FAIL_IRQ
#define | LL_PWR_AON_IRQ_EN_ALL AON_CTL_AON_IRQ_EN_ALL
#define | LL_PWR_DPAD_LE_OFF (0x00000000U)
#define | LL_PWR_DPAD_LE_ON (0x00000001U)

## Functions
__STATIC_INLINE void | ll_pwr_set_wakeup_condition (uint32_t condition)
| Set the DeepSleep WakeUp Condition. More...
__STATIC_INLINE void | ll_pwr_clear_wakeup_condition (uint32_t condition)
| Clear the DeepSleep WakeUp Condition. More...
__STATIC_INLINE uint32_t | ll_pwr_get_wakeup_condition (void)
| Get the Selected DeepSleep WakeUp Condition. More...
__STATIC_INLINE uint32_t | ll_pwr_get_wakeup_event (void)
| Get the Event that triggered the DeepSleep WakeUp. More...
__STATIC_INLINE void | ll_pwr_set_sleep_timer_value (uint32_t value)
| Set the 32 bits AON Sleep Timer Value to WakeUp the MCU from DeepSleep Mode. More...
__STATIC_INLINE uint32_t | ll_pwr_get_sleep_timer_read_value (void)
| Read the AON Sleep Timer counter current value. More...
__STATIC_INLINE void | ll_pwr_enable_smc_wakeup_req (void)
| Enable the SMC WakeUp Request. More...
__STATIC_INLINE void | ll_pwr_disable_smc_wakeup_req (void)
| Disable the SMC WakeUp Request. More...
__STATIC_INLINE uint32_t | ll_pwr_is_enabled_smc_wakeup_req (void)
| Check if the SMC WakeUp Request was enabled or disabled. More...
__STATIC_INLINE void | ll_pwr_set_dpad_le_value (uint32_t sleep, uint32_t wakeup)
| Set the DPAD LE value during sleep and after wake up. More...
__STATIC_INLINE void | ll_pwr_enable_comm_timer_reset (void)
| Enable the Communication Timer Reset. More...
__STATIC_INLINE void | ll_pwr_disable_comm_timer_reset (void)
| Disable the Communication Timer Reset, and set Communication Timer to running state. More...
__STATIC_INLINE uint32_t | ll_pwr_is_enabled_comm_timer_reset (void)
| Check if the Communication Timer Reset was enabled or disabled. More...
__STATIC_INLINE void | ll_pwr_enable_comm_core_reset (void)
| Enable the Communication Core Reset. More...
__STATIC_INLINE void | ll_pwr_disable_comm_core_reset (void)
| Disable the Communication Core Reset, and set Communication Core to running state. More...
__STATIC_INLINE uint32_t | ll_pwr_is_enabled_comm_core_reset (void)
| Check if the Communication Core Reset was enabled or disabled. More...
__STATIC_INLINE void | ll_pwr_enable_comm_timer_power (void)
| Enable the Communication Timer Power, the Communication Timer will be Powered Up. More...
__STATIC_INLINE void | ll_pwr_disable_comm_timer_power (void)
| Disable the Communication Timer Power, the Communication Timer will be Powered Down. More...
__STATIC_FORCEINLINE uint32_t | ll_pwr_is_enabled_comm_timer_power (void)
| Check if the Communication Timer Power was enabled or disabled. More...
__STATIC_INLINE void | ll_pwr_enable_comm_core_power (void)
| Enable the Communication Core Power, the Communication Core will be Powered Up. More...
__STATIC_INLINE void | ll_pwr_disable_comm_core_power (void)
| Disable the Communication Core Power, the Communication Core will be Powered Down. More...
__STATIC_INLINE uint32_t | ll_pwr_is_enabled_comm_core_power (void)
| Check if the Communication Core Power was enabled or disabled. More...
__STATIC_INLINE void | ll_pwr_enable_osc_sleep (void)
| Enable high frequency crystal oscillator sleep mode, and diable OSC. More...
__STATIC_INLINE void | ll_pwr_disable_osc_sleep (void)
| Disable high frequency crystal oscillator sleep mode. More...
__STATIC_INLINE uint32_t | ll_pwr_is_enabled_osc_sleep (void)
| Check if the OSC sleep mode was enabled or disabled. More...
__STATIC_INLINE void | ll_pwr_enable_radio_sleep (void)
| Enable Radio sleep mode, and disable Radio module. More...
__STATIC_INLINE void | ll_pwr_disable_radio_sleep (void)
| Disable Radio sleep mode. More...
__STATIC_INLINE uint32_t | ll_pwr_is_enabled_radio_sleep (void)
| Check if the Radio sleep mode was enabled or disabled. More...
__STATIC_INLINE void | ll_pwr_enable_comm_core_deep_sleep (void)
| Enable Communication Core Deep Sleep Mode. More...
__STATIC_INLINE void | ll_pwr_disable_comm_core_deep_sleep (void)
| Disable Communication Core Deep Sleep Mode. More...
__STATIC_INLINE uint32_t | ll_pwr_is_enabled_comm_core_deep_sleep (void)
| Check if the Communication Core Deep Sleep Mode was enabled or disabled. More...
__STATIC_INLINE void | ll_pwr_enable_comm_soft_wakeup_req (void)
| Enable Wake Up Request from Software. More...
__STATIC_INLINE uint32_t | ll_pwr_is_enabled_soft_wakeup_req (void)
| Check if the Wake Up Request was enabled or disabled. More...
__STATIC_INLINE void | ll_pwr_enable_comm_core_ext_wakeup (void)
| Enable Communication Core external wakeup. More...
__STATIC_INLINE void | ll_pwr_disable_comm_core_ext_wakeup (void)
| Disable Communication Core external wakeup. More...
__STATIC_INLINE uint32_t | ll_pwr_is_enabled_comm_core_ext_wakeup (void)
| Check if the Communication Core external wakeup was enabled or disabled. More...
__STATIC_INLINE void | ll_pwr_set_comm_core_wakeup_time (uint32_t time)
| Set the time in low_power_clk clock cycles to spend in Deep Sleep Mode before waking-up the device. More...
__STATIC_FORCEINLINE uint32_t | ll_pwr_get_comm_wakeup_time (void)
| Get the time in low_power_clk clock cycles to spend in Deep Sleep Mode before waking-up the device. More...
__STATIC_FORCEINLINE uint32_t | ll_pwr_get_comm_sleep_duration (void)
| Get the actual duration of the last deep sleep phase measured in low_power_clk clock cycle. More...
__STATIC_INLINE void | ll_pwr_set_comm_wakeup_timing (uint32_t twext, uint32_t twosc, uint32_t twrm)
| Set the wakeup timing in low_power_clk clock cycles to spend when waking-up the device. More...
__STATIC_INLINE uint32_t | ll_pwr_read_comm_wakeup_timing (void)
| Read the wakeup timing in low_power_clk clock cycles to spend when waking-up the device. More...
__STATIC_FORCEINLINE uint32_t | ll_pwr_read_comm_wakeup_timing_twosc (void)
| Read the Twosc of the wakeup timing in low_power_clk clock cycles to spend when waking-up the device. More...
__STATIC_INLINE uint32_t | ll_pwr_get_ext_wakeup_status (void)
| Get the External Wake Up Status. More...
__STATIC_INLINE void | ll_pwr_clear_ext_wakeup_status (uint32_t wakeup_pin)
| Clear the External Wake Up Status. More...
__STATIC_INLINE void | ll_pwr_clear_wakeup_event (uint32_t event)
| Clear the Event that triggered the DeepSleep WakeUp. More...
__STATIC_INLINE uint32_t | ll_pwr_is_active_flag_comm_deep_sleep_stat (void)
| Indicate if the Communication Core is in Deep Sleep Mode. More...
__STATIC_INLINE void | ll_pwr_disable_cache_module (void)
| Disable cache function. More...
__STATIC_INLINE void | ll_pwr_set_dcdc_prepare_timing (uint32_t value)
| Set DCDC prepare timing. More...
__STATIC_INLINE void | ll_pwr_set_dig_ldo_prepare_timing (uint32_t value)
| Set digtal LDO prepare timing. More...
__STATIC_INLINE void | ll_pwr_set_fast_ldo_prepare_timing (uint32_t value)
| Set fast LDO prepare timing. More...
__STATIC_INLINE void | ll_pwr_set_hf_osc_prepare_timing (uint32_t value)
| Set HF OSC prepare timing. More...
__STATIC_INLINE void | ll_pwr_set_pll_lock_timing (uint32_t value)
| Set PLL lock prepare timing. More...
__STATIC_INLINE void | ll_pwr_set_pll_prepare_timing (uint32_t value)
| Set PLL prepare timing. More...
__STATIC_INLINE void | ll_pwr_set_pwr_switch_prepare_timing (uint32_t value)
| Set power switch prepare timing. More...
__STATIC_INLINE void | ll_pwr_set_xo_prepare_timing (uint32_t value)
| Set Set XO prepare timing. More...
__STATIC_INLINE void | ll_pwr_set_pwr_mode (uint32_t value)
| ll_pwr_set_pwr_mode More...
__STATIC_INLINE void | ll_pwr_turn_off_enable_xo_pll_after_dcdc_ready (void)
| Turn off enable xo/pll in warm boot. More...
__STATIC_INLINE void | ll_pwr_turn_on_enable_xo_pll_after_dcdc_ready (void)
| Turn on enable xo/pll in srpg. More...
__STATIC_INLINE void | ll_pwr_enable_aon_irq (uint32_t condition)
| Set the AON IRQ Condition. More...
__STATIC_INLINE void | ll_pwr_disable_aon_irq (uint32_t condition)
| clear the AON IRQ Condition More...
__STATIC_INLINE void | ll_pwr_clear_aon_irq_event (uint32_t condition)
| Clear the AON IRQ EVENT. More...

## Detailed Description

Header file containing functions prototypes of PWR LL library.

Author
  BLE Driver Team

Attention
  #####Copyright (c) 2019 GOODIX All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file ll_pwr.h.