

#include "rba_DemObdBasic_Prv.h"

#define DEM_START_SEC_ROM_CODE
#include "Dem_Cfg_MemMap.h"

/*  OBD: Nvm Explicit Synchronization: */
Std_ReturnType rba_DemObdBasic_PdtcMemWriteRamBlockToNvCallback(void* NvMBuffer)
{
    DEM_MEMCPY(NvMBuffer, &rba_DemObdBasic_PdtcMem[0], DEM_SIZEOF_VAR(rba_DemObdBasic_PdtcMem));
    return E_OK;
}

/* MISRA RULE 16.7 VIOLATION: Interface is defined by AUTOSAR */
Std_ReturnType rba_DemObdBasic_PdtcMemReadRamBlockFromNvCallback(void* NvMBuffer)
{
    DEM_MEMCPY(&rba_DemObdBasic_PdtcMem[0], NvMBuffer, DEM_SIZEOF_VAR(rba_DemObdBasic_PdtcMem));
    return E_OK;
}

#if DEM_CFG_OBD_IUMPR
Std_ReturnType rba_DemObdBasic_IumprWriteRamBlockToNvCallback(void* NvMBuffer)
{
    DEM_MEMCPY(NvMBuffer, &rba_DemObdBasic_IumprNvData, DEM_SIZEOF_VAR(rba_DemObdBasic_IumprNvData));
    return E_OK;
}

Std_ReturnType rba_DemObdBasic_IumprReadRamBlockFromNvCallback(void* NvMBuffer)
{
    DEM_MEMCPY(&rba_DemObdBasic_IumprNvData, NvMBuffer, DEM_SIZEOF_VAR(rba_DemObdBasic_IumprNvData));
    return E_OK;
}
#endif

#define DEM_STOP_SEC_ROM_CODE
#include "Dem_Cfg_MemMap.h"
