Functions
Configuration functions
Peripheral Driver » LL Driver » CALENDAR » Functions
Collaboration diagram for Configuration functions:

## 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...

## 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 374 of file gr55xx_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 186 of file gr55xx_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 439 of file gr55xx_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 LL_CLDR_TIMER_TICK

Return values

  None |

Definition at line 521 of file gr55xx_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 172 of file gr55xx_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 411 of file gr55xx_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 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 487 of file gr55xx_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 302 of file gr55xx_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 274 of file gr55xx_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 316 of file gr55xx_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 288 of file gr55xx_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 331 of file gr55xx_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 345 of file gr55xx_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 200 of file gr55xx_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 359 of file gr55xx_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 453 of file gr55xx_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 LL_CLDR_TIMER_TICK

Return values

  None |

Definition at line 538 of file gr55xx_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 606 of file gr55xx_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 425 of file gr55xx_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 LL_CLDR_TIMER_TICK

Return values

  None |

Definition at line 504 of file gr55xx_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 592 of file gr55xx_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 467 of file gr55xx_ll_calendar.h.

## ◆ ll_calendar_it_is_enabled_tick()

__STATIC_INLINE uint32_t ll_calendar_it_is_enabled_tick | ( | uint32_t | tick_number | ) |

Check if the CALENDAR alarm interrupt is enabled or disabled.

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

Parameters

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

Return values

  State | of bit (1 or 0).

Definition at line 556 of file gr55xx_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 620 of file gr55xx_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 244 of file gr55xx_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 259 of file gr55xx_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 214 of file gr55xx_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 229 of file gr55xx_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; LL_CLDR_TIMER_TICK.
  counter | Calendar tick counter.

Return values

  None |

Definition at line 576 of file gr55xx_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 397 of file gr55xx_ll_calendar.h.

## ◆ ll_calendar_timer_get_clk()

__STATIC_INLINE uint32_t ll_calendar_timer_get_clk | ( | void |  | ) |

Get the Calendar Timer clock.

Register | BitsName
--- | ---
CLDR_CLK | cldr_timer_clk_sel

Return values

  Calendar | Timer clock source,the value can be the one of the following: LL_CLDR_TIMER_CLK_SEL_RNG LL_CLDR_TIMER_CLK_SEL_XO LL_CLDR_TIMER_CLK_SEL_RNG2 LL_CLDR_TIMER_CLK_SEL_RTC

Definition at line 158 of file gr55xx_ll_calendar.h.

## ◆ ll_calendar_timer_set_clk()

__STATIC_INLINE void ll_calendar_timer_set_clk | ( | uint32_t | value | ) |

Set the Calendar Timer clock.

Register | BitsName
--- | ---
CLDR_CLK | cldr_timer_clk_sel

Parameters

  value | This parameter can be a one of the following values: LL_CLDR_TIMER_CLK_SEL_RNG LL_CLDR_TIMER_CLK_SEL_XO LL_CLDR_TIMER_CLK_SEL_RNG2 LL_CLDR_TIMER_CLK_SEL_RTC

Return values

  None |

Definition at line 140 of file gr55xx_ll_calendar.h.