添加通用的异常判断算法
This commit is contained in:
41
source/elec_det/elec_judge.h
Normal file
41
source/elec_det/elec_judge.h
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
#ifndef elec_judge_h__
|
||||
#define elec_judge_h__
|
||||
|
||||
#include "dev_flash.h"
|
||||
|
||||
|
||||
// 定义错误列表长度
|
||||
#define ERR_LIST_LEN 10
|
||||
|
||||
|
||||
|
||||
struct _elec_judge_def;
|
||||
typedef void (*elec_judge_fun)(struct _elec_judge_def *e,int index,uint8_t *data);
|
||||
|
||||
typedef struct _elec_judge_def{
|
||||
const scheme_def *scheme;
|
||||
uint8_t judge_fun_num;
|
||||
uint8_t judge_flag[8];
|
||||
uint8_t *exe_flag;
|
||||
uint8_t err_list[ERR_LIST_LEN];
|
||||
uint16_t short_circuited;
|
||||
uint16_t open_circuited;
|
||||
const elec_judge_fun *judge_fun_table;
|
||||
}elec_judge_def;
|
||||
|
||||
|
||||
|
||||
|
||||
void elec_judge(elec_judge_def *e,int task_num,uint8_t *exe_flag,uint8_t *data);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user