gr55xx_ll_calendar.h File Reference

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

#include "gr55xx.h"

Go to the source code of this file.

Macros

#define LL_CALENDAR_DIV_NONE   ((uint32_t)0x00U)
 
#define LL_CALENDAR_DIV_2   ((uint32_t)0x01U << RTC_CFG1_DIV_Pos)
 
#define LL_CALENDAR_DIV_4   ((uint32_t)0x02U << RTC_CFG1_DIV_Pos)
 
#define LL_CALENDAR_DIV_8   ((uint32_t)0x03U << RTC_CFG1_DIV_Pos)
 
#define LL_CALENDAR_DIV_16   ((uint32_t)0x04U << RTC_CFG1_DIV_Pos)
 
#define LL_CALENDAR_DIV_32   ((uint32_t)0x05U << RTC_CFG1_DIV_Pos)
 
#define LL_CALENDAR_DIV_64   ((uint32_t)0x06U << RTC_CFG1_DIV_Pos)
 
#define LL_CALENDAR_DIV_128   ((uint32_t)0x07U << RTC_CFG1_DIV_Pos)
 
#define LL_CLDR_TIMER_CLK_SEL_RNG   (0x0U << RTC_CLK_SEL_Pos)
 
#define LL_CLDR_TIMER_CLK_SEL_XO   (0x1U << RTC_CLK_SEL_Pos)
 
#define LL_CLDR_TIMER_CLK_SEL_RNG2   (0x2U << RTC_CLK_SEL_Pos)
 
#define LL_CLDR_TIMER_CLK_SEL_RTC   (0x3U << RTC_CLK_SEL_Pos)
 
#define LL_CLDR_TIMER_TICK   (0x0U)
 
#define LL_CLDR_TIMER_TICK_TYPE_SINGLE   (0x0U)
 
#define LL_CLDR_TIMER_TICK_TYPE_AUTO   (0x1U)
 
#define CLDR_REG_READ
 Calendar Register Read. More...
 

Functions

__STATIC_INLINE void ll_calendar_timer_set_clk (uint32_t value)
 Set the Calendar Timer clock. More...
 
__STATIC_INLINE uint32_t ll_calendar_timer_get_clk (void)
 Get the Calendar Timer clock. More...
 
__STATIC_INLINE void ll_calendar_enable (void)
 Enable calendar counter. More...
 
__STATIC_INLINE void ll_calendar_disable (void)
 Disable calendar counter. More...
 
__STATIC_INLINE uint32_t ll_calendar_is_enabled (void)
 Check if the CALENDAR peripheral is enabled or disabled. More...
 
__STATIC_INLINE void ll_calendar_reload_counter (uint32_t counter)
 Reloads CALENDAR counter. More...
 
__STATIC_INLINE void ll_calendar_reload_counter_and_request (uint32_t counter)
 Reloads CALENDAR counter and request. More...
 
__STATIC_INLINE void ll_calendar_reload_alarm (uint32_t alarm)
 Reloads CALENDAR alarm. More...
 
__STATIC_INLINE void ll_calendar_reload_alarm_and_request (uint32_t alarm)
 Reloads CALENDAR alarm and request. More...
 
__STATIC_INLINE uint32_t ll_calendar_get_counter (void)
 Read the CALENDAR counter config value. More...
 
__STATIC_INLINE uint32_t ll_calendar_get_read_counter (void)
 Read the CALENDAR counter current value. More...
 
__STATIC_INLINE uint32_t ll_calendar_get_alarm (void)
 Read the CALENDAR counter config alarm value. More...
 
__STATIC_INLINE uint32_t ll_calendar_get_read_alarm (void)
 Read the CALENDAR counter current alarm value. More...
 
__STATIC_INLINE uint32_t ll_calendar_get_wrapcnt (void)
 Get the CALENDAR wrap-around value. More...
 
__STATIC_INLINE uint32_t ll_calendar_is_busy (void)
 The CALENDAR is busy. More...
 
__STATIC_INLINE uint32_t ll_calendar_is_running (void)
 The CALENDAR is running. More...
 
__STATIC_INLINE void ll_calendar_clear_wrap (void)
 CLear calendar wrap. More...
 
__STATIC_INLINE void ll_calendar_set_clock_div (uint32_t div)
 Select the CALENDAR clock divider. More...
 
__STATIC_INLINE void ll_calendar_enable_alarm (void)
 Enable calendar alarm. More...
 
__STATIC_INLINE void ll_calendar_it_enable_alarm (void)
 Enable calendar alarm interrupt. More...
 
__STATIC_INLINE void ll_calendar_disable_alarm (void)
 Disable calendar alarm. More...
 
__STATIC_INLINE void ll_calendar_it_disable_alarm (void)
 Disable calendar alarm interrupt. More...
 
__STATIC_INLINE uint32_t ll_calendar_it_is_enabled_alarm (void)
 Check if the CALENDAR alarm interrupt is enabled or disabled. More...
 
__STATIC_INLINE void ll_calendar_enable_tick (uint32_t tick_number, uint32_t tick_mode)
 Set calendar tick mode. More...
 
__STATIC_INLINE void ll_calendar_it_enable_tick (uint32_t tick_number)
 Enable calendar tick interrupt. More...
 
__STATIC_INLINE void ll_calendar_disable_tick (uint32_t tick_number)
 Disable calendar tick. More...
 
__STATIC_INLINE void ll_calendar_it_disable_tick (uint32_t tick_number)
 Disable calendar tick interrupt. More...
 
__STATIC_INLINE uint32_t ll_calendar_it_is_enabled_tick (uint32_t tick_number)
 Check if the CALENDAR alarm interrupt is enabled or disabled. More...
 
__STATIC_INLINE void ll_calendar_reload_tick_and_request (uint32_t tick_number, uint32_t counter)
 Reloads CALENDAR tick counter and request. More...
 
__STATIC_INLINE void ll_calendar_it_enable_wrap (void)
 Enable calendar wrap interrupt. More...
 
__STATIC_INLINE void ll_calendar_it_disable_wrap (void)
 Disable calendar warp interrupt. More...
 
__STATIC_INLINE uint32_t ll_calendar_it_is_enabled_wrap (void)
 Check if the CALENDAR wrap interrupt is enabled or disabled. More...
 
__STATIC_INLINE uint32_t ll_calendar_is_active_flag_alarm (void)
 Indicate if the CALENDAR alarm event flag is set or not. More...
 
__STATIC_INLINE uint32_t ll_calendar_is_active_flag_wrap (void)
 Indicate if the CALENDAR wrap event flag is set or not. More...
 
__STATIC_INLINE uint32_t ll_calendar_is_active_flag_tick (uint32_t tick_number)
 Indicate if the CALENDAR tick event flag is set or not. More...
 
__STATIC_INLINE void ll_calendar_clear_flag_alarm (void)
 Clear calendar alarm interrupt flag. More...
 
__STATIC_INLINE void ll_calendar_clear_flag_wrap (void)
 Clear calendar wrap interrupt flag. More...
 
__STATIC_INLINE void ll_calendar_clear_flag_tick (uint32_t tick_number)
 Clear calendar tick interrupt flag. More...
 
__STATIC_INLINE void ll_calendar_clear_it_event (void)
 Clear calendar interrupt event. More...
 

Detailed Description

Header file containing functions prototypes of CALENDAR 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_calendar.h.