gr55xx_ll_sleep_timer.h File Reference

Header file containing functions prototypes of sleep timer LL library. More...

#include "gr55xx.h"

Go to the source code of this file.

Macros

#define SLP_TIMER_CFG0_CNT_SLP_ONLY   (0x1U << SLP_TIMER_CFG0_COUNT_MODE_Pos)
 
#define SLP_TIMER_CFG0_CNT_ANY_CONDITION   (0x0U << SLP_TIMER_CFG0_COUNT_MODE_Pos)
 
#define SLP_TIMER_CFG0_SINGLE_MODE   (0x1U << SLP_TIMER_CFG0_MODE_Pos)
 
#define SLP_TIMER_CFG0_AUTO_RELOAD   (0x0U << SLP_TIMER_CFG0_MODE_Pos)
 
#define LL_SLEEP_TIMER_SINGLE_MODE_0   (SLP_TIMER_CFG0_SINGLE_MODE | SLP_TIMER_CFG0_CNT_SLP_ONLY)
 
#define LL_SLEEP_TIMER_SINGLE_MODE_1   (SLP_TIMER_CFG0_SINGLE_MODE | SLP_TIMER_CFG0_CNT_ANY_CONDITION)
 
#define LL_SLEEP_TIMER_AUTO_MODE   (SLP_TIMER_CFG0_AUTO_RELOAD | SLP_TIMER_CFG0_CNT_ANY_CONDITION)
 
#define LL_SLEEP_TIMER_CLK_SEL_RNG_OSC   (0x0U << SLP_TIMER_CLK_SEL_Pos)
 
#define LL_SLEEP_TIMER_CLK_SEL_XO   (0x1U << SLP_TIMER_CLK_SEL_Pos)
 
#define LL_SLEEP_TIMER_CLK_SEL_RNG2_OSC   (0x2U << SLP_TIMER_CLK_SEL_Pos)
 
#define LL_SLEEP_TIMER_CLK_SEL_RTC_OSC   (0x3U << SLP_TIMER_CLK_SEL_Pos)
 

Functions

__STATIC_INLINE void ll_sleep_timer_set_clk (uint32_t value)
 Set the Sleep Timer clock. More...
 
__STATIC_INLINE uint32_t ll_sleep_timer_get_clk (void)
 Get the Sleep Timer clock. More...
 
__STATIC_INLINE void ll_sleep_timer_set_value (uint32_t value)
 Set the 32 bits Sleep Timer Value to WakeUp the MCU from DeepSleep Mode. More...
 
__STATIC_INLINE uint32_t ll_sleep_timer_get_value (void)
 Get the 32 bit Sleep Timer Value to WakeUp the MCU from DeepSleep Mode. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_sleep_timer_get_read_value (void)
 Get the real internal value of the sleep timer. More...
 
__STATIC_INLINE uint32_t ll_sleep_timer_is_runing (void)
 check the sleep timer runing state. More...
 
__STATIC_INLINE uint32_t ll_sleep_timer_is_busy (void)
 check the sleep timer busy state. More...
 
__STATIC_INLINE void ll_sleep_timer_set_mode (uint32_t mode)
 Set the Sleep Timer Work Mode. More...
 
__STATIC_INLINE void ll_sleep_timer_disable (void)
 disable sleep timer More...
 
__STATIC_INLINE void ll_sleep_timer_clear_sleep_event (void)
 clear wake up event by sleep timer More...
 

Detailed Description

Header file containing functions prototypes of sleep timer 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 gr55xx_ll_sleep_timer.h.