WDT.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * WDT.h
8  *
9  * Created on: 06 ���. 2015 �.
10  * Author: Anakod
11  *
12  ****/
13 
21 #pragma once
22 
23 #include <user_config.h>
24 #include "System.h"
25 
31 class WDTClass : protected ISystemReadyHandler
32 {
33 public:
37  void enable(bool enableWatchDog);
38 
43  void alive();
44 
45 protected:
46  void onSystemReady() override;
47 
48  void internalApplyEnabled();
49 
50 private:
51  bool enabled = true;
52 };
53 
60 extern WDTClass WDT;
61 
void onSystemReady() override
Handle system ready events.
void enable(bool enableWatchDog)
Enable or disable watchdog timer.
WDTClass WDT
Global instance of watchdog timer object.
void alive()
Keep watchdog timer alive.
void internalApplyEnabled()
Definition: WDT.h:31
Interface class implented by classes to support on-ready callback.
Definition: System.h:55