kopia lustrzana https://github.com/OpenRTX/OpenRTX
Temporarily disabling critical sections in STM32 RTC driver due to compilation issues, to be fixed
rodzic
71e41ec869
commit
4cdc51a36b
|
@ -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();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue