This commit is contained in:
hamza
2024-07-07 21:16:36 +03:00
parent 5a84a349d9
commit b5410639eb
9 changed files with 34 additions and 22 deletions

View File

@ -12,7 +12,7 @@
#define ERROR_TIME_THRESH 150 // ms
typedef enum {
typedef enum : uint16_t {
SEK_OVERTEMP = 0x0,
SEK_UNDERTEMP = 0x1,
SEK_OVERVOLT = 0x2,
@ -27,7 +27,7 @@ typedef enum {
} SlaveErrorKind;
typedef struct {
int error_sources;
uint16_t error_sources;
SlaveErrorKind data_kind;
uint8_t data[4];
uint32_t errors_since;
@ -35,7 +35,7 @@ typedef struct {
extern SlaveErrorData error_data;
void set_error_source(int source);
void clear_error_source(int source);
void set_error_source(SlaveErrorKind source);
void clear_error_source(SlaveErrorKind source);
#endif // INC_ERRORS_H