소스 검색

Merge pull request #1497 from arthur-jx/master

[bsp] [stm32f10x]  fix watchdog control set timeout argument bug.
Bernard Xiong 7 년 전
부모
커밋
7d6b7dc3f0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      bsp/stm32f10x/drivers/stm32f1_wdg.c

+ 1 - 1
bsp/stm32f10x/drivers/stm32f1_wdg.c

@@ -27,7 +27,7 @@ static rt_err_t stm32f1_wdg_control(rt_watchdog_t *wdt, int cmd, void *arg)
      switch(cmd)
      {
      case RT_DEVICE_CTRL_WDT_SET_TIMEOUT:
-          timeout_ms = (rt_uint32_t) arg;
+          timeout_ms = *((rt_uint32_t*) arg);
           IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);
           if(timeout_ms >= 13107)
           {