#ifndef __GLOBAL_EXTERN_VAR_H__
#define __GLOBAL_EXTERN_VAR_H__

//���Ʋ���
#define  END_BEGIN        0
#define  END_GOING         1
#define  END_SUCC          2
#define  END_FAIL          3 
#define  END_FINISH        4 
//�Լ첽��
#define  AUTO_BEGIN  0
#define  AUTO_STATIC 1
#define  AUTO_OTHER  2
#define  AUTO_END    9
//��ʻģʽDMS����
#define  DMS_LED_BEGIN     0
#define  DMS_LED_PRESS     1 
#define  DMS_LED_END       2

extern void InitBuf(void);
extern void SetAutolightMode(uint8_t uiModeType);
extern uint8_t g_uiOtherCheckCurStep;
extern uint8_t g_uiStaticCurrentCheckFlag;
extern uint8_t g_SpeedCheckDeriction;
extern uint8_t g_TftCheckDeriction;
extern uint8_t g_uiLedNum;
extern uint8_t g_uiTftNum;
extern uint8_t g_uiAirBagLedCheckFlag;
extern uint8_t g_uiISGLedCheckFlag;
extern uint8_t g_uiIceWarningLedCheckFlag;
extern uint8_t g_uiLowFuelLedCheckFlag;
extern uint8_t g_uiLPI_OnlyCheckFlag;
extern uint8_t g_uiLPI_CheckFlag;
extern uint8_t g_uiHEV_CheckFlag;
extern uint8_t g_uiLPI_OverCheckFlag;
extern uint8_t g_uiDmsLedCheckFlag;
extern uint8_t g_DriveModeFlag;

extern uint8_t  g_uiB_PlusResetWaitFlag;
extern uint32_t g_uiB_PlusResetWaitTimer;

extern uint8_t  g_uiSmartComfortWaitFlag;
extern uint32_t g_uiSmartComfortWaitTimer;
extern uint32_t g_uiLedWaitTimer;
extern uint8_t g_uiCuntDownFlag;

extern uint8_t g_uiOilPressureCheckFlag;
extern unsigned int g_uiProgramType;
extern uint8_t Eol_receive[4];
extern unsigned char g_uiTotleCount;
extern unsigned char g_uiRowNum;
extern unsigned char g_uiColNum;
extern unsigned char g_BackLightNum;
extern uint8_t g_szLedName[16];
extern uint8_t g_szTftName[16];
extern unsigned char g_uiPosUpdateFlag;
extern unsigned char g_uiIdx;
extern uint32_t g_uiStepTimer;
extern uint8_t  g_uiStepTimerEnable;
extern uint8_t g_ElseDmsMaxCheckSteps;
extern uint8_t g_ElseMaxCheckSteps;

extern uint8_t DMS_ECO;
extern uint8_t DMS_SPORT;
extern uint8_t DMS_SPORTPLUS;
extern uint8_t DMS_NORMAL;
extern uint8_t DMS_SMART;
extern uint8_t DMS_Smart_EcoColor;
extern uint8_t DMS_Smart_SportColor;
extern uint8_t DMS_Smart_SmartColor;
extern uint8_t DMS_Snow;
extern uint8_t DMS_Mud;
extern uint8_t DMS_Sand;
    
extern uint8_t SW1_CHECK_RESULT;
extern uint8_t SW2_CHECK_RESULT;

extern uint8_t TestSrcBuf[20];
//extern const unsigned int BackLight_Limit_Down[21];//����ҹ��ı�
//extern const unsigned int BackLight_Limit_UP[21];
extern uint8_t g_uiBufIndex;

extern uint8_t g_SpeedMaxCheckSteps;
extern uint8_t g_EolCfgFuelType;
extern uint32_t CurRpm;
extern uint32_t SendCanMessage20msTimer;
extern uint32_t SendCanMessage100msTimer;
extern uint32_t SendCanMessage10msTimer;
extern uint32_t SendCanMessage50msTimer;
extern uint32_t SendCanMessage200msTimer;
extern uint32_t SendCanMessage250msTimer;
extern uint32_t SendCanMessage500msTimer;
extern uint32_t SendCanMessage1000msTimer;
extern uint32_t SendCanMessage2000msTimer;
extern uint32_t SendCanMessage3000msTimer;
extern uint8_t g_szCheckBenchName[14];
extern uint8_t GetPartNumFinish;
extern uint8_t GetPartNumSent;
extern uint8_t Err_Status;
extern uint8_t Buzz_Play;
extern uint8_t CluPartNum[16];
extern uint8_t CheckClusterValid;
extern uint8_t Button_Value;
extern uint8_t Button_Press;
extern uint8_t TestPartNum[16];
extern uint8_t g_uiUpdateStep;
extern uint8_t BlinkDspTimer;
extern uint8_t InteriorLampTimer;
extern uint8_t CheckBarcode;
extern uint8_t g_CostTimeSecond;
extern uint8_t CAN_0x620;
extern uint8_t CAN_0x1DF;
extern uint8_t CAN_0x1D4;
extern uint8_t CAN_0x1D5;
extern uint8_t CAN_0x4F1;
extern uint8_t CAN_0x391;
extern uint8_t CAN_0x50C;
extern uint8_t CAN_0x5B0;
extern uint8_t CAN_0x52A;
extern uint8_t CAN_0x51B;
extern uint8_t CAN_0x5C2;
extern uint8_t CAN_0x486;
extern uint8_t CAN_0x4A6;
extern uint8_t CAN_0x2FC;
extern uint8_t CAN_0x225;
//extern uint8_t CAN_0xA3;

