/*
 * @Author       : ChenJie
 * @Date         : 2021-12-15 10:42:35
 * @Version      : V3.0
 * @LastEditors  : ChenJie
 * @LastEditTime : 2022-05-17 19:25:55
 * @Description  :  AppFuncion.h
 * @FilePath     : \undefinedd:\1_WorkFiles\2_Software\10_ReplaceBatteryControl\ECTEK_ToolChain\VehicleControl\VehicleControl\src\System\Vehicle\AppFunc.h
 */
/*
 * AppFuncion.h
 *
 *  Created on: 2021Äê12ÔÂ15ÈÕ
 *      Author: QiXiang_CHENJIE
 */

#ifndef SYSTEM_VEHICLE_APPFUNCION_H_
#define SYSTEM_VEHICLE_APPFUNCION_H_
#include "CanVar.h"
void GetHVLockState(void);
void GetDIOState(void);
void GetAIOValue(void);
void LockAndUnlockCtrl();
uint16 Look1_u32u8(uint32 u0, uint32 *bp0, uint8 *table, uint16 MaxLen);
void FaultDiagnosisFunc(void);
BOOL JudgeTimeSystem(BOOL Enable, BOOL Input, UINT16 *N, UINT16 Thr);
BOOL DiagThrSystem1(BOOL Enable, BOOL precondition, UINT16 Input, UINT16 fltThr, UINT16 recThr, UINT16 fltNumThr, UINT16 recNumThr, UINT16 *fltNum, UINT16 *recNum, UINT8 *fitFlg);
UINT16 GetErrorNum(UINT16 *ErrorArray, UINT8 Errorlen);
UINT8 PutErrorNum(UINT16 *ErrorArray, UINT8 Errorlen, UINT16 ErrorNum);
#ifdef _APP_TEST_CODE
void TestDeviceFun(void);
#endif
#ifdef _APP_TEST_MOTOR_CODE
void MotorControlFunc(UINT8 MotorIdx, UINT8 RotateDirec);
#endif
#endif /* SYSTEM_VEHICLE_APPFUNCION_H_ */
