Temporarily disabling critical sections in STM32 RTC driver due to compilation issues, to be fixed

replace/5c3e4e8efa04923243bd85df341df79084aecce4
Silvano Seva 2020-10-31 09:18:47 +01:00 zatwierdzone przez Niccolò Izzo
rodzic 71e41ec869
commit 4cdc51a36b
1 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -67,13 +67,13 @@ void rtc_setTime(curTime_t t)
time &= RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU;
/* Enter initialisation mode and update registers */
CPU_CRITICAL_ENTER();
// CPU_CRITICAL_ENTER();
RTC->ISR |= RTC_ISR_INIT;
while((RTC->ISR & RTC_ISR_INITF) == 0) ;
RTC->TR = time;
RTC->DR = date;
RTC->ISR &= ~RTC_ISR_INIT;
CPU_CRITICAL_EXIT();
// CPU_CRITICAL_EXIT();
}
void rtc_setHour(uint8_t hours, uint8_t minutes, uint8_t seconds)
@ -120,17 +120,17 @@ void rtc_dstSet()
{
/* If BKP bit is set, DST has been already set */
if(RTC->CR & RTC_CR_BCK) return;
CPU_CRITICAL_ENTER();
// CPU_CRITICAL_ENTER();
RTC->CR |= RTC_CR_BCK | RTC_CR_ADD1H;
CPU_CRITICAL_EXIT();
// CPU_CRITICAL_EXIT();
}
void rtc_dstClear()
{
/* If BKP bit is cleared, DST has been already removed */
if((RTC->CR & RTC_CR_BCK) == 0) return;
CPU_CRITICAL_ENTER();
// CPU_CRITICAL_ENTER();
RTC->CR &= ~RTC_CR_BCK;
RTC->CR |= RTC_CR_SUB1H;
CPU_CRITICAL_EXIT();
// CPU_CRITICAL_EXIT();
}