diff --git a/a8/xtimer.cc b/a8/xtimer.cc index 547fce3..1aedf90 100644 --- a/a8/xtimer.cc +++ b/a8/xtimer.cc @@ -251,6 +251,11 @@ namespace a8 } } + a8::XParams& GetTimerXParams(xtimer_list* timer) + { + return timer->param; + } + void XTimer::UpdateTimer() { struct xtvec_base *base = base_; diff --git a/a8/xtimer.h b/a8/xtimer.h index 76d08c8..0c92737 100644 --- a/a8/xtimer.h +++ b/a8/xtimer.h @@ -40,6 +40,7 @@ namespace a8 void DeleteTimer(xtimer_list* timer); //通过关联的list_head获取定时器对象 xtimer_list* GetTimerByAttach(list_head* attach_entry); + a8::XParams& GetTimerXParams(xtimer_list* timer); private: void UpdateTimer();