/*********************************************************************************************************************
*
* Description:     DataM module configuration implementation
* FileName:        FBL_DataMCfg.c
* Company:         ETAS GmbH (www.etas.com)
* Generated        28/12/2018 at 11:22
*
**********************************************************************************************************************
*
* COPYRIGHT RESERVED, Copyright ETAS GmbH 2018. All rights reserved, also regarding any disposal,
* exploitation, reproduction, editing, distribution, as well as in the event of applications
* for industrial property rights.
*
**********************************************************************************************************************
* History:
**********************************************************************************************************************
* Author        Date            Comment
**********************************************************************************************************************
BGA1YOK         25/10/2017      First Version    
**********************************************************************************************************************/


/*********************************************************************************************************************
* Includes
*********************************************************************************************************************/
#include "FBL_DataMCfg.h"
#include "FBL_DataMPrv.h"
#include "FBL_DataMPrvCfg.h"
#include "FBL_Port.h"
#ifdef __PQRA_QAC__
#pragma PRQA_MESSAGES_OFF
#endif
#include "Nvm_Cfg.h"
#ifdef __PQRA_QAC__
#pragma PRQA_MESSAGES_ON
#endif
#ifdef __PQRA_QAC__
#pragma PRQA_MESSAGES_OFF
#endif
#include "NvM.h"
#ifdef __PQRA_QAC__
#pragma PRQA_MESSAGES_ON
#endif
#ifdef __PQRA_QAC__
#pragma PRQA_MESSAGES_OFF
#endif
#include "Dcm.h"
#ifdef __PQRA_QAC__
#pragma PRQA_MESSAGES_ON
#endif
/*********************************************************************************************************************
* Local Defines
*********************************************************************************************************************/

/*********************************************************************************************************************
* Local Macros
*********************************************************************************************************************/

/*********************************************************************************************************************
* Local Types
*********************************************************************************************************************/

/*********************************************************************************************************************
* Global Constants
*********************************************************************************************************************/

/*********************************************************************************************************************
* Local Functions Prototypes
*********************************************************************************************************************/
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 60] */
static Std_ReturnType Fbl_DataM_ReadFromNvmBlockVarLength (uint8 *  pTo, const uint8 * pFrom, const uint8 size);
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 61] */
static Std_ReturnType Fbl_DataM_WriteToNvmBlockVarLength(uint8 * pTo, const uint8 * value, const uint8 blockIndex, const uint8 size);
/*********************************************************************************************************************
* Local Functions Implementation
*********************************************************************************************************************/

/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 60] */
static Std_ReturnType Fbl_DataM_ReadFromNvmBlockVarLength (uint8 * pTo, const uint8 * pFrom, const uint8 size)
{
  Std_ReturnType retL = E_NOT_OK;
  uint8 index;
  /* PRQA S 4304 EOF */ /* <Deviation: rule_10.5_4304_boolean */
  if ((boolean)TRUE == Fbl_DataM_RamMirrorLoaded)
  {
    for( index = 0; index < size; index++ )
    {
      pTo[ index ] = pFrom[ index];
    }
  retL = E_OK;
  }
  return retL;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 61] */
static Std_ReturnType Fbl_DataM_WriteToNvmBlockVarLength(uint8 * pTo, const uint8 * value, const uint8 blockIndex, const uint8 size)
{
    Std_ReturnType retL = E_NOT_OK;
    uint8 index;
    boolean changed=(boolean)FALSE;

    if ((boolean)TRUE == Fbl_DataM_RamMirrorLoaded)
    {
      /* verify value change */
    for( index = 0; index < size; index++ )
    {
      if ( pTo[ index ] != value[ index ] )
      {
        changed = (boolean)TRUE;
        break;
      }
    }
    /* apply changes */
    if ( (boolean)TRUE == changed )
    {
      for( index = 0; index < size; index++ )
      {
        pTo[ index ] = value[index];
      }
      Fbl_DataM_BlockStatus[blockIndex] = FBL_DATAM_BLOCK_STATUS_NOT_SAVED;
    }
    retL = E_OK;
  }
  return retL;
}
/*********************************************************************************************************************
* Exported Variables Implementation
*********************************************************************************************************************/

/*********************************************************************************************************************
* Exported Functions Implementation
*********************************************************************************************************************/
/* Read_xxx for data stored in NvM */
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 29] */
Std_ReturnType Fbl_DataM_NvmReprogrammingRequestFlagReadFunc(uint8 * data)
{
  Std_ReturnType rtn;
  rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data, 
                                            FBL_DATAM_NVM_DATA_REPROGRAMMINGREQUESTFLAG_BLOCK_DATA_RAM_MIRROR_START, 
                                            FBL_DATAM_NVM_DATA_REPROGRAMMINGREQUESTFLAG_SIZE);
  return rtn;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 29] */

