Improve doxygen comments in code.

This commit is contained in:
2021-10-11 19:45:13 +02:00
parent c82ca7d8f0
commit 6fde4cfd66
9 changed files with 298 additions and 19 deletions

View File

@@ -24,6 +24,12 @@
#include <reflow-controller/safety/safety-memory.h>
#include <helper-macros/helper-macros.h>
/**
* @brief Handler for hard faults.
*
* This hard fault handler will turn of the oven output and go to panic mode.
* @note Depending on the fault condition some of the things done here could fail.
*/
void HardFault_Handler(void)
{
/* This is a non recoverable fault. Stop the oven */
@@ -38,11 +44,26 @@ void HardFault_Handler(void)
}
/* Overwrite default handler. Go to panic mode */
/**
* @brief Default interrupt handler. This will trigger a panic.
* @note This function should never be called during normal operation.
*/
void __int_default_handler(void)
{
panic_mode();
}
/**
* @brief Put the device into panic mode.
*
* This function can be used when a irrecoverable error is encountered.
* The function will:
* - Disable the oven output
* - Set the panic flag in the safety memory
* - Hang and wait for the watchdog to trigger a system reset.
*
* The panic state will be entered after the reset due to the set panic flag in the safety memory
*/
void panic_mode(void)
{
/* This variable is static, because I don't want it to be on the stack */