Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Watchdog by
Diff: Watchdog.cpp
- 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
