Functions
Configuration functions
Peripheral Driver » LL Driver » CALENDAR » Functions

## Functions
__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_read_tick (void)
| Read the RTC counter current tick 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 (void)
| 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...

## Detailed Description

## Function Documentation

## ◆ ll_calendar_clear_wrap()

__STATIC_INLINE void ll_calendar_clear_wrap | ( | void |  | ) |

CLear calendar wrap.

Register|BitsName --------|-------- CLDR_CFG0 | Wrap counter clear

Return values

  None |

Definition at line 344 of file gr533x_ll_calendar.h.

References CLDR_REG_READ.

## ◆ ll_calendar_disable()

__STATIC_INLINE void ll_calendar_disable | ( | void |  | ) |

Disable calendar counter.

Register|BitsName --------|-------- CLDR_CFG0 | EN

Return values

  None |

Definition at line 142 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_disable_alarm()

__STATIC_INLINE void ll_calendar_disable_alarm | ( | void |  | ) |

Disable calendar alarm.

Register|BitsName --------|-------- CALENDAR_TIMER_CTL | ALARM_DISBALE

Return values

  None |

Definition at line 409 of file gr533x_ll_calendar.h.

References CLDR_REG_READ.

## ◆ ll_calendar_disable_tick()

__STATIC_INLINE void ll_calendar_disable_tick | ( | uint32_t | tick_number | ) |

Disable calendar tick.

Register|BitsName --------|-------- CALENDAR_TIMER_CTL | TICK_EN

Parameters

  tick_number | This parameter can be a one of the following values: LL_CLDR_TIMER_TICK

Return values

  None |

Definition at line 488 of file gr533x_ll_calendar.h.

References CLDR_REG_READ.

## ◆ ll_calendar_enable()

__STATIC_INLINE void ll_calendar_enable | ( | void |  | ) |

Enable calendar counter.

Register|BitsName --------|-------- CLDR_CFG0 | EN

Return values

  None |

Definition at line 128 of file gr533x_ll_calendar.h.

References CLDR_REG_READ.

## ◆ ll_calendar_enable_alarm()

__STATIC_INLINE void ll_calendar_enable_alarm | ( | void |  | ) |

Enable calendar alarm.

Register|BitsName --------|-------- CALENDAR_TIMER_CTL | ALARM_EN

Return values

  None |

Definition at line 381 of file gr533x_ll_calendar.h.

References CLDR_REG_READ.

## ◆ ll_calendar_enable_tick()

__STATIC_INLINE void ll_calendar_enable_tick | ( | uint32_t | tick_number,
|  | uint32_t | tick_mode
| ) |  |

Set calendar tick mode.

Register|BitsName --------|-------- CALENDAR_TIMER_CTL | TICK_EN

Parameters

  tick_number | This parameter can be a one of the following values: LL_CLDR_TIMER_TICK
  tick_mode | This parameter can be a one of the following values: LL_CLDR_TIMER_TICK_TYPE_SINGLE LL_CLDR_TIMER_TICK_TYPE_AUTO

Return values

  None |

Definition at line 456 of file gr533x_ll_calendar.h.

References CLDR_REG_READ.

## ◆ ll_calendar_get_alarm()

__STATIC_INLINE uint32_t ll_calendar_get_alarm | ( | void |  | ) |

Read the CALENDAR counter config alarm value.

Register|BitsName --------|-------- CLDR_ALARM_W | CAL_ALARM

Return values

  Value | for current alarm which should ranging between 0 ~ 0xFFFF_FFFF

Definition at line 258 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_get_counter()

__STATIC_INLINE uint32_t ll_calendar_get_counter | ( | void |  | ) |

Read the CALENDAR counter config value.

Register|BitsName --------|-------- CLDR_TIMER_W | TIMER_VAL_READ

Return values

  Value | for current counter which should ranging between 0 ~ 0xFFFF_FFFF

Definition at line 230 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_get_read_alarm()

__STATIC_INLINE uint32_t ll_calendar_get_read_alarm | ( | void |  | ) |

Read the CALENDAR counter current alarm value.

Register|BitsName --------|-------- CLDR_ALARM_R | CAL_ALARM

