[timer] update the RT_TIMER_CTRL_GET_STATE code in rt_timer_control
This commit is contained in:
parent
31714562cc
commit
75063a1b5e
|
@ -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)
|
if(timer->parent.flag & RT_TIMER_FLAG_ACTIVATED)
|
||||||
{
|
{
|
||||||
/*timer is start and run*/
|
/*timer is start and run*/
|
||||||
*(rt_tick_t *)arg = RT_TIMER_FLAG_ACTIVATED;
|
*(rt_uint32_t *)arg = RT_TIMER_FLAG_ACTIVATED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*timer is stop*/
|
/*timer is stop*/
|
||||||
*(rt_tick_t *)arg = RT_TIMER_FLAG_DEACTIVATED;
|
*(rt_uint32_t *)arg = RT_TIMER_FLAG_DEACTIVATED;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue