Skip to content

Commit 986f0f4

Browse files
committed
Merge remote-tracking branch 'origin/master' into ci-format
2 parents b23b481 + a84e755 commit 986f0f4

File tree

23 files changed

+131
-42
lines changed

23 files changed

+131
-42
lines changed

bsp/allwinner/libraries/sunxi-hal/hal/source/sdmmc/osal/os/RT-Thread/os_timer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ OS_Status OS_TimerStart(OS_Timer_t *timer)
128128
OS_Status OS_TimerChangePeriod(OS_Timer_t *timer, OS_Time_t periodMS)
129129
{
130130
rt_err_t ret;
131+
rt_tick_t period_tick = rt_tick_from_millisecond(periodMS);
131132

132133
OS_DBG("%s(), handle %p\n", __func__, timer->handle);
133134
OS_HANDLE_ASSERT(OS_TimerIsValid(timer), timer->handle);
@@ -139,7 +140,7 @@ OS_Status OS_TimerChangePeriod(OS_Timer_t *timer, OS_Time_t periodMS)
139140
return OS_FAIL;
140141
}
141142
}
142-
ret = rt_timer_control(timer->handle, RT_TIMER_CTRL_SET_TIME, &periodMS);
143+
ret = rt_timer_control(timer->handle, RT_TIMER_CTRL_SET_TIME, &period_tick);
143144
if (ret != RT_EOK) {
144145
OS_ERR("err %"OS_BASETYPE_F"\n", ret);
145146
return OS_FAIL;

bsp/allwinner/libraries/sunxi-hal/hal/source/usb/host/ehci-timer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ static unsigned long event_delays_ns[] = {
9797
static void ehci_enable_event(struct ehci_hcd *ehci, unsigned event,
9898
bool resched)
9999
{
100-
unsigned long *timeout = &ehci->hr_timeouts[event];
101-
unsigned long time_interval = 0;
100+
rt_tick_t *timeout = &ehci->hr_timeouts[event];
101+
rt_tick_t time_interval = 0;
102102

103103
if (resched)
104104
{

bsp/allwinner/libraries/sunxi-hal/hal/source/usb/host/ehci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ struct ehci_hcd { /* one per controller */
119119
/* timing support */
120120
enum ehci_hrtimer_event next_hrtimer_event;
121121
unsigned enabled_hrtimer_events;
122-
unsigned long hr_timeouts[EHCI_HRTIMER_NUM_EVENTS];
122+
rt_tick_t hr_timeouts[EHCI_HRTIMER_NUM_EVENTS];
123123
osal_timer_t hrtimer;
124124

125125
int PSS_poll_count;

bsp/at91/at91sam9260/drivers/at91_mci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ static void at91_mci_process_next(struct at91_mci *mci)
430430
*/
431431
static void at91_mci_request(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req)
432432
{
433-
rt_uint32_t timeout = RT_TICK_PER_SECOND;
433+
rt_tick_t timeout = RT_TICK_PER_SECOND;
434434
struct at91_mci *mci = host->private_data;
435435
mci->req = req;
436436
mci->current_status = REQ_ST_INIT;

bsp/at91/at91sam9g45/drivers/at91_mci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ static void at91_mci_process_next(struct at91_mci *mci)
430430
*/
431431
static void at91_mci_request(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req)
432432
{
433-
rt_uint32_t timeout = RT_TICK_PER_SECOND;
433+
rt_tick_t timeout = RT_TICK_PER_SECOND;
434434
struct at91_mci *mci = host->private_data;
435435
mci->req = req;
436436
mci->current_status = REQ_ST_INIT;

components/drivers/ipc/completion_mp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,11 @@ static rt_err_t _comp_susp_thread(struct rt_completion *completion,
242242
/* start timer */
243243
if (timeout > 0)
244244
{
245+
rt_tick_t timeout_tick = timeout;
245246
/* reset the timeout of thread timer and start it */
246247
rt_timer_control(&(thread->thread_timer),
247248
RT_TIMER_CTRL_SET_TIME,
248-
&timeout);
249+
&timeout_tick);
249250
rt_timer_start(&(thread->thread_timer));
250251
}
251252

components/drivers/ipc/completion_up.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ rt_err_t rt_completion_wait_flags(struct rt_completion *completion,
108108
/* start timer */
109109
if (timeout > 0)
110110
{
111+
rt_tick_t timeout_tick = timeout;
111112
/* reset the timeout of thread timer and start it */
112113
rt_timer_control(&(thread->thread_timer),
113114
RT_TIMER_CTRL_SET_TIME,
114-
&timeout);
115+
&timeout_tick);
115116
rt_timer_start(&(thread->thread_timer));
116117
}
117118
/* enable interrupt */

components/drivers/ipc/condvar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static int _waitq_inqueue(rt_wqueue_t *queue, struct rt_wqueue_node *node,
4747
if (ret == RT_EOK)
4848
{
4949
rt_wqueue_add(queue, node);
50-
if (timeout != RT_WAITING_FOREVER)
50+
if (timeout != (rt_tick_t)RT_WAITING_FOREVER)
5151
{
5252
rt_timer_control(timer, RT_TIMER_CTRL_SET_TIME, &timeout);
5353

components/drivers/ipc/dataqueue.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,11 @@ rt_err_t rt_data_queue_push(struct rt_data_queue *queue,
129129
/* start timer */
130130
if (timeout > 0)
131131
{
132+
rt_tick_t timeout_tick = timeout;
132133
/* reset the timeout of thread timer and start it */
133134
rt_timer_control(&(thread->thread_timer),
134135
RT_TIMER_CTRL_SET_TIME,
135-
&timeout);
136+
&timeout_tick);
136137
rt_timer_start(&(thread->thread_timer));
137138
}
138139

@@ -247,10 +248,11 @@ rt_err_t rt_data_queue_pop(struct rt_data_queue *queue,
247248
/* start timer */
248249
if (timeout > 0)
249250
{
251+
rt_tick_t timeout_tick = timeout;
250252
/* reset the timeout of thread timer and start it */
251253
rt_timer_control(&(thread->thread_timer),
252254
RT_TIMER_CTRL_SET_TIME,
253-
&timeout);
255+
&timeout_tick);
254256
rt_timer_start(&(thread->thread_timer));
255257
}
256258

components/drivers/ipc/waitqueue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ void rt_wqueue_wakeup_all(rt_wqueue_t *queue, void *key)
198198
*/
199199
static int _rt_wqueue_wait(rt_wqueue_t *queue, int condition, int msec, int suspend_flag)
200200
{
201-
int tick;
201+
rt_tick_t tick;
202202
rt_thread_t tid = rt_thread_self();
203203
rt_timer_t tmr = &(tid->thread_timer);
204204
struct rt_wqueue_node __wait;
@@ -241,7 +241,7 @@ static int _rt_wqueue_wait(rt_wqueue_t *queue, int condition, int msec, int susp
241241
rt_list_insert_before(&(queue->waiting_list), &(__wait.list));
242242

243243
/* start timer */
244-
if (tick != RT_WAITING_FOREVER)
244+
if (tick != (rt_tick_t)RT_WAITING_FOREVER)
245245
{
246246
rt_timer_control(tmr,
247247
RT_TIMER_CTRL_SET_TIME,

0 commit comments

Comments
 (0)