Return values

  Value | for current alarm which should ranging between 0 ~ 0xFFFF_FFFF

Definition at line 272 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_get_read_counter()

__STATIC_INLINE uint32_t ll_calendar_get_read_counter | ( | void |  | ) |

Read the CALENDAR counter current value.

Register|BitsName --------|-------- CLDR_TIMER_R | TIMER_VAL_READ

Return values

  Value | for current counter which should ranging between 0 ~ 0xFFFF_FFFF

Definition at line 244 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_get_read_tick()

__STATIC_INLINE uint32_t ll_calendar_get_read_tick | ( | void |  | ) |

Read the RTC counter current tick value.

Register|BitsName --------|-------- CLDR_TICK_R

Return values

  Value | for current tick which should ranging between 0 ~ 0xFFFF_FFFF

Definition at line 286 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_get_wrapcnt()

__STATIC_INLINE uint32_t ll_calendar_get_wrapcnt | ( | void |  | ) |

Get the CALENDAR wrap-around value.

Note
  The value should be read multiple times until get the same value in at least two reads.

Register|BitsName --------|-------- CLDR_STAT | WRAP_CNT

Return values

  Value | between Min_Data=0 and Max_Data=0xF

Definition at line 301 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_is_busy()

__STATIC_INLINE uint32_t ll_calendar_is_busy | ( | void |  | ) |

The CALENDAR is busy.

Register|BitsName --------|-------- CLDR_STAT | BUSY

Return values

  Value | between Min_Data=0 and Max_Data=0xF

Definition at line 315 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_is_enabled()

__STATIC_INLINE uint32_t ll_calendar_is_enabled | ( | void |  | ) |

Check if the CALENDAR peripheral is enabled or disabled.

Register|BitsName --------|-------- CLDR_CFG0 | EN

Return values

  State | of bit (1 or 0).

Definition at line 156 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_is_running()

__STATIC_INLINE uint32_t ll_calendar_is_running | ( | void |  | ) |

The CALENDAR is running.

Register|BitsName --------|-------- CLDR_STAT | RUNNING

Return values

  Value | between Min_Data=0 and Max_Data=0xF

Definition at line 329 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_it_disable_alarm()

__STATIC_INLINE void ll_calendar_it_disable_alarm | ( | void |  | ) |

Disable calendar alarm interrupt.

Register|BitsName --------|-------- CLDR_INT_EN | ALARM_INT_EN

Return values

  None |

Definition at line 423 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_it_disable_tick()

__STATIC_INLINE void ll_calendar_it_disable_tick | ( | uint32_t | tick_number | ) |

Disable calendar tick interrupt.

Register|BitsName --------|-------- CLDR_INT_EN | TICK0_INT_EN

Parameters

  tick_number | This parameter can be a one of the following values: LL_CLDR_TIMER_TICK

Return values

  None |

Definition at line 504 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_it_disable_wrap()

__STATIC_INLINE void ll_calendar_it_disable_wrap | ( | void |  | ) |

Disable calendar warp interrupt.

Register|BitsName --------|-------- CALENDAR_TIMER_CTL | WRAP_INT_EN

Return values

  None |

Definition at line 567 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_it_enable_alarm()

__STATIC_INLINE void ll_calendar_it_enable_alarm | ( | void |  | ) |

Enable calendar alarm interrupt.

Register|BitsName --------|-------- CALENDAR_TIMER_CTL | ALARM_INT_EN

Return values

  None |

Definition at line 395 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_it_enable_tick()

__STATIC_INLINE void ll_calendar_it_enable_tick | ( | uint32_t | tick_number | ) |

Enable calendar tick interrupt.

Register|BitsName --------|-------- CLDR_INT_EN | TICK_INT_EN

Parameters

  tick_number | This parameter can be a one of the following values: LL_CLDR_TIMER_TICK

Return values

  None |

Definition at line 472 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_it_enable_wrap()

__STATIC_INLINE void ll_calendar_it_enable_wrap | ( | void |  | ) |

Enable calendar wrap interrupt.

Register|BitsName --------|-------- CALENDAR_TIMER_CTL | WRAP_INT_EN

Return values

  None |

