xtimer: Move xtimer_spin_until into xtimer_core.c

pr/spi.typo
Joakim Nohlgård 7 years ago
parent e4e1814602
commit da8cd11816

@ -106,14 +106,6 @@ static inline uint32_t xtimer_now(void)
#endif
}
static inline void xtimer_spin_until(uint32_t target) {
#if XTIMER_MASK
target = _xtimer_lltimer_mask(target);
#endif
while (_xtimer_lltimer_now() > target);
while (_xtimer_lltimer_now() < target);
}
static inline void xtimer_spin(uint32_t offset) {
uint32_t start = _xtimer_lltimer_now();
#if XTIMER_MASK

@ -35,6 +35,8 @@ static volatile uint32_t _long_cnt = 0;
volatile uint32_t _xtimer_high_cnt = 0;
#endif
static inline void xtimer_spin_until(uint32_t value);
static xtimer_t *timer_list_head = NULL;
static xtimer_t *overflow_list_head = NULL;
static xtimer_t *long_list_head = NULL;
@ -56,6 +58,14 @@ static inline int _is_set(xtimer_t *timer)
return (timer->target || timer->long_target);
}
static inline void xtimer_spin_until(uint32_t target) {
#if XTIMER_MASK
target = _xtimer_lltimer_mask(target);
#endif
while (_xtimer_lltimer_now() > target);
while (_xtimer_lltimer_now() < target);
}
void xtimer_init(void)
{
/* initialize low-level timer */

Loading…
Cancel
Save