提交 de17adf5 编写于 作者: L LiuJX

[bsp] [stm32f10x] fix watchdog control set timeout argument bug.

上级 24fb0a36
...@@ -27,7 +27,7 @@ static rt_err_t stm32f1_wdg_control(rt_watchdog_t *wdt, int cmd, void *arg) ...@@ -27,7 +27,7 @@ static rt_err_t stm32f1_wdg_control(rt_watchdog_t *wdt, int cmd, void *arg)
switch(cmd) switch(cmd)
{ {
case RT_DEVICE_CTRL_WDT_SET_TIMEOUT: case RT_DEVICE_CTRL_WDT_SET_TIMEOUT:
timeout_ms = (rt_uint32_t) arg; timeout_ms = *((rt_uint32_t*) arg);
IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable); IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
if(timeout_ms >= 13107) if(timeout_ms >= 13107)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册