UDS_2EService_Internal.c 568 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
#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;
}