30
30
namespace mbed {
31
31
32
32
/* * \addtogroup drivers */
33
- /* * A hardware watchdog timer that will reset the system in the case of system
34
- * failures or malfunctions. If you fail to refresh the Watchdog periodically,
35
- * it will reset the system after a set period of time.
33
+ /* * A hardware watchdog timer that resets the system in the case of system
34
+ * failures or malfunctions. If you fail to refresh the Watchdog timer periodically,
35
+ * it resets the system after a set period of time.
36
36
*
37
- * There is only one instance in the system. Use Watchdog::get_instance to
38
- * obtain a reference.
37
+ * There is only one instance of the Watchdog class in the system, which directly maps to the hardware.
38
+ * Use Watchdog::get_instance to obtain a reference.
39
39
*
40
40
* Watchdog::start initializes a system timer with a time period specified in
41
41
* @a timeout param. This timer counts down and triggers a system reset
42
- * when it wraps. To prevent the system reset, the timer must be continually
43
- * kicked/refreshed by calling Watchdog::kick, which will reset the countdown
44
- * to the user specified reset value.
42
+ * when it wraps. To prevent the system reset, you must periodically kick or refresh
43
+ * the timer by calling Watchdog::kick, which resets the countdown
44
+ * to the initial value.
45
45
*
46
46
* Example:
47
47
* @code
@@ -62,9 +62,6 @@ class Watchdog : private NonCopyable<Watchdog> {
62
62
public:
63
63
64
64
/* * Get a reference to the single Watchdog instance in the system.
65
- *
66
- * There is only one watchdog peripheral and only one Watchdog instance
67
- * to control it.
68
65
*
69
66
* @return A reference to the single Watchdog instance present in the system.
70
67
*/
@@ -82,11 +79,11 @@ class Watchdog : private NonCopyable<Watchdog> {
82
79
*
83
80
* @note The timeout is set to a value returned by Watchdog::get_max_timeout.
84
81
*
85
- * If the Watchdog is already running, this function does nothing.
82
+ * If the Watchdog timer is already running, this function does nothing.
86
83
*
87
- * @return true, if the Watchdog timer was started successfully,
88
- * false, if Watchdog timer was not started or if the Watchdog
89
- * is already running.
84
+ * @return true if the Watchdog timer was started successfully;
85
+ * false if the Watchdog timer was not started or if the Watchdog
86
+ * timer is already running.
90
87
*/
91
88
bool start ();
92
89
@@ -97,20 +94,20 @@ class Watchdog : private NonCopyable<Watchdog> {
97
94
*
98
95
* @param timeout Watchdog timeout in milliseconds.
99
96
*
100
- * @return true, if the Watchdog timer was started successfully,
101
- * false, if Watchdog timer was not started or if the Watchdog
102
- * is already running.
97
+ * @return true if the Watchdog timer was started successfully;
98
+ * false if Watchdog timer was not started or if the Watchdog
99
+ * timer is already running.
103
100
*/
104
101
bool start (uint32_t timeout);
105
102
106
103
/* * Stop the Watchdog timer.
107
104
*
108
- * Calling this function will attempt to disable a running Watchdog
109
- * peripheral if supported by the platform.
105
+ * Calling this function disables a running Watchdog
106
+ * peripheral if the platform supports it .
110
107
*
111
- * @return true, if the Watchdog timer was successfully stopped,
112
- * false, if the Watchdog cannot be disabled on this platform
113
- * or if the Watchdog has not been started.
108
+ * @return true if the Watchdog timer was successfully stopped;
109
+ * false if the Watchdog timer cannot be disabled on this platform
110
+ * or if the Watchdog timer has not been started.
114
111
*/
115
112
bool stop ();
116
113
@@ -129,19 +126,19 @@ class Watchdog : private NonCopyable<Watchdog> {
129
126
*/
130
127
uint32_t get_max_timeout () const ;
131
128
132
- /* * Check if the Watchdog is already running.
129
+ /* * Check if the Watchdog timer is already running.
133
130
*
134
- * @return true, if the Watchdog is running,
135
- * false, otherwise.
131
+ * @return true if the Watchdog timer is running and
132
+ * false otherwise.
136
133
*/
137
134
bool is_running () const ;
138
135
139
136
/* * Refresh the Watchdog timer.
140
137
*
141
138
* Call this function periodically before the Watchdog times out.
142
- * Otherwise, the system is reset .
139
+ * Otherwise, the system resets .
143
140
*
144
- * If the Watchdog is not running, this function does nothing.
141
+ * If the Watchdog timer is not running, this function does nothing.
145
142
*/
146
143
void kick ();
147
144
0 commit comments