[fix] Fix simulator compilation warnings (#6438)

* [fix] Fix simulator compilation warnings

* Update bsp/simulator/rtconfig_project.h

Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
This commit is contained in:
Tangyuxin
2022-09-20 22:31:11 +08:00
committed by GitHub
parent 746d7a01bd
commit a4829b1c00
22 changed files with 68 additions and 60 deletions

View File

@@ -231,7 +231,7 @@ static rt_err_t rt_hwtimer_control(struct rt_device *dev, int cmd, void *args)
break;
case HWTIMER_CTRL_FREQ_SET:
{
rt_uint32_t *f;
rt_int32_t *f;
if (args == RT_NULL)
{
@@ -239,7 +239,7 @@ static rt_err_t rt_hwtimer_control(struct rt_device *dev, int cmd, void *args)
break;
}
f = (rt_uint32_t*)args;
f = (rt_int32_t*)args;
if ((*f > timer->info->maxfreq) || (*f < timer->info->minfreq))
{
LOG_W("frequency setting out of range! It will maintain at %d Hz", timer->freq);