26 lines
570 B
C
Raw Normal View History

#ifndef _DTC_H_
#define _DTC_H_
#include <Arduino.h>
2023-09-27 19:13:54 +02:00
#include "dtc_defs.h"
2022-03-09 23:05:17 +01:00
#define MAX_DTC_STORAGE 6
2023-09-27 19:13:54 +02:00
typedef struct
{
2023-09-27 19:13:54 +02:00
DTCNum_t Number;
uint32_t timestamp;
DTCActive_t active;
uint32_t debugVal;
} DTCEntry_t;
2023-09-27 19:13:54 +02:00
void MaintainDTC(DTCNum_t DTC_no, boolean active, uint32_t DebugValue = 0);
void ClearDTC(DTCNum_t DTC_no);
void ClearAllDTC();
2023-09-27 19:13:54 +02:00
DTCNum_t getlastDTC(boolean only_active);
DTCNum_t ActiveDTCseverity(DTCSeverity_t severity);
DTCSeverity_t getSeverityForDTC(DTCNum_t targetCode);
2023-02-24 19:24:26 +01:00
void DTC_Process();
2023-09-27 19:13:54 +02:00
extern DTCEntry_t DTCStorage[MAX_DTC_STORAGE];
#endif