mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/sam3/periph_rtt: fix rtt_get_alarm()
Previously, the return value was off by one.
This commit is contained in:
parent
49a5bfb9e5
commit
d816666d84
@ -75,7 +75,8 @@ void rtt_set_alarm(uint32_t alarm, rtt_cb_t cb, void *arg)
|
||||
uint32_t rtt_get_alarm(void)
|
||||
{
|
||||
if (RTT->RTT_MR & RTT_MR_ALMIEN) {
|
||||
return RTT->RTT_AR;
|
||||
/* the alarm value is RTT_AR + 1, see rtt_set_alarm() */
|
||||
return RTT->RTT_AR + 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user