#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;
}
