mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-18 15:43:32 +08:00
[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)
|
||||
{
|
||||
/*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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user