extern uint8_t AutoStep0Result;
extern uint8_t AutoStep1Result;
extern uint8_t AutoStep2Result;
extern uint8_t AutoStep3Result;
extern uint8_t AutoStep4Result;;
extern uint8_t AutoStep5Result;
extern uint8_t AutoStep6Result;
extern uint8_t AutoStep7Result;
extern uint8_t AutoStep8Result;
extern uint8_t AutoStep9Result;
extern uint8_t AutoStep10Result;
extern uint8_t g_SpeedUpflag;
extern uint8_t g_SpeedDownflag;

extern uint8_t EngineState;
extern uint8_t GearDisp;
extern uint8_t GearCheckResult;

extern uint8_t SW1_CHECK_RESULT;
extern uint8_t SW2_CHECK_RESULT;

extern uint16_t  Eol_Timer;
extern uint32_t MODEtimer;
extern uint32_t Err_Timer;
extern uint8_t  Time_Charge_500ms;
extern  uint16_t Time_Charge_1s_four;
extern  uint16_t Time_Charge_2s_two;
extern  uint16_t Time_Charge_2s_Four;

extern  uint16_t Time_Charge_2s_twoUpEnge;
extern  uint16_t Time_Charge_2s_twoTimer;

extern  uint16_t Time_Charge_3s_twoTimer;
extern  uint16_t Time_Charge_3s_twoUpEnge;
extern uint8_t LED_Flag,Speed_Tester, Freque_Flag;;
extern uint8_t ClearedOdoFlag;

extern volatile uint16_t  BackLight_Value;
extern const uint32_t BackLight_Limit_Down[21];
extern const uint32_t BackLight_Limit_UP[21];

extern uint8_t Time_Charge_1s;
extern uint8_t PowerCheckFlag;
extern uint8_t PowerCheckTimer;
extern uint8_t EOL_Flag;

extern uint8_t Button_Slave_Receive_Flag;
extern uint8_t Button_Value_Slave;
extern uint8_t Button_Slave_Receive_Flag;
extern uint16_t CheckOkTimerCnts;
extern uint32_t Test_AD;

extern uint8_t Buzz_Play;

extern uint16_t Diaplay_test;
extern uint32_t TftTimer;
extern uint8_t MyRecvCount;

extern uint16_t Diaplay_test;
extern uint8_t Read_Flag;

extern uint32_t SendCanMessage10msTimer;

extern uint16_t ThermistorIndex;
extern uint16_t Diaplay_test;
extern uint32_t CANSendCnts;
extern volatile uint8_t  Default_flag;
extern uint8_t SaveState,OldSaveState;

extern volatile uint8_t Time_500ms_Flag; 
extern uint8_t LanguageFlag;

extern uint8_t Err_Status;
extern uint32_t Err_Timer;

extern uint8_t uart_send_count;
extern uint8_t start_uart_timer;
extern uint8_t uart_send_flag;
extern uint8_t g_butto_msg[8];
extern uint8_t AutoStep7_SubStep;
extern uint8_t  g_uiLowLevelTrigerFlag;

extern uint8_t g_OilTempCheckDeriction;
extern uint8_t g_uiRSBRFlag;
extern uint8_t g_UI_Language;
extern uint8_t g_UI_SWHW;
extern uint8_t g_uiFunctionListDspFlag;
extern uint8_t g_uiBackDoorFlag;
extern uint8_t g_uiBCWFlag;
extern uint8_t g_CompileDateTime[32];
extern uint8_t g_TestModeBackDoorFlag;
extern uint32_t g_uiQrQueryTimer;
extern uint8_t g_uiQueryState;
extern uint8_t g_SEAT_BELT_Sound_Check;
extern uint8_t g_SEAT_BELT_Count;
extern uint8_t g_uiSeatBeltSoundTimer;
extern DATA_SAVE_PACK NewData;
extern ST_BACK_LIGHT g_st20Level[];
extern unsigned int VC_List[][2];
enum {
    ST_INIT,
    ST_QUERY,
    ST_SUCC,
    ST_FAIL,
    ST_NCK,
};
extern uint8_t SendCheckResultData[64];
extern uint8_t SendCheckResultLen;    
extern uint8_t g_uiCheckResultSaveFlag;
extern uint8_t g_UartBuffer_TX[64];
extern uint8_t g_UartBuffer_RX[64]; 
extern void Init_Load_data(void);
extern void UpdateTitle(void);
extern void UDS_Backdoor();
#if (SEMI_AUTOMATIC_STAGE)
extern uint8_t g_uiSemiAutomaticStage;
extern uint8_t g_PerFuncExecSecond;
#endif
#endif

