/* Waits until last write operation on RTC registers has finished.  */
void RTC_WaitForLastTask(void)
/* Waits until last write operation on RTC registers has finished.  */
void RTC_WaitForLastTask(void)
{
    while ((RTC->CRL & RTC_FLAG_RTOFF) == (uint16_t)RESET)
    {
    }
}