[riot-notifications] [RIOT] xtimer: Add support for arbitrary frequency hardware timers (32768 Hz support) (#3990)
Joakim NohlgÄrd
notifications at github.com
Wed Sep 30 12:54:22 CEST 2015
> #if XTIMER_MASK
> value = _mask(value);
> #endif
> - while (_xtimer_now() > value);
> - while (_xtimer_now() < value);
> + while (_xtimer_now_ticks() > value);
> + while (_xtimer_now_ticks() < value);
> +}
> +
> +static inline void xtimer_spin_until(uint32_t value) {
> + value = _xtimer_us_to_ticks(value);
> + _xtimer_spin_until_ticks(value);
> +}
> +
> +static inline void _xtimer_spin_ticks(uint32_t offset) {
> + uint32_t start = _xtimer_now_ticks();
> + while ((_xtimer_now_ticks() - start) < offset);
note to self: `_lltimer_now_ticks`
---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3990/files#r40780945
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150930/3d20b1c2/attachment.html>
More information about the notifications
mailing list