UDS_2EService_Internal.c 739 Bytes
Newer Older
时昊's avatar
时昊 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#include "UDS_2EService_Internal.h"

/**
  *写入2E服务数据
  */
uint8_t write2EData(uint8_t writeType)
{
    uint8_t enResult = 0xFF;
    if(writeType == WriteBootData)
    {
        enResult = WriteDFlashData_fdl(WriteBootDataAddr , (uint32_t *)&BootToDFlashInfo.Flag, sizeof(BootToDFlashInfo) , WriteFDL);
    }
    else if(writeType == Write2EData)
    {
        enResult = WriteDFlashData_fdl(WriteSer2EDataAddr , (uint32_t *)&Ser2EToDFlashInfo.Flag, sizeof(Ser2EToDFlashInfo) , WriteFDL);
    }
    else
    {
        if (writeType == WriteEOLData)
        {
            enResult = WriteDFlashData_fdl(WriteEOLDataAddr,(uint32_t *)&EOLToDFlashInfo.Flag, sizeof(EOLToDFlashInfo),WriteFDL);
        }
    }
    return enResult;
}