VZTECH / Mbed 2 deprecated main_src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers wdt.h Source File

wdt.h

Go to the documentation of this file.
00001 /**
00002  * @file wdt.h
00003  * @Synopsis Implementa funcionalidade de watchdog 
00004  * @author Imported from MBED
00005  * @version 1
00006  * @date 2014-11-06
00007  */
00008 #ifndef __WDT_H__
00009 #define __WDT_H__
00010 
00011 #include "EthernetInterface.h"
00012 #include "mbed.h"
00013 #include <stdint.h>
00014 
00015 class Watchdog {
00016 public:
00017     /// Create a Watchdog object
00018     ///
00019     /// example:
00020     /// @code
00021     /// Watchdog wd;    // placed before main
00022     /// @endcode
00023     Watchdog();
00024     
00025     /// Configure the timeout for the Watchdog
00026     ///
00027     /// This configures the Watchdog service and starts it. It must
00028     /// be serviced before the timeout, or the system will be restarted.
00029     ///
00030     /// example:
00031     /// @code
00032     ///     ...
00033     ///     wd.Configure(1.4);  // configure for a 1.4 second timeout
00034     ///     ...
00035     /// @endcode
00036     ///
00037     /// @param timeout in seconds, as a floating point number
00038     /// @returns none
00039     ///
00040     void Configure ( float timeout );
00041     
00042     /// Service the Watchdog so it does not cause a system reset
00043     ///
00044     /// example:
00045     /// @code
00046     ///    wd.Service();
00047     /// @endcode
00048     /// @returns none
00049     void kick ();
00050     
00051     /// WatchdogCausedReset identifies if the cause of the system
00052     /// reset was the Watchdog
00053     ///
00054     /// example:
00055     /// @code
00056     ///    if ( wd.WatchdogCausedReset() ){
00057     /// @endcode
00058     ///
00059     /// @returns true if the Watchdog was the cause of the reset
00060     bool WatchdogCausedReset ();
00061 private:
00062     bool wdreset;
00063 };
00064  
00065 #endif