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:
parent
0d60b3370a
commit
14d4d2aacb
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user