50#include "sl_sleeptimer.h"
52#include "rtimer-arch.h"
54static sl_sleeptimer_timer_handle_t rtimer_timer;
57on_rtimer_timeout(sl_sleeptimer_timer_handle_t *handle,
74 uint32_t now = sl_sleeptimer_get_tick_count();
75 uint32_t timeout = t - now;
80 if(timeout > 0x80000000UL) {
81 timeout -= 0x80000000UL;
84 sl_sleeptimer_start_timer(&rtimer_timer,
86 on_rtimer_timeout, NULL,
94 return sl_sleeptimer_get_tick_count();
void rtimer_arch_init(void)
We don't need to explicitly initialise anything but this routine is required by the API.
rtimer_clock_t rtimer_arch_now()
Returns the current real-time clock time.
void rtimer_arch_schedule(rtimer_clock_t t)
Schedules an rtimer task to be triggered at time t.
void rtimer_run_next(void)
Execute the next real-time task and schedule the next task, if any.