mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-29 10:30:24 +00:00
[stm32][l4] add tim7 support | 设备框架以及驱动错误码处理逻辑存在问题 (#5901)
This commit is contained in:
committed by
GitHub
parent
96dd783f37
commit
0d2b96d7cc
@@ -8,10 +8,13 @@
|
||||
* 2015-08-31 heyuanjie87 first version
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
#include <rthw.h>
|
||||
|
||||
#define DBG_TAG "hwtimer"
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
rt_inline rt_uint32_t timeout_calc(rt_hwtimer_t *timer, rt_hwtimerval_t *tv)
|
||||
{
|
||||
float overflow;
|
||||
@@ -234,7 +237,8 @@ static rt_err_t rt_hwtimer_control(struct rt_device *dev, int cmd, void *args)
|
||||
f = (rt_uint32_t*)args;
|
||||
if ((*f > timer->info->maxfreq) || (*f < timer->info->minfreq))
|
||||
{
|
||||
result = -RT_ERROR;
|
||||
LOG_W("frequency setting out of range! It will maintain at %d Hz", timer->freq);
|
||||
result = -RT_EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user