Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Revision:
81:3656f00ab3db
Parent:
33:735fd60e96d8
Child:
121:ee02790d00b7
--- a/wdt.cpp	Tue Dec 16 19:34:30 2014 +0000
+++ b/wdt.cpp	Tue Dec 30 12:37:40 2014 +0000
@@ -11,10 +11,9 @@
 void Watchdog::Configure(float s) {
     //LPC_WDT->CLKSEL = 0x1;                // Set CLK src to PCLK
     uint32_t clk = 500000 / 4;    // WD has a fixed /4 prescaler, and a 500khz oscillator
-    LPC_WDT->TC = (uint32_t)(s * (float)clk);
+    LPC_WDT->TC = ( uint32_t )( s * ( float )clk );
     LPC_WDT->MOD = 0x3;                   // Enabled and Reset
-//    kick();
-//    debug_msg("");
+    kick();
 }
  
 /// "Service", "kick" or "feed" the dog - reset the watchdog timer
@@ -35,4 +34,8 @@
     
     //__enable_irq();
     //debug_msg(".");
+}
+
+bool Watchdog::WatchdogCausedReset(){
+    return( this->wdreset );
 }
\ No newline at end of file