File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ bool Watchdog::start(uint32_t timeout)
48
48
return _running;
49
49
}
50
50
51
+ bool Watchdog::start ()
52
+ {
53
+
54
+ return start (get_max_timeout ());
55
+ }
51
56
52
57
bool Watchdog::stop ()
53
58
{
Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ namespace mbed {
51
51
*/
52
52
class Watchdog : private NonCopyable <Watchdog> {
53
53
public:
54
- static const uint32_t watchdog_timeout = 800 ;
55
54
56
55
/* * As Watchdog might not stop ever, there is just one instance - we use single instance.
57
56
* This ensures we keep Watchdog alive. To operate watchdog, use start/stop methods.
@@ -65,6 +64,16 @@ class Watchdog : private NonCopyable<Watchdog> {
65
64
return instance;
66
65
}
67
66
67
+ /* * Start the watchdog timer with the maximum timeout available on a target
68
+ *
69
+ * Timeout is defined as get_max_timeout()
70
+ *
71
+ * @return status true if the watchdog timer was started
72
+ * successfully. assert if one of the input parameters is out of range for the current platform.
73
+ * false if watchdog timer was not started
74
+ */
75
+ bool start ();
76
+
68
77
/* * Start the watchdog timer
69
78
*
70
79
* @param timeout Watchdog timeout
@@ -73,7 +82,7 @@ class Watchdog : private NonCopyable<Watchdog> {
73
82
* successfully. assert if one of the input parameters is out of range for the current platform.
74
83
* false if watchdog timer was not started
75
84
*/
76
- bool start (uint32_t timeout = watchdog_timeout );
85
+ bool start (uint32_t timeout);
77
86
78
87
/* * Stops the watchdog timer
79
88
*
You can’t perform that action at this time.
0 commit comments