ll_sleep_timer.h File Reference

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

#include "gr5405.h"

Go to the source code of this file.

Macros

#define SLP_TIMER_CFG_CNT_SLP_ONLY   (0x1U << SLP_TIMER_CFG_COUNT_MODE_POS)
 
#define SLP_TIMER_CFG_CNT_ANY_CONDITION   (0x0U << SLP_TIMER_CFG_COUNT_MODE_POS)
 
#define SLP_TIMER_CFG_SINGLE_MODE   (0x1U << SLP_TIMER_CFG_MODE_POS)
 
#define SLP_TIMER_CFG_AUTO_RELOAD   (0x0U << SLP_TIMER_CFG_MODE_POS)
 
#define LL_SLEEP_TIMER_SINGLE_MODE_0   (SLP_TIMER_CFG_SINGLE_MODE | SLP_TIMER_CFG_CNT_SLP_ONLY)
 
#define LL_SLEEP_TIMER_SINGLE_MODE_1   (SLP_TIMER_CFG_SINGLE_MODE | SLP_TIMER_CFG_CNT_ANY_CONDITION)
 
#define LL_SLEEP_TIMER_AUTO_MODE   (SLP_TIMER_CFG_AUTO_RELOAD | SLP_TIMER_CFG_CNT_ANY_CONDITION)
 
#define LL_SLP_TIMER_WriteReg(__instance__, __REG__, __VALUE__)   WRITE_REG(__instance__->__REG__, (__VALUE__))
 Write a value in SLP_TIMER register. More...
 
#define LL_SLP_TIMER_ReadReg(__instance__, __REG__)   READ_REG(__instance__->__REG__)
 Read a value in SLP_TIMER register. More...
 

Functions

__STATIC_INLINE void ll_sleep_timer_config_and_start (slp_timer_regs_t *SLP_TIMERx, uint32_t mode)
 Configure Sleep Timer Work mode and Start Sleep Timer. More...
 
__STATIC_INLINE void ll_sleep_timer_enable (slp_timer_regs_t *SLP_TIMERx)
 Enable sleep timer. More...
 
__STATIC_INLINE void ll_sleep_timer_disable (slp_timer_regs_t *SLP_TIMERx)
 disable sleep timer More...
 
__STATIC_INLINE void ll_sleep_timer_load_counter_value (slp_timer_regs_t *SLP_TIMERx)
 enable sleep timer More...
 
__STATIC_INLINE void ll_sleep_timer_set_mode (slp_timer_regs_t *SLP_TIMERx, uint32_t mode)
 Set the Sleep Timer Work Mode. More...
 
__STATIC_INLINE uint32_t ll_sleep_timer_get_mode (slp_timer_regs_t *SLP_TIMERx)
 Get the Sleep Timer Work Mode. More...
 
__STATIC_INLINE uint32_t ll_sleep_timer_is_running (slp_timer_regs_t *SLP_TIMERx)
 check the sleep timer runing state. More...
 
__STATIC_INLINE uint32_t ll_sleep_timer_is_busy (slp_timer_regs_t *SLP_TIMERx)
 check the sleep timer busy state. More...
 
__STATIC_INLINE uint32_t ll_sleep_timer_is_counting (slp_timer_regs_t *SLP_TIMERx)
 check the sleep timer busy state. More...
 
__STATIC_INLINE void ll_sleep_timer_set_counter_value (slp_timer_regs_t *SLP_TIMERx, uint32_t value)
 Set the 32 bits reload value to register, which not real internal value. More...
 
__STATIC_INLINE uint32_t ll_sleep_timer_get_counter_value (slp_timer_regs_t *SLP_TIMERx)
 Set the 32 bits reload value to register, which not real internal value. More...
 
__STATIC_INLINE uint32_t ll_sleep_timer_get_counter_int_value (slp_timer_regs_t *SLP_TIMERx)
 Get the current count value. More...
 
__STATIC_INLINE void ll_sleep_timer_clear_flag_it (void)
 Clear the sleep timer interrupt status flag. More...
 

Detailed Description

Header file containing functions prototypes of sleep timer LL library.

Author
BLE Driver Team
Attention
#####Copyright (c) 2023 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_sleep_timer.h.