/**
*   @file    IoDal_Cfg.h
*   @version 1.0.0
*
*   @brief   Integration Framework - IO Driver Abstraction Layer component configuration file
*   @details This file implements the IODAL configuration header.
*
*   (c) Copyright 2006-2016 Freescale Semiconductor, Inc. 
*       Copyright 2017-2018 NXP
*   All Rights Reserved.
*   This file contains sample code only. It is not part of the production code deliverables.
*
*/
/*=========================================================================================================================
*   Project              : AUTOSAR 4.3 MCAL
*   Platform             : PA
*
*   Autosar Version      : 4.3.1
*   Autosar Revision     : ASR_REL_4_3_REV_0001
*   
*   SW Version           : 1.0.0
*   Build Version        : MPC5777CXG_MCAL_1_0_0_RTM_ASR_REL_4_3_REV_0001_20190318
*
============================================================================================================================*/
/*============================================================================================================================
==============================================================================================================================*/
#ifndef IODAL_Cfg_H
#define IODAL_Cfg_H

#ifdef __cplusplus
extern "C"{
#endif



#include "IoDal_Types.h"
/*==================================================================================================
                                         INCLUDE FILES
 1) system and project includes
 2) needed interfaces from external units
 3) internal and external interfaces from this unit
==================================================================================================*/
#define IODAL_CFG_VENDOR_ID                       43

#define IODAL_CFG_AR_RELEASE_MAJOR_VERSION        4
#define IODAL_CFG_AR_RELEASE_MINOR_VERSION        3
#define IODAL_CFG_AR_RELEASE_REVISION_VERSION     1

#define IODAL_CFG_SW_MAJOR_VERSION                1
#define IODAL_CFG_SW_MINOR_VERSION                0
#define IODAL_CFG_SW_PATCH_VERSION                0


/*===================================================================================================================
*                                     FILE VERSION CHECKS
====================================================================================================================*/
/* Check if IoDal_Cfg.h header file and IoDal_Types.h header file are of the same vendor */
#if (IODAL_CFG_VENDOR_ID != IODAL_TYPES_VENDOR_ID)
    #error "IoDal_Cfg.h and IoDal_Types.h have different vendor ids"
#endif

/* Check if IoDal_Cfg.h header file and IoDal_Types.h header file are of the same Autosar version */
#if ((IODAL_CFG_AR_RELEASE_MAJOR_VERSION != IODAL_TYPES_AR_RELEASE_MAJOR_VERSION) || \
     (IODAL_CFG_AR_RELEASE_MINOR_VERSION != IODAL_TYPES_AR_RELEASE_MINOR_VERSION) || \
     (IODAL_CFG_AR_RELEASE_REVISION_VERSION != IODAL_TYPES_AR_RELEASE_REVISION_VERSION) \
    )
    #error "AutoSar Version Numbers of IoDal_Cfg.h and IoDal_Types.h are different"
#endif

/* Check if IoDal_Cfg.h header file and IoDal_Types.h header file are of the same Software version */
#if ((IODAL_CFG_SW_MAJOR_VERSION != IODAL_TYPES_SW_MAJOR_VERSION) || \
     (IODAL_CFG_SW_MINOR_VERSION != IODAL_TYPES_SW_MINOR_VERSION) || \
     (IODAL_CFG_SW_PATCH_VERSION != IODAL_TYPES_SW_PATCH_VERSION) \
    )
    #error "Software Version Numbers of IoDal_Cfg.h and IoDal_Cfg.h are different"
#endif



/*==================================================================================================
                                        LOCAL MACROS
==================================================================================================*/

#define    IODAL_MAX_DIO_CHANNELS_HW_VAR_0            3U
#define    IODAL_MAX_DIO_DESCRIPTORS                  3U
    
#define    IODAL_MAX_PWM_CHANNELS_HW_VAR_0            2U
#define    IODAL_MAX_PWM_DESCRIPTORS                  2U
    
#define    IODAL_MAX_ANALOG_CHANNELS_HW_VAR_0         1U
#define    IODAL_MAX_ANI_DESCRIPTORS                  1U
    
#define    IODAL_MAX_OCU_CHANNELS_HW_VAR_0            1U
#define    IODAL_MAX_OCU_DESCRIPTORS                  1U
    
#define    IODAL_MAX_ICU_CHANNELS_HW_VAR_0            0U
#define    IODAL_MAX_ICU_DESCRIPTORS                  0U

#define    IODAL_MAX_MOTOR_BRIDGES_HW_VAR_0           0U
#define    IODAL_MAX_MOTOR_BRIDGE_OUTPUT_DESCRIPTORS  0U
    
#define    IODAL_MAX_CHANNELS_HW_VAR_0                7U

#define    IODAL_MAX_HW_VARIANTS                      1U




#define IODAL_DEV_ERROR_DETECT      (STD_OFF)

/**
    * @brief          Symbolic name for the configuration IoDal channels.
*
*/

#define    IoDal_Dio_Key1        (0U)

#define    IoDal_Dio_Out1        (1U)

#define    IoDal_Ocu_Trigger        (2U)

#define    IoDal_Adc_Pot        (3U)

#define    IoDal_Pwm_Out1        (4U)

#define    IoDal_Pwm_Key2        (5U)

#define    IoDal_Pwm_Out2        (6U)


#define IODAL_PWM_EXT_DEV          (STD_OFF)
#define IODAL_PWM_SYNC             (STD_OFF)      
#define IODAL_DIO_EXT_DEV          (STD_OFF)
#define IODAL_VARIABLE_PERIOD      (STD_OFF)
#define IODAL_DIO_EXT_SYNC_DEVICE  (STD_OFF)



extern void IoDal_AdcBufferSetup(void);
extern const IoDal_BswIoConfigType IoDal_Config[IODAL_MAX_HW_VARIANTS];


/*================================================================================================*/
#ifdef __cplusplus
}
#endif

#endif  /* IODAL_TYPES_H*/
