mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/cc2538/rtt: fix rtt_set_counter
This commit is contained in:
parent
728aefa541
commit
8c8ab47806
@ -92,7 +92,7 @@ uint32_t rtt_get_counter(void)
|
||||
void rtt_set_counter(uint32_t counter)
|
||||
{
|
||||
rtt_alarm -= rtt_offset;
|
||||
rtt_offset = _rtt_get_counter() + counter;
|
||||
rtt_offset = _rtt_get_counter() - counter;
|
||||
rtt_alarm += rtt_offset;
|
||||
|
||||
/* re-set the overflow callback */
|
||||
|
Loading…
Reference in New Issue
Block a user