WatchDog.h 741 B

123456789101112131415161718192021
  1. #ifndef __WATCHDOG_H
  2. #define __WATCHDOG_H
  3. /***********************************************************************************/
  4. #include "includes.h"
  5. #define EXTWATCHDOG_PIN GPIO_Pin_1
  6. #define EXTWATCHDOG_PORT GPIOA
  7. #define EXTWATCHDOG_HIGH (EXTWATCHDOG_PORT->BSRR = EXTWATCHDOG_PIN)
  8. #define EXTWATCHDOG_LOW (EXTWATCHDOG_PORT->BRR = EXTWATCHDOG_PIN)
  9. //#define FEED_EXTWATCHDOG() do{EXTWATCHDOG_HIGH;__nop();__nop();__nop();__nop();EXTWATCHDOG_LOW;}while(0);
  10. #define FEED_EXTWATCHDOG() GPIO_WriteBit(EXTWATCHDOG_PORT,EXTWATCHDOG_PIN, (BitAction) !GPIO_ReadOutputDataBit(EXTWATCHDOG_PORT,EXTWATCHDOG_PIN))
  11. extern void ExtWatchDogInit(void);
  12. #endif
  13. /***********************************************************************************/