#include "UDS_2EService_Internal.h"

/**
  *写入2E服务数据
  */
uint8_t write2EData(uint8_t writeType)
{
    uint8_t enResult = WFLASH_RW_PASS;
    if(writeType == WriteBootData)
    {
        enResult = WriteDFlashData(0x03u, (uint32_t *)&BootToDFlashInfo.Flag, sizeof(BootToDFlashInfo) / 4u, NeedWait);
    }
    else if(writeType == Write2EData)
    {
        enResult = WriteDFlashData(0x04u, (uint32_t *)&Ser2EToDFlashInfo.Flag, sizeof(Ser2EToDFlashInfo) / 4u, NeedWait);
    }
    else
    {
        enResult = WFLASH_RW_FAIL;
    }
    return enResult;
}
