Macros | Functions
ll_rtc.h File Reference

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

`#include "gr5405.h"`

Go to the source code of this file.

## Macros
#define | LL_RTC_DIV_NONE ((uint32_t)0x00U)
#define | LL_RTC_DIV_2 ((uint32_t)0x01UL << RTC_CFG1_DIV_Pos)
#define | LL_RTC_DIV_4 ((uint32_t)0x02UL << RTC_CFG1_DIV_Pos)
#define | LL_RTC_DIV_8 ((uint32_t)0x03UL << RTC_CFG1_DIV_Pos)
#define | LL_RTC_DIV_16 ((uint32_t)0x04UL << RTC_CFG1_DIV_Pos)
#define | LL_RTC_DIV_32 ((uint32_t)0x05UL << RTC_CFG1_DIV_Pos)
#define | LL_RTC_DIV_64 ((uint32_t)0x06UL << RTC_CFG1_DIV_Pos)
#define | LL_RTC_DIV_128 ((uint32_t)0x07UL << RTC_CFG1_DIV_Pos)
#define | LL_RTC_TIMER_TICK_TYPE_SINGLE (0x0U)
#define | LL_RTC_TIMER_TICK_TYPE_AUTO (0x1U)
#define | READ_CFG0_CFG(RTCx)
| LL RTC Read CFG. More...

