diff options
| author | Yonggang Luo <[email protected]> | 2025-09-22 01:04:46 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-09-24 18:12:36 +0800 |
| commit | 66b2bcc080b39750cc69a2f00f0d951f94967712 (patch) | |
| tree | 8b93349cd771af71a55bfce5b0afe87cf296e2cf /components/drivers | |
| parent | 5bba332e23c6d5e859b4fe00cc5aea5ea6e26a73 (diff) | |
RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead int/rt_int32_t
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/ipc/completion_mp.c | 3 | ||||
| -rw-r--r-- | components/drivers/ipc/completion_up.c | 3 | ||||
| -rw-r--r-- | components/drivers/ipc/dataqueue.c | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/components/drivers/ipc/completion_mp.c b/components/drivers/ipc/completion_mp.c index 38ffc6f3fd..3c9c65d58b 100644 --- a/components/drivers/ipc/completion_mp.c +++ b/components/drivers/ipc/completion_mp.c @@ -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)); } diff --git a/components/drivers/ipc/completion_up.c b/components/drivers/ipc/completion_up.c index 8c3bbbffa1..ce11bd00af 100644 --- a/components/drivers/ipc/completion_up.c +++ b/components/drivers/ipc/completion_up.c @@ -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 */ diff --git a/components/drivers/ipc/dataqueue.c b/components/drivers/ipc/dataqueue.c index 337c5114bf..f1ee2bd576 100644 --- a/components/drivers/ipc/dataqueue.c +++ b/components/drivers/ipc/dataqueue.c @@ -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)); } |
