RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead int/rt_int32_t

This commit is contained in:
Yonggang Luo
2025-09-24 18:12:36 +08:00
committed by R b b666
parent 5bba332e23
commit 66b2bcc080
16 changed files with 49 additions and 27 deletions
+2 -1
View File
@@ -242,10 +242,11 @@ static rt_err_t _comp_susp_thread(struct rt_completion *completion,
/* start timer */
if (timeout > 0)
{
rt_tick_t timeout_tick = timeout;
/* reset the timeout of thread timer and start it */
rt_timer_control(&(thread->thread_timer),
RT_TIMER_CTRL_SET_TIME,
&timeout);
&timeout_tick);
rt_timer_start(&(thread->thread_timer));
}
+2 -1
View File
@@ -108,10 +108,11 @@ __try_again:
/* start timer */
if (timeout > 0)
{
rt_tick_t timeout_tick = timeout;
/* reset the timeout of thread timer and start it */
rt_timer_control(&(thread->thread_timer),
RT_TIMER_CTRL_SET_TIME,
&timeout);
&timeout_tick);
rt_timer_start(&(thread->thread_timer));
}
/* enable interrupt */
+4 -2
View File
@@ -129,10 +129,11 @@ rt_err_t rt_data_queue_push(struct rt_data_queue *queue,
/* start timer */
if (timeout > 0)
{
rt_tick_t timeout_tick = timeout;
/* reset the timeout of thread timer and start it */
rt_timer_control(&(thread->thread_timer),
RT_TIMER_CTRL_SET_TIME,
&timeout);
&timeout_tick);
rt_timer_start(&(thread->thread_timer));
}
@@ -247,10 +248,11 @@ rt_err_t rt_data_queue_pop(struct rt_data_queue *queue,
/* start timer */
if (timeout > 0)
{
rt_tick_t timeout_tick = timeout;
/* reset the timeout of thread timer and start it */
rt_timer_control(&(thread->thread_timer),
RT_TIMER_CTRL_SET_TIME,
&timeout);
&timeout_tick);
rt_timer_start(&(thread->thread_timer));
}