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_alarm (uint32_t alarm)
| Reloads CALENDAR alarm. More...
__STATIC_INLINE uint32_t | ll_calendar_get_counter (void)
| Read the CALENDAR counter current value. More...
__STATIC_INLINE uint32_t | ll_calendar_get_alarm (void)
| Read the CALENDAR counter alarm value. More...
__STATIC_INLINE uint32_t | ll_calendar_get_wrapcnt (void)
| Get the CALENDAR wrap-around value. More...
__STATIC_INLINE void | ll_calendar_set_clock_div (uint32_t div)
| Select the CALENDAR clock divider. More...
__STATIC_INLINE void | ll_calendar_it_enable_alarm (void)
| Enable calendar alarm interrupt. 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_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_disable()

__STATIC_INLINE void ll_calendar_disable | ( | void |  | ) |

Disable calendar counter.

Register | BitsName
--- | ---
CALENDAR_TIMER_CTL | EN

Return values

  None |

## ◆ ll_calendar_enable()

__STATIC_INLINE void ll_calendar_enable | ( | void |  | ) |

Enable calendar counter.

Register | BitsName
--- | ---
CALENDAR_TIMER_CTL | EN

Return values

  None |

## ◆ ll_calendar_get_alarm()

__STATIC_INLINE uint32_t ll_calendar_get_alarm | ( | void |  | ) |

Read the CALENDAR counter alarm value.

Register | BitsName
--- | ---
AON_PAD_CTL1 | CAL_ALARM
TIMER_VAL | TIMER_VAL_READ

Return values

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

## ◆ ll_calendar_get_counter()

__STATIC_INLINE uint32_t ll_calendar_get_counter | ( | void |  | ) |

Read the CALENDAR counter current value.

Register | BitsName
--- | ---
AON_PAD_CTL1 | CAL_TIMER
TIMER_VAL | TIMER_VAL_READ

Return values

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

## ◆ 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
--- | ---
CALENDAR_TIMER_CTL | WRAP_CNT

Return values

  Value | between Min_Data=0 and Max_Data=0xF

## ◆ ll_calendar_is_enabled()

__STATIC_INLINE uint32_t ll_calendar_is_enabled | ( | void |  | ) |

Check if the CALENDAR peripheral is enabled or disabled.

Register | BitsName
--- | ---
CALENDAR_TIMER_CTL | EN

Return values

  State | of bit (1 or 0).

## ◆ ll_calendar_it_disable_alarm()

__STATIC_INLINE void ll_calendar_it_disable_alarm | ( | void |  | ) |

Disable calendar alarm interrupt.

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

Return values

  None |

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

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

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

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

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

## ◆ ll_calendar_reload_alarm()

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

Reloads CALENDAR alarm.

Register | BitsName
--- | ---
CALENDAR_TIMER_CTL | ALARM_VAL_LOAD
TIMER_VALUE | TIMER_VALUE

Return values

  None |

## ◆ ll_calendar_reload_counter()

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

Reloads CALENDAR counter.

Register | BitsName
--- | ---
CALENDAR_TIMER_CTL | VAL_LOAD
TIMER_VALUE | TIMER_VALUE

Return values

  None |

## ◆ ll_calendar_set_clock_div()

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

Select the CALENDAR clock divider.

Register | BitsName
--- | ---
CALENDAR_TIMER_CTL | CLK_SEL

Parameters

  div | This parameter can be one of the following values: LL_CALENDAR_DIV_NONE LL_CALENDAR_DIV_32 LL_CALENDAR_DIV_64 LL_CALENDAR_DIV_128 LL_CALENDAR_DIV_256 LL_CALENDAR_NO_CLOCK

Return values

  None |