void EcuM_AL_DriverInitTwo(const EcuM_ConfigType* ConfigPtr)
{
	(void)ConfigPtr;

#if defined(USE_SPI)
	// Setup SPI
	Spi_Init(ConfigPtr->SpiConfig);
#endif

#if defined(USE_EEP)
	// Setup EEP
	NO_DRIVER(Eep_Init(ConfigPtr->EepConfig));
#endif

#if defined(USE_FLS)
	// Setup Flash
	NO_DRIVER(Fls_Init(ConfigPtr->FlashConfig));
#endif

#if defined(USE_FEE)
	// Setup FEE
	NO_DRIVER(Fee_Init());
#endif

#if defined(USE_EA)
	// Setup EA
	NO_DRIVER(Ea_Init());
#endif

#if defined(USE_NVM)
	// Setup NVRAM Manager and start the read all job
	NO_DRIVER(NvM_Init());
	NO_DRIVER(NvM_ReadAll());
#endif


#if defined(USE_LIN)
    // Setup Lin driver
	Lin_Init(ConfigPtr->LinConfig);
#endif

#if defined(USE_LINIF)
    // Setup LinIf
	LinIf_Init(ConfigPtr->LinIfConfig);
#endif

#if defined(USE_LINSM)
    // Setup LinSM
	LinSM_Init(ConfigPtr->LinSMConfig);
#endif

	// Setup CAN tranceiver
	// NOTE: Add when adding supoprt for CanTranceiver

#if defined(USE_CAN)
	// Setup Can driver
	Can_Init(ConfigPtr->CanConfig);
#endif

#if defined(USE_CANIF)
	// Setup CanIf
	NO_DRIVER(CanIf_Init(ConfigPtr->PostBuildConfig->CanIf_ConfigPtr));
#endif

#if defined(USE_CANTP)
	// Setup CAN TP
	NO_DRIVER(CanTp_Init(ConfigPtr->PostBuildConfig->CanTp_ConfigPtr));
#endif

#if defined(USE_CANSM)
	NO_DRIVER(CanSM_Init(ConfigPtr->CanSMConfig));
#endif

#if defined(USE_J1939TP)
	// Setup J1939Tp
	NO_DRIVER(J1939Tp_Init(ConfigPtr->J1939TpConfig));
#endif

#if defined(USE_PDUR)
	// Setup PDU Router
	NO_DRIVER(PduR_Init(ConfigPtr->PostBuildConfig->PduR_ConfigPtr));
#endif

#if defined(USE_CANNM)
    // Setup Can Network Manager
	NO_DRIVER(CanNm_Init(ConfigPtr->PostBuildConfig->CanNm_ConfigPtr));
#endif

#if defined(USE_UDPNM)
        // Setup Udp Network Manager
	NO_DRIVER(UdpNm_Init(ConfigPtr->UdpNmConfig));
#endif

#if defined(USE_NM)
        // Setup Network Management Interface
	NO_DRIVER(Nm_Init());
#endif

#if defined(USE_COM)
	// Setup COM layer
	NO_DRIVER(Com_Init(ConfigPtr->PostBuildConfig->ComConfigurationPtr));
#endif

#if defined(USE_DCM)
	// Setup DCM
	NO_DRIVER(Dcm_Init(ConfigPtr->DcmConfig));
#endif

#if defined(USE_IOHWAB)
	// Setup IO hardware abstraction layer
	IoHwAb_Init();
#endif

#if defined(USE_XCP)
	// Setup XCP
	NO_DRIVER(Xcp_Init(ConfigPtr->XcpConfig));
#endif

}
Example #2
0
void EcuM_Callout_DriverInitListTwo(void)
{
  /* status of NvM initialization */
  NvM_RequestResultType Result;
  BswM_Init(BswM_ConfigPtr);
  
  
  Fls_Init(NULL_PTR);
#ifdef BASE_EA_ENABLED
  EA_INIT_FUNC();
#endif
#ifdef BASE_FEE_ENABLED
  FEE_INIT_FUNC();
  
  /* wait for FEE to complete the init sequence */
  do
  {
    Fee_MainFunction();
    Fls_MainFunction();
  }
  while (MEMIF_IDLE != Fee_GetStatus());

#endif
#ifdef BASE_NVM_ENABLED
  NVM_INIT_FUNC();
  NvM_ReadAll();
  
  /* wait for the NvM_ReadAll() to complete - some of the remaining
     modules need valid NvRam data...       */
  do
  {
    NvM_MainFunction();
    Fee_MainFunction();
    Fls_MainFunction();

    (void)NvM_GetErrorStatus(NvMConf_NvMBlockDescriptor_NvMBlock_ConfigID, &Result);
  }
  while (Result == NVM_REQ_PENDING);

#endif
  LinEmuUart_Init();
  
  Can_InitMemory();
  Can_Init(&CanConfigSet);

  CanIf_InitMemory();
  CanIf_Init(&CanIf_Config);
  //CanNm_Init(&CanNmGlobalConfig);
  //Nm_Init(&Nm_Configuration0);
  PduR_InitMemory();
  PduR_Init(&PduRGlobalConfig);
  Com_InitMemory();
  Com_Init(&ComConfig);
  CanSM_InitMemory();
  CanSM_Init();
  CanTp_InitMemory();
  CanTp_Init();  
  ComM_InitMemory();
  ComM_Init(&ComMConfig);
  Xcp_Init(NULL);
  FiM_Init(&FiM_Config_0);
  DiagMeas_Init();
  DiagCtrl_Init();
  SCI_B6Bridge_Init();
    SCI_Pfc_Init();
  SCI_IOHW_Init();
  
#ifdef BASE_DEM_ENABLED
  DEM_INIT_FUNC();
  /* start the standard operation cycle */
  /* (void) Dem_SetOperationCycleState(DEM_OPCYC_POWER, DEM_CYCLE_STATE_START); */
#endif  
  Dcm_Init();
}