Point Labs / STM_ResetSupervisor

Dependents:   Example_WatchDog_Timer

Revision:
2:72d1cb8fc13c
Parent:
1:4e2e6a9dc079
Child:
3:b7a9432fe880
--- a/ResetSupervisor.cpp	Thu Oct 03 19:47:05 2019 +0000
+++ b/ResetSupervisor.cpp	Fri Oct 04 14:50:29 2019 +0000
@@ -46,7 +46,7 @@
 }
 
 /// Load timeout value in watchdog timer and enable
-void Supervisor::Configure(float timeout) {
+void Supervisor::initWD(float timeout) {
        
     #define LsiFreq (45000)
     uint16_t PrescalerCode;
@@ -95,21 +95,16 @@
     IWDG->KR = 0xAAAA;    //Reload IWDG      
     IWDG->KR = 0xCCCC;    //Start IWDG - See more at: http://embedded-lab.com/blog/?p=9662#sthash.6VNxVSn0.dpuf       
  
-    Update();
+    pingWD();
 }
 
-/// "Update", "kick" or "feed" the dog - reset the watchdog timer
+/// "Ping", "kick" or "feed" the dog - reset the watchdog timer
 /// by writing this required bit pattern
-void Supervisor::Update() { 
+void Supervisor::pingWD() { 
     IWDG->KR = 0xAAAA;         //Reload IWDG - See more at: http://embedded-lab.com/blog/?p=9662#sthash.6VNxVSn0.dpuf
 }
 
-/// get the flag to indicate if the watchdog causes the reset
-bool Supervisor::WatchdogReset() {
-    return rstRsn == RCC_FLAG_WWDGRST;
-}
-
-uint8_t Supervisor::ResetReason(){
+uint8_t Supervisor::resetReason(){
     return rstRsn;
 }