Watchdog controller. More...
#include <Watchdog.h>
Public Member Functions | |
| WatchdogClass (void) | |
| Create WatchdogClass object. More... | |
| void | begin (void) |
| Initialize the Watchdog library. More... | |
| void | end (void) |
| Disable the Watchdog. More... | |
| void | start (uint32_t timeout) |
| Start to check timer for bite watchdog. More... | |
| void | stop (void) |
| Stop to check timer for avoid bite watchdog. More... | |
| void | kick (void) |
| Kick to watchdog for notify keep alive. More... | |
| uint32_t | timeleft (void) |
| Get a remain time for bite watchdog. More... | |
Watchdog controller.
You can reset your application when application freezed by operating WatchdogClass objects instantiated in your application.
| WatchdogClass::WatchdogClass | ( | void | ) |
Create WatchdogClass object.
Application need to take instance for using watchdog.
| void WatchdogClass::begin | ( | void | ) |
Initialize the Watchdog library.
Open the hardware watchdog device file and keep it.
| void WatchdogClass::end | ( | void | ) |
Disable the Watchdog.
Stop the hardware watchdog and close device file for release it.
| void WatchdogClass::start | ( | uint32_t | timeout | ) |
Start to check timer for bite watchdog.
Start to count and check time for bite watchdog. And if it expire timeout value, device will reboot by hardware trigger.
| [in] | timeout | Timeout value in milliseconds for bite a watchdog (1 ~ 40000) |
| void WatchdogClass::stop | ( | void | ) |
Stop to check timer for avoid bite watchdog.
Stop to count and check timer. After call this function, device will not reboot by watchdog.
| void WatchdogClass::kick | ( | void | ) |
Kick to watchdog for notify keep alive.
Kick the dog to avoid bite a watchdog, it mean "Keep alive". If expire a timeout, device will reboot by hardware trigger.
| uint32_t WatchdogClass::timeleft | ( | void | ) |
Get a remain time for bite watchdog.
Get a remain time to expire timeout.