Add structure for safety controller config.

This commit is contained in:
2020-07-07 19:26:00 +02:00
parent 248707055e
commit 06a75559f0
6 changed files with 190 additions and 1 deletions

View File

@@ -18,9 +18,37 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @addtogroup safety-controller
* @{
*/
#ifndef __SAFETY_CONTROLLER_H__
#define __SAFETY_CONTROLLER_H__
#include <reflow-controller/safety/safety-controller-config-default.h>
/**
* @brief Initialize the safety controller
*
* After a call to this function the controller is iniotlaized and the watchdog is set up.
* You have to call safety_controller_handle
* If this function fails, it will hang, because errors in the safety controller are not recoverable
*/
void safety_controller_init();
/**
* @brief Handle the safety controller.
* @note This function must be executed periodically in order to prevent the watchdog from resetting the firmware
* @return 0 if successful
*/
int safety_controller_handle();
int safety_controller_report_error();
#endif /* __SAFETY_CONTROLLER_H__ */
/** @} */