Skip to content

Commit b35e0bc

Browse files
Merge branch 'RT-Thread:master' into master
2 parents 14baa72 + fcd0b1e commit b35e0bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bsp/renesas/libraries/HAL_Drivers/drv_hwtimer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ static rt_uint32_t timer_counter_get(rt_hwtimer_t *timer)
115115

116116
tim = (struct ra_hwtimer *)timer->parent.user_data;
117117

118-
timer_info_t info;
119-
if (R_GPT_InfoGet(tim->g_ctrl, &info) != FSP_SUCCESS)
118+
timer_status_t status;
119+
if (R_GPT_StatusGet(tim->g_ctrl, &status) != FSP_SUCCESS)
120120
return -RT_ERROR;
121121

122-
return info.period_counts;
122+
return status.counter;
123123
}
124124

125125
static rt_err_t timer_ctrl(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg)

0 commit comments

Comments
 (0)