
#ifndef SRC_SAFETY_H_
#define SRC_SAFETY_H_

#define STATUS3_NO_FAULT			0
#define STATUS3_PPS1_SS_GND			1
#define STATUS3_PPS1_SS_VREF		2
#define STATUS3_PPS2_SS_GND			3
#define STATUS3_PPS2_SS_VREF		4
#define STATUS3_PPS_DELTA			5
#define STATUS3_TPS1_SS_GND			6
#define STATUS3_TPS1_SS_VREF		7
#define STATUS3_TPS2_SS_GND			8
#define STATUS3_TPS2_SS_VREF		9
#define STATUS3_TPS_DELTA			10
#define STATUS3_TARGET1_FAULT		11
#define STATUS3_TARGET2_FAULT		12

void Flash_Write_Protect(void);
void Flash_Write_Unprotect(void);
void Watch_Dog_Update(void);
void Watch_Dog_Init(void);
void Check_Adc_Range(void);
void Check_Safety_Limits(void);
void Check_TPS_Target();
void Safety_TPS_Safety_Timer_Start(void);
void Safety_TPS_Safety_Timer(void);

extern volatile int dbw_target_tmr1, dbw_target_tmr2;

#endif
