Modified version of the Watchdog library with improved support for STM32

Dependents:   LightSaber iot_water_monitor_v2

Fork of Watchdog by David Smart

Revision:
9:84f7c088c261
Parent:
6:e0f547e22dd5
--- a/Watchdog.h	Tue Oct 27 17:04:16 2015 +0000
+++ b/Watchdog.h	Wed Nov 11 16:05:42 2015 +0000
@@ -102,6 +102,17 @@
     bool WatchdogCausedReset();
 private:
     bool wdreset;
+    
+    #if defined( TARGET_STM )
+    /// Logarithm in base 2
+    ///
+    /// This function is needed for the STM32 platforms to compute the prescaler
+    /// value for the watchdog timer
+    ///
+    /// @param[in] the input value as an unsigned integer (i.e. always positive)
+    /// @returns the computed log2
+    int log2(unsigned v);
+    #endif
 };
 
 #endif // WATCHDOG_H
\ No newline at end of file