仓库迁移
This commit is contained in:
		
							
								
								
									
										21
									
								
								source/dev/dev_watchdog.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								source/dev/dev_watchdog.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
|  | ||||
| #include "stm32f4xx.h" | ||||
| #include "board.h" | ||||
|  | ||||
|  | ||||
|  | ||||
| // 开始watch dog | ||||
| void wdog_start(void) | ||||
| { | ||||
|   IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable); | ||||
|   IWDG_SetPrescaler(IWDG_Prescaler_32); | ||||
|   IWDG_Enable(); | ||||
| } | ||||
|  | ||||
| // 更新看门狗 | ||||
| void wdog_refresh(void) | ||||
| { | ||||
|   IWDG_ReloadCounter(); | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 andy
					andy