Std_ReturnType Fbl_DataM_NvmApplicationValidFlagReadFunc(uint8 * data)
{
  Std_ReturnType rtn;
  rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data, 
                                            FBL_DATAM_NVM_DATA_APPLICATIONVALIDFLAG_BLOCK_DATA_RAM_MIRROR_START, 
                                            FBL_DATAM_NVM_DATA_APPLICATIONVALIDFLAG_SIZE);
  return rtn;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 29] */
Std_ReturnType Fbl_DataM_NvmFreeRunningCntrReadFunc(uint8 * data)
{
  Std_ReturnType rtn;
  rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data, 
                                            FBL_DATAM_NVM_DATA_FREERUNNINGCNTR_BLOCK_DATA_RAM_MIRROR_START,
                                            FBL_DATAM_NVM_DATA_FREERUNNINGCNTR_SIZE);
  return rtn;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 29] */
Std_ReturnType Fbl_DataM_NvmProgramConditionsReadFunc(uint8 * data)
{
  Std_ReturnType rtn;
  rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data, 
                                            FBL_DATAM_NVM_DATA_PROGRAMCONDITIONS_BLOCK_DATA_RAM_MIRROR_START, 
                                            FBL_DATAM_NVM_DATA_PROGRAMCONDITIONS_SIZE);
  return rtn;
}

Std_ReturnType Fbl_DataM_NvmSecretKeyReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_SECRETKEY_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_SECRETKEY_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmSecretKeyUpdateCounterReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_SECRETKEYUPDATECOUNTER_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_SECRETKEYUPDATECOUNTER_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmApplicationUpdateCounterReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_APPLICATIONUPDATECOUNTER_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_APPLICATIONUPDATECOUNTER_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmCalibrationUpdateCounterReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_CALIBRATIONUPDATECOUNTER_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_CALIBRATIONUPDATECOUNTER_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmHardwarePartNumberReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_HARDWAREPARTNUMBER_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_HARDWAREPARTNUMBER_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmHardwareSerialNumberReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_HARDWARESERIALNUMBER_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_HARDWARESERIALNUMBER_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmCompnentIDReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_COMPONENTID_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_COMPONENTID_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmHardwareIDReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_HARDWAREID_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_HARDWAREID_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmApplicationUpdaterFingerprintReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_APPLICATIONUPDATERFINGERPRINT_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_APPLICATIONUPDATERFINGERPRINT_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmCalibrationUpdaterFingerprintReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_CALIBRATIONUPDATERFINGERPRINT_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_CALIBRATIONUPDATERFINGERPRINT_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmApplicationUpdateTimestampReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_APPLICATIONUPDATETIMESTAMP_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_APPLICATIONUPDATETIMESTAMP_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmCalibrationUpdateTimestampReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_CALIBRATIONUPDATETIMESTAMP_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_CALIBRATIONUPDATETIMESTAMP_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmHardwareManufacturingDateReadFunc (uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_ReadFromNvmBlockVarLength(data,
                                              FBL_DATAM_NVM_DATA_HARDWAREMANUFACTURINGDATE_BLOCK_DATA_RAM_MIRROR_START,
                                              FBL_DATAM_NVM_DATA_HARDWAREMANUFACTURINGDATE_SIZE);
    return rtn;
  }
/* Write_xxx for data stored in NvM */
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 30] */
Std_ReturnType Fbl_DataM_NvmReprogrammingRequestFlagWriteFunc(const uint8 * data)
{
  Std_ReturnType rtn;
  rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_REPROGRAMMINGREQUESTFLAG_BLOCK_DATA_RAM_MIRROR_START, 
                                           data, 
                                           FBL_DATAM_NVM_DATA_REPROGRAMMINGREQUESTFLAG_BLOCK_INDEX, 
                                           FBL_DATAM_NVM_DATA_REPROGRAMMINGREQUESTFLAG_SIZE);
  return rtn;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 30] */
Std_ReturnType Fbl_DataM_NvmApplicationValidFlagWriteFunc(const uint8 * data)
{
  Std_ReturnType rtn;
  rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_APPLICATIONVALIDFLAG_BLOCK_DATA_RAM_MIRROR_START, 
                                           data, 
                                           FBL_DATAM_NVM_DATA_APPLICATIONVALIDFLAG_BLOCK_INDEX, 
                                           FBL_DATAM_NVM_DATA_APPLICATIONVALIDFLAG_SIZE);
  return rtn;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 30] */
