#ifndef _CAN_APP_H_
#define _CAN_APP_H_

typedef enum
{
    SWOUT_READ = 0,
    HWOUT_READ,
    SWIN_READ,
    HWIN_READ,
    PN_READ,
    TIME_READ,
    Finish_READ,
}CAN_MSG_READ_STEP_t;

extern uint8_t PortNumberStep;

void Can_Abort_All(void);
void CAN_QuickTimer_Init(void);
void Can_Write_Fun_APP(void);
void Can_BusOff_Fun(void);

void Can_Set_Buff_260(uint8_t CopyData []);
void Can_Set_Buff_280(uint8_t CopyData []);
void Can_Set_Buff_380(uint8_t CopyData []);
void Can_Set_Buff_385(uint8_t CopyData []);
void Can_Set_Buff_52E(uint8_t CopyData []);
void Can_Set_Buff_69B(uint8_t CopyData []);
void Can_Set_Buff_28A(uint8_t CopyData []);


void Can_Set_Buff_0E1(uint8_t CopyData []);
void Can_Set_Buff_0F6(uint8_t CopyData []);
void Can_Set_Buff_036(uint8_t CopyData []);
void Can_Set_Buff_0B6(uint8_t CopyData []);
void Can_Set_Buff_320(uint8_t CopyData []);
void Can_Set_Buff_152(uint8_t CopyData []);
void Can_Set_Buff_153(uint8_t CopyData []);
void Can_Set_Buff_168(uint8_t CopyData []);
void Can_Set_Buff_128(uint8_t CopyData []);
void Can_Set_Buff_139(uint8_t CopyData []);
void Can_Set_Buff_131(uint8_t CopyData []);
void Can_Set_Buff_24A(uint8_t CopyData []);
void Can_Set_Buff_1A1(uint8_t CopyData []);
void Can_Set_Buff_389(uint8_t CopyData []);
void Can_Set_Buff_135(uint8_t CopyData []);
void Can_Set_Buff_35A(uint8_t CopyData []);
void Can_Set_Buff_341(uint8_t CopyData []);
void Can_Set_Buff_211(uint8_t CopyData []);
void Can_Set_Buff_228(uint8_t CopyData []);
void Can_Set_Buff_431(uint8_t CopyData []);
void Can_Set_Buff_5e0(uint8_t CopyData []);
void Can_Set_Buff_236(uint8_t CopyData []);
void Can_Set_Buff_75F(uint8_t CopyData []);




void    Can_BusOffRecover(void);
uint8_t CrcCheckSum(uint8_t *data, uint8_t len);
void can_submit(void);
void Get_ID_0x794_Msg(void);
extern void UDS_Process_Service(void);
extern void Get_UID_msg(void);
extern void Diagnostic_Init(void);
void change_UDS_DID(void);
void UIDWrite(void);
extern void UIDRead(void);
extern void uidreset(void);
extern void CAN_Service(void);
extern void UDS_Message_Get(void);
extern uint8_t MCU_SWversion_Get(void);
extern uint8_t MCU_HWversion_Get(void);
extern uint8_t tyw_MCU_SWversion_Get(void);
extern uint8_t tyw_MCU_HWversion_Get(void);
extern uint8_t MCU_PartNumbers_Get(void);
extern uint8_t SW_Release_Time_Get(void);
extern uint8_t UDS_DisableFlag;
extern uint8_t UIDcode1[33];
extern uint8_t UIDcode2[33];
extern uint8_t UIDNumber[19];
extern uint8_t change;
extern uint8_t localNum;
extern uint8_t zhenduanstep;
extern uint8_t UIDStep;
extern uint8_t begin714;
extern uint8_t UIDresult;
extern uint8_t writebeing;
extern uint8_t u8get714msg[8];
extern uint8_t UIDdelay;
extern uint8_t SWINtestresult;
extern uint8_t SWtestresult;
extern uint8_t HWtestresult;
extern uint8_t resettime;

extern uint8_t SWOUTENable;
extern uint8_t HWOUTENable;
extern uint8_t SWINENable;
extern uint8_t HWINENable;
extern uint8_t PNENable;
extern uint8_t TIMEable;
#endif
