1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/stm32/f1/rtt: don't trigger callbacks if unset

This commit is contained in:
Francisco Molina 2020-08-18 13:42:51 +02:00
parent 0d60b3370a
commit 14d4d2aacb
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8

View File

@ -192,11 +192,15 @@ void RTT_ISR(void)
{
if (RTT_DEV->CRL & RTC_CRL_ALRF) {
RTT_DEV->CRL &= ~(RTC_CRL_ALRF);
alarm_cb(alarm_arg);
if (alarm_cb) {
alarm_cb(alarm_arg);
}
}
if (RTT_DEV->CRL & RTC_CRL_OWF) {
RTT_DEV->CRL &= ~(RTC_CRL_OWF);
overflow_cb(overflow_arg);
if (overflow_cb) {
overflow_cb(overflow_arg);
}
}
cortexm_isr_end();
}