[timer] update the RT_TIMER_CTRL_GET_STATE code in rt_timer_control

This commit is contained in:
armink 2021-11-25 15:31:43 +08:00
parent 31714562cc
commit 75063a1b5e
1 changed files with 2 additions and 2 deletions

View File

@ -560,12 +560,12 @@ rt_err_t rt_timer_control(rt_timer_t timer, int cmd, void *arg)
if(timer->parent.flag & RT_TIMER_FLAG_ACTIVATED)
{
/*timer is start and run*/
*(rt_tick_t *)arg = RT_TIMER_FLAG_ACTIVATED;
*(rt_uint32_t *)arg = RT_TIMER_FLAG_ACTIVATED;
}
else
{
/*timer is stop*/
*(rt_tick_t *)arg = RT_TIMER_FLAG_DEACTIVATED;
*(rt_uint32_t *)arg = RT_TIMER_FLAG_DEACTIVATED;
}
break;