Repo unification

This commit is contained in:
2024-03-12 21:22:26 +02:00
parent 7aa7edba33
commit 02cb3a9c70
152 changed files with 14575 additions and 2038 deletions

View File

@@ -0,0 +1,37 @@
#ifndef FAULTS_H_
#define FAULTS_H_
/*
*/
/**** Includes ****/
#include <stdint.h>
/**** Public definitions ****/
typedef enum {
FAULT_LVL_OK,
FAULT_LVL_WARNING,
FAULT_LVL_FAULT
} fault_lvl_t;
typedef struct {
fault_lvl_t severity;
uint16_t w_time;
uint16_t f_time;
} fault_t;
typedef struct {
uint16_t delay;
uint16_t wtof;
} fault_cfg_t;
/**** Public function declarations ****/
uint8_t fault_process(fault_t* fault, uint8_t w_trig, uint8_t f_trig, fault_cfg_t* cfg);
uint8_t fault_is_active(fault_t* fault);
uint8_t fault_is_warning(fault_t* fault);
void fault_reset(fault_t* fault);
#ifdef TESTING
#endif
#endif /* FAULTS_H_ */