Add watchdog for each thread using Zephyr API

This commit is contained in:
Martin Jäger
2020-05-06 12:53:26 +02:00
parent 1252a1ffa1
commit 2d3594d254
5 changed files with 77 additions and 9 deletions
+21 -7
View File
@@ -13,15 +13,29 @@
* Hardware-specific functions like timers, watchdog, bootloader
*/
/** Initialization of IWDG
*
* @param timeout Timeout in seconds
*/
void init_watchdog(float timeout);
#include <stdint.h>
/** Feeds/kicks the watchdog
/**
* Initialization of IWDG
*/
void feed_the_dog();
void watchdog_init();
/**
* Register watchdog for this thread
*
* @param timeout_ms Timeout in milliseconds
*/
int watchdog_register(uint32_t timeout_ms);
/**
* Must be called after all channels have been registered
*/
void watchdog_start();
/**
* Feed/kick the watchdog for given channel
*/
void watchdog_feed(int channel_id);
/** Timer for system control (main DC/DC or PWM control loop) is started
*