We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c1adeb commit 7d4276eCopy full SHA for 7d4276e
libraries/IWatchdog/src/IWatchdog.cpp
@@ -145,7 +145,11 @@ void IWatchdogClass::reload(void)
145
*/
146
bool IWatchdogClass::isReset(bool clear)
147
{
148
+#ifdef IWDG1
149
+ bool status = LL_RCC_IsActiveFlag_IWDG1RST();
150
+#else
151
bool status = LL_RCC_IsActiveFlag_IWDGRST();
152
+#endif
153
if (status && clear) {
154
clearReset();
155
}
libraries/IWatchdog/src/IWatchdog.h
@@ -3,6 +3,10 @@
3
4
#include "Arduino.h"
5
6
+#if !defined(IWDG) && defined(IWDG1)
7
+#define IWDG IWDG1
8
9
+
10
// Minimal timeout in microseconds
11
#define IWDG_TIMEOUT_MIN ((4*1000000)/LSI_VALUE)
12
// Maximal timeout in microseconds
0 commit comments