## Functions
__STATIC_INLINE void | ll_rtc_enable (rtc_regs_t *RTCx)
| Enable RTC counter. More...
__STATIC_INLINE void | ll_rtc_disable (rtc_regs_t *RTCx)
| Disable RTC counter. More...
__STATIC_INLINE uint32_t | ll_rtc_is_enabled (rtc_regs_t *RTCx)
| Check if the RTC peripheral is enabled or disabled. More...
__STATIC_INLINE void | ll_rtc_reload_counter (rtc_regs_t *RTCx, uint32_t counter)
| Reloads RTC counter. More...
__STATIC_INLINE void | ll_rtc_start_value_set_and_request (rtc_regs_t *RTCx, uint32_t start_value)
| Reloads RTC counter and request. More...
__STATIC_INLINE void | ll_rtc_reload_alarm (rtc_regs_t *RTCx, uint32_t value)
| Reloads RTC alarm. More...
__STATIC_INLINE void | ll_rtc_alarm_value_set_and_request (rtc_regs_t *RTCx, uint32_t alarm_value)
| Reloads RTC alarm and request. More...
__STATIC_INLINE void | ll_rtc_reload_tick (rtc_regs_t *RTCx, uint32_t tick)
| Reloads RTC perd_alarm. More...
__STATIC_INLINE void | ll_rtc_tick_value_set_and_request (rtc_regs_t *RTCx, uint32_t alarm_value)
| Reloads RTC tick and request. More...
__STATIC_INLINE uint32_t | ll_rtc_get_write_counter (rtc_regs_t *RTCx)
| Read the RTC counter config value. More...
__STATIC_INLINE uint32_t | ll_rtc_get_read_counter (rtc_regs_t *RTCx)
| Read the RTC counter current value. More...
__STATIC_INLINE uint32_t | ll_rtc_get_write_alarm (rtc_regs_t *RTCx)
| Read the RTC counter config alarm value. More...
__STATIC_INLINE uint32_t | ll_rtc_get_read_alarm (rtc_regs_t *RTCx)
| Read the RTC counter current alarm value. More...
__STATIC_INLINE uint32_t | ll_rtc_get_write_tick (rtc_regs_t *RTCx)
| Read the RTC counter config tick value. More...
__STATIC_INLINE uint32_t | ll_rtc_get_read_tick (rtc_regs_t *RTCx)
| Read the RTC counter current tick value. More...
__STATIC_INLINE uint32_t | ll_rtc_get_wrapcnt (rtc_regs_t *RTCx)
| Get the RTC wrap-around value. More...
__STATIC_INLINE uint32_t | ll_rtc_is_busy (rtc_regs_t *RTCx)
| The RTC is busy. More...
__STATIC_INLINE uint32_t | ll_rtc_is_running (rtc_regs_t *RTCx)
| The RTC is running. More...
__STATIC_INLINE void | ll_rtc_clear_wrap_and_request (rtc_regs_t *RTCx)
| CLear RTC wrap. More...
__STATIC_INLINE void | ll_rtc_set_clock_div (rtc_regs_t *RTCx, uint32_t div)
| Select the RTC clock divider. More...
__STATIC_INLINE void | ll_rtc_set_alarm (rtc_regs_t *RTCx, uint32_t value)
| Set RTC alarm. More...
__STATIC_INLINE void | ll_rtc_it_enable_alarm (rtc_regs_t *RTCx)
| Enable RTC alarm interrupt. More...
__STATIC_INLINE void | ll_rtc_disable_alarm (rtc_regs_t *RTCx)
| Disable RTC alarm. More...
__STATIC_INLINE void | ll_rtc_it_disable_alarm (rtc_regs_t *RTCx)
| Disable RTC alarm interrupt. More...
__STATIC_INLINE uint32_t | ll_rtc_it_is_enabled_alarm (rtc_regs_t *RTCx)
| Check if the RTC alarm interrupt is enabled or disabled. More...
__STATIC_INLINE void | ll_rtc_set_tick_mode (rtc_regs_t *RTCx, uint8_t tick_mode)
| Set RTCx alarm_mode. More...
__STATIC_INLINE void | ll_rtc_it_enable_tick (rtc_regs_t *RTCx)
| Enable RTC tick interrupt. More...
__STATIC_INLINE void | ll_rtc_disable_tick (rtc_regs_t *RTCx)
| Disable RTCx tick. More...
__STATIC_INLINE void | ll_rtc_it_disable_tick (rtc_regs_t *RTCx)
| Disable RTC tick interrupt. More...
__STATIC_INLINE uint32_t | ll_rtc_it_is_enabled_tick (rtc_regs_t *RTCx)
| Check if the RTC alarm interrupt is enabled or disabled. More...
__STATIC_INLINE void | ll_rtc_reload_tick_and_request (rtc_regs_t *RTCx, uint32_t tick_reload)
| Reloads RTCx tick counter and request. More...
__STATIC_INLINE void | ll_rtc_restart_tick (rtc_regs_t *RTCx)
| Restart RTCx tick counter and request. More...
__STATIC_INLINE void | ll_rtc_it_enable_wrap (rtc_regs_t *RTCx)
| Enable RTC wrap interrupt. More...
__STATIC_INLINE void | ll_rtc_it_disable_wrap (rtc_regs_t *RTCx)
| Disable RTC wrap interrupt. More...
__STATIC_INLINE uint32_t | ll_rtc_it_is_enabled_wrap (rtc_regs_t *RTCx)
| Check if the RTC wrap interrupt is enabled or disabled. More...
__STATIC_INLINE uint32_t | ll_rtc_is_active_flag_alarm (rtc_regs_t *RTCx)
| Indicate if the RTC alarm event flag is set or not. More...
__STATIC_INLINE uint32_t | ll_rtc_is_active_flag_wrap (rtc_regs_t *RTCx)
| Indicate if the RTC wrap event flag is set or not. More...
__STATIC_INLINE uint32_t | ll_rtc_is_active_flag_tick (rtc_regs_t *RTCx)
| Indicate if the RTC tick event flag is set or not. More...
__STATIC_INLINE void | ll_rtc_clear_flag_alarm (rtc_regs_t *RTCx)
| Clear RTC alarm interrupt flag. More...
__STATIC_INLINE void | ll_rtc_clear_flag_wrap (rtc_regs_t *RTCx)
| Clear RTC wrap interrupt flag. More...
__STATIC_INLINE void | ll_rtc_clear_flag_tick (rtc_regs_t *RTCx)
| Clear RTC tick interrupt flag. More...
__STATIC_INLINE void | ll_rtc_clear_it_event (rtc_regs_t *RTCx)
| Clear RTC interrupt event. More...
__STATIC_INLINE void | ll_rtc_clear_tick_it_event (rtc_regs_t *RTCx)
| Clear RTC tick interrupt event. More...
__STATIC_INLINE void | ll_rtc_it_enable_wakeup_by_rtc (rtc_regs_t *RTCx)
| Enable RTC alarm wakeup interrupt. More...
__STATIC_INLINE void | ll_rtc_it_disable_wakeup_by_rtc (rtc_regs_t *RTCx)
| Disable RTC alarm wakeup interrupt. More...

## Detailed Description

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