60 #ifndef RTIMER_ARCH_H_
61 #define RTIMER_ARCH_H_
66 #define RTIMER_ARCH_SECOND 32768
70 #define US_TO_RTIMERTICKS(US) ((US) >= 0 ? \
71 (((int32_t)(US) * (RTIMER_ARCH_SECOND) + 500000) / 1000000L) : \
72 ((int32_t)(US) * (RTIMER_ARCH_SECOND) - 500000) / 1000000L)
74 #define RTIMERTICKS_TO_US(T) ((T) >= 0 ? \
75 (((int32_t)(T) * 1000000L + ((RTIMER_ARCH_SECOND) / 2)) / (RTIMER_ARCH_SECOND)) : \
76 ((int32_t)(T) * 1000000L - ((RTIMER_ARCH_SECOND) / 2)) / (RTIMER_ARCH_SECOND))
80 #define RTIMERTICKS_TO_US_64(T) ((uint32_t)(((uint64_t)(T) * 1000000 + ((RTIMER_ARCH_SECOND) / 2)) / (RTIMER_ARCH_SECOND)))
rtimer_clock_t rtimer_arch_now(void)
Returns the current real-time clock time.
Header file for the cc2538 General Purpose Timers.
rtimer_clock_t rtimer_arch_next_trigger(void)
Get the time of the next scheduled rtimer trigger.