Definition at line 553 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_it_is_enabled_alarm()

__STATIC_INLINE uint32_t ll_calendar_it_is_enabled_alarm | ( | void |  | ) |

Check if the CALENDAR alarm interrupt is enabled or disabled.

Register|BitsName --------|-------- CALENDAR_TIMER_CTL | ALARM_INT_EN

Return values

  State | of bit (1 or 0).

Definition at line 437 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_it_is_enabled_tick()

__STATIC_INLINE uint32_t ll_calendar_it_is_enabled_tick | ( | void |  | ) |

Check if the CALENDAR alarm interrupt is enabled or disabled.

Register|BitsName --------|-------- CALENDAR_TIMER_CTL | TICK_EN CLDR_INT_EN | TICK_INT_EN

Return values

  State | of bit (1 or 0).

Definition at line 519 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_it_is_enabled_wrap()

__STATIC_INLINE uint32_t ll_calendar_it_is_enabled_wrap | ( | void |  | ) |

Check if the CALENDAR wrap interrupt is enabled or disabled.

Register|BitsName --------|-------- CALENDAR_TIMER_CTL | WRAP_INT_EN

Return values

  State | of bit (1 or 0).

Definition at line 581 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_reload_alarm()

__STATIC_INLINE void ll_calendar_reload_alarm | ( | uint32_t | alarm | ) |

Reloads CALENDAR alarm.

Register|BitsName --------|-------- CLDR_TIMER_W | ALARM_VAL_LOAD

Return values

  None |

Definition at line 200 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_reload_alarm_and_request()

__STATIC_INLINE void ll_calendar_reload_alarm_and_request | ( | uint32_t | alarm | ) |

Reloads CALENDAR alarm and request.

Register|BitsName --------|-------- CLDR_ALARM_W | ALARM_VAL_LOAD CLDR_CFG0 | ALARM_VALUE

Return values

  None |

Definition at line 215 of file gr533x_ll_calendar.h.

References CLDR_REG_READ.

## ◆ ll_calendar_reload_counter()

__STATIC_INLINE void ll_calendar_reload_counter | ( | uint32_t | counter | ) |

Reloads CALENDAR counter.

Register|BitsName --------|-------- CLDR_TIMER_W | TIMER_VALUE

Return values

  None |

Definition at line 170 of file gr533x_ll_calendar.h.

## ◆ ll_calendar_reload_counter_and_request()

__STATIC_INLINE void ll_calendar_reload_counter_and_request | ( | uint32_t | counter | ) |

Reloads CALENDAR counter and request.

Register|BitsName --------|-------- CLDR_TIMER_W | TIMER_VALUE CLDR_CFG0 | VAL_LOAD

Return values

  None |

Definition at line 185 of file gr533x_ll_calendar.h.

References CLDR_REG_READ.

## ◆ ll_calendar_reload_tick_and_request()

__STATIC_INLINE void ll_calendar_reload_tick_and_request | ( | uint32_t | tick_number,
|  | uint32_t | counter
| ) |  |

Reloads CALENDAR tick counter and request.

Register|BitsName --------|-------- CLDR_TIMER_W | TIMER_VALUE CLDR_CFG0 | VAL_LOAD

Parameters

  tick_number | This parameter can be a one of the following values: LL_CLDR_TIMER_TICK
  counter | Calendar tick counter.

Return values

  None |

Definition at line 537 of file gr533x_ll_calendar.h.

References CLDR_REG_READ.

## ◆ ll_calendar_set_clock_div()

__STATIC_INLINE void ll_calendar_set_clock_div | ( | uint32_t | div | ) |

Select the CALENDAR clock divider.

Register|BitsName --------|-------- CLDR_CFG1 | CLK_SEL

Parameters

  div | This parameter can be one of the following values: LL_CALENDAR_DIV_NONE LL_CALENDAR_DIV_2 LL_CALENDAR_DIV_4 LL_CALENDAR_DIV_8 LL_CALENDAR_DIV_16 LL_CALENDAR_DIV_32 LL_CALENDAR_DIV_64 LL_CALENDAR_DIV_128

Return values

  None |

Definition at line 367 of file gr533x_ll_calendar.h.