1
0
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:
Francisco Molina 2022-01-18 16:39:04 +01:00
parent 728aefa541
commit 8c8ab47806

View File

@ -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 */