68#define US_TO_RTIMERTICKS(US) ((US) >= 0 ? \
69 (((int32_t)(US) * (RTIMER_ARCH_SECOND) + 500000) / 1000000L) : \
70 ((int32_t)(US) * (RTIMER_ARCH_SECOND) - 500000) / 1000000L)
72#define RTIMERTICKS_TO_US(T) ((T) >= 0 ? \
73 (((int32_t)(T) * 1000000L + ((RTIMER_ARCH_SECOND) / 2)) / (RTIMER_ARCH_SECOND)) : \
74 ((int32_t)(T) * 1000000L - ((RTIMER_ARCH_SECOND) / 2)) / (RTIMER_ARCH_SECOND))
78#define RTIMERTICKS_TO_US_64(T) ((uint32_t)(((uint64_t)(T) * 1000000 + ((RTIMER_ARCH_SECOND) / 2)) / (RTIMER_ARCH_SECOND)))
Header file for the cc2538 General Purpose Timers.
rtimer_clock_t rtimer_arch_next_trigger()
Get the time of the next scheduled rtimer trigger.
rtimer_clock_t rtimer_arch_now(void)
Returns the current real-time clock time.