mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 06:23:53 +01:00
Merge pull request #4894 from malosek/malo-xtimer-fixes
xtimer: Malo xtimer fixes
This commit is contained in:
commit
aeed55a334
@ -179,7 +179,7 @@ int _xtimer_set_absolute(xtimer_t *timer, uint32_t target)
|
||||
}
|
||||
|
||||
unsigned state = disableIRQ();
|
||||
if ( !_this_high_period(target) ) {
|
||||
if ( (timer->long_target > _long_cnt) || !_this_high_period(target) ) {
|
||||
DEBUG("xtimer_set_absolute(): the timer doesn't fit into the low-level timer's mask.\n");
|
||||
_add_timer_to_long_list(&long_list_head, timer);
|
||||
}
|
||||
@ -217,8 +217,8 @@ static void _add_timer_to_list(xtimer_t **list_head, xtimer_t *timer)
|
||||
static void _add_timer_to_long_list(xtimer_t **list_head, xtimer_t *timer)
|
||||
{
|
||||
while (*list_head
|
||||
&& (*list_head)->long_target <= timer->long_target
|
||||
&& (*list_head)->target <= timer->target) {
|
||||
&& (((*list_head)->long_target < timer->long_target)
|
||||
|| (((*list_head)->long_target == timer->long_target) && ((*list_head)->target <= timer->target)))) {
|
||||
list_head = &((*list_head)->next);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user