added watchdog

This commit is contained in:
2018-02-28 08:17:21 +01:00
parent 7f4c06ae4b
commit 2812f962d9
8 changed files with 112 additions and 1 deletions
+3
View File
@@ -4,6 +4,7 @@
#include "platform.h"
#include "platform/lock_jumper.h"
#include "platform/watchdog.h"
#include "status_led.h"
#include "utils/stacksmon.h"
#include "vfs/vfs_manager.h"
@@ -45,6 +46,8 @@ void TaskMain(void const * argument)
cnt++;
Indicator_Heartbeat();
wd_restart();
}
// if no message and it just timed out, go wait some more...
+3
View File
@@ -3,6 +3,7 @@
//
#include "platform.h"
#include "platform/watchdog.h"
#include "comm/messages.h"
#include "task_msg.h"
@@ -85,7 +86,9 @@ void TaskMsgJob(const void *argument)
#if CDC_LOOPBACK_TEST
TF_WriteImpl(comm, slot.msg.data, slot.msg.len);
#else
wd_suspend();
TF_Accept(comm, slot.msg.data, slot.msg.len);
wd_resume();
#endif
}