x

Dependents:   20180621_FT813 STM32_180SENSOR_ADC4_RS_Ver2_CommCLD

WDT.h

Committer:
JackB
Date:
2018-07-23
Revision:
0:aae68a400cf2

File content as of revision 0:aae68a400cf2:

#ifndef __WDT__H_
#define __WDT__H_

// https://developer.mbed.org/users/nbremond/code/Watchdog/docs/tip/Watchdog_8cpp_source.html
#include "mbed.h"

#define     KR_KEY_RELOAD_VAL   ((uint16_t)0xAAAA)
#define     KR_KEY_ENABLE_VAL   ((uint16_t)0xCCCC)
#define     KR_REG_ACCESS_VAL   ((uint16_t)0x5555)

#define ST_NUCLEO

class WDT {
public:

//    Watchdog() {
//        wdreset = false; 
//    }

// Load timeout value in watchdog timer and enable
    void Configure(float timeout);

// "kick" or "feed" the dog - reset the watchdog timer
// by writing this required bit pattern
    void Service();
    
//    bool WatchdogCausedReset();
 
};

#endif