Std_ReturnType Fbl_DataM_NvmFreeRunningCntrWriteFunc(const uint8 * data)
{
  Std_ReturnType rtn;
  rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_FREERUNNINGCNTR_BLOCK_DATA_RAM_MIRROR_START,
                                           data, 
                                           FBL_DATAM_NVM_DATA_FREERUNNINGCNTR_BLOCK_INDEX,
                                           FBL_DATAM_NVM_DATA_FREERUNNINGCNTR_SIZE);
  return rtn;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 30] */
Std_ReturnType Fbl_DataM_NvmProgramConditionsWriteFunc(const uint8 * data)
{
  Std_ReturnType rtn;
  rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_PROGRAMCONDITIONS_BLOCK_DATA_RAM_MIRROR_START, 
                                           data, 
                                           FBL_DATAM_NVM_DATA_PROGRAMCONDITIONS_BLOCK_INDEX, 
                                           FBL_DATAM_NVM_DATA_PROGRAMCONDITIONS_SIZE);
  return rtn;
}
Std_ReturnType Fbl_DataM_NvmSecretKeyWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_SECRETKEY_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_SECRETKEY_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_SECRETKEY_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmSecretKeyUpdateCounterWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_SECRETKEYUPDATECOUNTER_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_SECRETKEYUPDATECOUNTER_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_SECRETKEYUPDATECOUNTER_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmApplicationUpdateCounterWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_APPLICATIONUPDATECOUNTER_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_APPLICATIONUPDATECOUNTER_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_APPLICATIONUPDATECOUNTER_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmCalibrationUpdateCounterWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_CALIBRATIONUPDATECOUNTER_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_CALIBRATIONUPDATECOUNTER_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_CALIBRATIONUPDATECOUNTER_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmHardwarePartNumberWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_HARDWAREPARTNUMBER_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_HARDWAREPARTNUMBER_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_HARDWAREPARTNUMBER_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmHardwareSerialNumberWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_HARDWARESERIALNUMBER_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_HARDWARESERIALNUMBER_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_HARDWARESERIALNUMBER_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmCompnentIDWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_COMPONENTID_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_COMPONENTID_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_COMPONENTID_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmHardwareIDWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_HARDWAREID_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_HARDWAREID_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_HARDWAREID_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmApplicationUpdaterFingerprintWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_APPLICATIONUPDATERFINGERPRINT_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_APPLICATIONUPDATERFINGERPRINT_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_APPLICATIONUPDATERFINGERPRINT_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmCalibrationUpdaterFingerprintWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_CALIBRATIONUPDATERFINGERPRINT_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_CALIBRATIONUPDATERFINGERPRINT_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_CALIBRATIONUPDATERFINGERPRINT_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmApplicationUpdateTimestampWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_APPLICATIONUPDATETIMESTAMP_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_APPLICATIONUPDATETIMESTAMP_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_APPLICATIONUPDATETIMESTAMP_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmCalibrationUpdateTimestampWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_CALIBRATIONUPDATETIMESTAMP_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_CALIBRATIONUPDATETIMESTAMP_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_CALIBRATIONUPDATETIMESTAMP_SIZE);
    return rtn;
  }
Std_ReturnType Fbl_DataM_NvmHardwareManufacturingDateWriteFunc (const uint8 * data){
    Std_ReturnType rtn;
    rtn = Fbl_DataM_WriteToNvmBlockVarLength(FBL_DATAM_NVM_DATA_HARDWAREMANUFACTURINGDATE_BLOCK_DATA_RAM_MIRROR_START,
                                             data,
                                             FBL_DATAM_NVM_DATA_HARDWAREMANUFACTURINGDATE_BLOCK_INDEX,
                                             FBL_DATAM_NVM_DATA_HARDWAREMANUFACTURINGDATE_SIZE);
    return rtn;
  }
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 62] */
/* Check if nvm data has been persisted*/
boolean Fbl_DataM_NvmReprogrammingRequestFlagIsPersisted(void)
{
    return Fbl_DataM_NvmBlockNV_ReprogrammingRequestFlagIsPersisted();
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 62] */
boolean Fbl_DataM_NvmApplicationValidFlagIsPersisted(void)
{
    return Fbl_DataM_NvmBlockNV_ApplicationValidFlagIsPersisted();
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 62] */
boolean Fbl_DataM_NvmFreeRunningCntrIsPersisted(void)
{
    return Fbl_DataM_NvmBlockNV_FreeRunningCntrIsPersisted();
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 62] */
boolean Fbl_DataM_NvmProgramConditionsIsPersisted(void)
{
    return Fbl_DataM_NvmBlockNV_ProgramConditionsIsPersisted();
}

boolean Fbl_DataM_NvmSecretKeyIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_SecretKeyIsPersisted();
}

boolean Fbl_DataM_NvmSecretKeyUpdateCounterIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_SecretKeyUpdateCounterIsPersisted();
}

