diff --git a/Include/error.h b/Include/error.h new file mode 100644 --- /dev/null +++ b/Include/error.h @@ -0,0 +1,19 @@ +#ifndef ERROR_H +#define ERROR_H +#include "stm32f0xx_hal.h" + +// Each error message has an enum entry +// If adding errors, remember to define a message for each in error.c +enum error_number +{ + ERR_RS485_PARSE = 0, +}; + + +void error_assert(uint8_t errno); +void error_assert_info(uint8_t errno, char* details); +uint8_t error_check(uint8_t errno); +uint8_t error_occurred(void); +uint8_t error_count(void); + +#endif