#define SAVE_VIN_BLOCK 0xa2
#define SAVE_VIN_ADDR 80

#define ODO_PACK_HEAD1 0xaa
#define ODO_PACK_HEAD2 0x55
#define ODO_PACK_TAIL 0xa5

#ifndef BSP_IIC_H_
    #define BSP_IIC_H_
    
    #define         RunErr                      0
    #define         RunComplete                 1
typedef struct {
    uint8_t Head1;
    uint8_t Head2;
    uint16_t Data1;
    uint16_t Data2;
    uint16_t Data3;
    uint16_t Data4;
    uint8_t Tail;
}DATA_SAVE_PACK;

typedef struct {
    uint8_t Head1;
    uint8_t Head2;
    uint8_t VIN[10];
    uint8_t COUNT;
    uint8_t Tail;
}VIN_PACK;


    extern          void                  bsp_SDA_IN(void);
    extern          void                  bsp_SDA_OUT(void);
    extern          unsigned char         bsp_SDA_GetValue(void);
    extern          void                  bsp_SCL_Set(unsigned char data);
    extern          void                  bsp_SDA_Set(unsigned char data);
    extern          void                  ClearDog(void);
    extern          void                  bsp_NOP(void);
    extern          uint8_t               bsp_Save_Check_Service(uint8_t SaveState);
    extern          void                  SavePro(void);
    
    
    
    extern          void                  bsp_IIC_DelayUs(unsigned int time);
    extern          unsigned char         bsp_IIC_WritePage(unsigned char  PhyAdd,unsigned char  MemAdd, unsigned char *Data,unsigned char len);
    extern          unsigned char         bsp_IIC_SequentialRead(unsigned char  PhyAdd,unsigned char  MemAdd, unsigned char *Data,unsigned char len);
    extern          unsigned char         bsp_IIC_RandomReadByte(unsigned char  PhyAdd,unsigned char  MemAdd);
extern void InitVINPara(void);
extern uint8_t ReadVINPara(VIN_PACK *retdata);
extern uint8_t SaveVINPara(void);     
    
#endif /* BSP_IIC_H_ */
