Tomonori Kuroki / MuWatchdog

Fork of Watchdog by David Smart

Revision:
25:4eecd15f0c38
Parent:
24:bb99754d8098
Child:
26:f7ccf62c4dd0
--- a/Watchdog.cpp	Tue May 08 20:14:58 2018 +0000
+++ b/Watchdog.cpp	Mon Oct 15 12:10:15 2018 +0000
@@ -284,6 +284,11 @@
 /// get the flag to indicate if the watchdog causes the reset
 bool Watchdog::WatchdogCausedReset()
 {
+#if defined(RCC_CSR_IWDGRSTF)
     return (_rcc_csr & (RCC_CSR_IWDGRSTF | RCC_CSR_WWDGRSTF)) != 0;  // read the IWDGRSTF (Independent WD, not the windows WD)
+#else
+// for old library
+    return (_rcc_csr & (RCC_CSR_WDGRSTF | RCC_CSR_WWDGRSTF)) != 0;  // read the IWDGRSTF (Independent WD, not the windows WD)
+#endif
 }
 #endif