boolean Fbl_DataM_NvmApplicationUpdateCounterIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_ApplicationUpdateCounterIsPersisted();
}

boolean Fbl_DataM_NvmCalibrationUpdateCounterIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_CalibrationUpdateCounterIsPersisted();
}

boolean Fbl_DataM_NvmHardwarePartNumberIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_HardwarePartNumberIsPersisted();
}

boolean Fbl_DataM_NvmHardwareSerialNumberIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_HardwareSerialNumberIsPersisted();
}

boolean Fbl_DataM_NvmCompnentIDIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_CompnentIDIsPersisted();
}

boolean Fbl_DataM_NvmHardwareIDIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_HardwareIDIsPersisted();
}

boolean Fbl_DataM_NvmApplicationUpdaterFingerprintIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_ApplicationUpdaterFingerprintIsPersisted();
}

boolean Fbl_DataM_NvmCalibrationUpdaterFingerprintIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_CalibrationUpdaterFingerprintIsPersisted();
}

boolean Fbl_DataM_NvmApplicationUpdateTimestampIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_ApplicationUpdateTimestampIsPersisted();
}

boolean Fbl_DataM_NvmCalibrationUpdateTimestampIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_CalibrationUpdateTimestampIsPersisted();
}
boolean Fbl_DataM_NvmHardwareManufacturingDateIsPersisted (void){
    return Fbl_DataM_NvmBlockNV_HardwareManufacturingDateIsPersisted();
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 66] */
boolean Fbl_DataM_NvmAllBlocksArePersisted ( void )
{
  boolean ret_val = (boolean)TRUE;
  uint8 index;
  for (index=0; index<FBL_DATAM_NUM_NVM_BLOCKS; index++)
  {
    if (Fbl_DataM_BlockStatus[index] != FBL_DATAM_BLOCK_STATUS_SAVED)
    {
      ret_val = (boolean)FALSE;
      break;
    }
  }
  return ret_val;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 45] */
Std_ReturnType Fbl_DataM_NvmReprogrammingRequestFlagBlockCallbackFunction(const uint8 u8ServiceIdP, const NvM_RequestResultType JobResultP)
{
  Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_REPROGRAMMINGREQUESTFLAG_INDEX );
  return E_OK;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 45] */
Std_ReturnType Fbl_DataM_NvmApplicationValidFlagBlockCallbackFunction(const uint8 u8ServiceIdP, const NvM_RequestResultType JobResultP)
{
  Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_APPLICATIONVALIDFLAG_INDEX );
  return E_OK;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 45] */
Std_ReturnType Fbl_DataM_NvmPSNGBlockCallbackFunction(const uint8 u8ServiceIdP, const NvM_RequestResultType JobResultP)
{
  Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_FREERUNNINGCNTR_INDEX );
  return E_OK;
}
/* [$Satisfies $RTA_FBL_SDK_DD_DATAM 45] */
Std_ReturnType Fbl_DataM_NvmProgramConditionsBlockCallbackFunction(const uint8 u8ServiceIdP, const NvM_RequestResultType JobResultP)
{
  Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_PROGRAMCONDITION_INDEX );
  return E_OK;
}

Std_ReturnType Fbl_DataM_NvmSecretKeyBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_SECRETKEY_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmSecretKeyUpdateCounterBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_SECRETKEYUPDATECOUNTER_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmApplicationUpdateCounterBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_APPLICATIONUPDATECOUNTER_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmCalibrationUpdateCounterBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_CALIBRATIONUPDATECOUNTER_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmHardwarePartNumberBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_HARDWAREPARTNUMBER_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmHardwareSerialNumberBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_HARDWARESERIALNUMBER_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmCompnentIDBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_COMPONENTID_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmHardwareIDBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_HARDWAREID_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmApplicationUpdaterFingerprintBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_APPLICATIONUPDATERFINGERPRINT_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmCalibrationUpdaterFingerprintBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_CALIBRATIONUPDATERFINGERPRINT_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmApplicationUpdateTimestampBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_APPLICATIONUPDATETIMESTAMP_INDEX );
    return E_OK;
  }

Std_ReturnType Fbl_DataM_NvmCalibrationUpdateTimestampBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_CALIBRATIONUPDATETIMESTAMP_INDEX );
    return E_OK;
  }
Std_ReturnType Fbl_DataM_NvmHardwareManufacturingDateBlockCallbackFunction (const uint8 u8ServiceIdP,const NvM_RequestResultType JobResultP){
    Fbl_DataM_UpdateBlockStatusEvent(u8ServiceIdP, JobResultP, FBL_DATAM_NVM_BLOCK_NV_HARDWAREMANUFACTURINGDATE_INDEX );
    return E_OK;
  }

