Guido Ottaviani / Mbed 2 deprecated LeonardoMbos

Dependencies:   mbos Watchdog TextLCD mbed ConfigFile

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Task9Wdt.cpp Source File

Task9Wdt.cpp

00001 #include "Task9Wdt.h"
00002 
00003 void WdtTask(void)
00004 {/**
00005  *\brief TASK 9 Watch Dog 
00006         this is a very high priority task. Non other task can
00007         block this one. So, the WDT occurs only if a real OS
00008         hang happens.
00009  */
00010  
00011  os.SetTimer(WDT_TMR, WDT_TIMER, WDT_TIMER); // Kick the dog
00012 
00013  while (1)
00014  {
00015     os.WaitEvent(WDT_EVT);     
00016     wd.Service();       // kick the dog before the timeout
00017  }
00018 }