static rt_uint32_t rt1052_hwtimer_count_get(rt_hwtimer_t *timer) { rt_uint32_t CurrentTimer_Count; GPT_Type *hwtimer_dev; hwtimer_dev = (GPT_Type *)timer->parent.user_data; RT_ASSERT(timer != RT_NULL); CurrentTimer_Count = GPT_GetCurrentTimerCount(hwtimer_dev); return CurrentTimer_Count; }
/** Read the current counter * * @return The current timer's counter value in ticks */ uint32_t lp_ticker_read(void) { return GPT_GetCurrentTimerCount(GPT2); }