/**
*   @file           Ocu_Ipw_Types.h
*
*   @version        1.0.0
*
*   @brief          AUTOSAR Ocu - OCU driver Ipw header file.
*   @details        Ipw defines, types used by OCU driver.
*
*   @addtogroup     OCU_MODULE
*   @{
*/
/*===================================================================================================
*   Project              : AUTOSAR 4.3 MCAL
*   Platform             : PA
*   Peripheral           : eMios
*   Dependencies         : none
*
*   Autosar Version      : 4.3.1
*   Autosar Revision     : ASR_REL_4_3_REV_0001
*   Autosar Conf.Variant :
*   SW Version           : 1.0.0
*   Build Version        : MPC5777C_MCAL_1_0_0_RTM_ASR_REL_4_3_REV_0001_20190315
*
*   (c) Copyright 2006-2016 Freescale Semiconductor, Inc. 
*       Copyright 2017-2019 NXP
*   All Rights Reserved.
=====================================================================================================*/
/*=====================================================================================================
======================================================================================================*/



#ifndef OCU_IPW_TYPES_H
#define OCU_IPW_TYPES_H

#ifdef __cplusplus
extern "C" {
#endif

/**
* @page misra_violations MISRA-C:2012 violations
*
* @section Ocu_IPW_Types_H_REF_1
* Violates MISRA 2012 Advisory Rule 2.5, A project should not contain unused define declarations.
* Define is used in configuration.
*
* @section Ocu_IPW_Types_H_REF_2
* Violates MISRA 2012 Advisory Rule 2.3, A project should not contain unused type declarations.
* Define is used in configuration.
*
*/
/*==================================================================================================
*                                         INCLUDE FILES
* 1) system and project includes
* 2) needed interfaces from external units
* 3) internal and external interfaces from this unit
==================================================================================================*/
#include "Ocu_Types.h"

#include "Ocu_eMios_Types.h"

/*==================================================================================================
*                               SOURCE FILE VERSION INFORMATION
==================================================================================================*/
/**
* @{
* @file           Ocu_Ipw_Types.h
*/


#define OCU_IPW_TYPES_VENDOR_ID                         43
/**
* @violates @ref Ocu_IPW_Types_H_REF_1 Violates Advisory Rule 2.5, A project should not contain unused define declarations.
*/
#define OCU_IPW_TYPES_MODULE_ID                         125
#define OCU_IPW_TYPES_AR_RELEASE_MAJOR_VERSION          4
#define OCU_IPW_TYPES_AR_RELEASE_MINOR_VERSION          3
#define OCU_IPW_TYPES_AR_RELEASE_REVISION_VERSION       1
#define OCU_IPW_TYPES_SW_MAJOR_VERSION                  1
#define OCU_IPW_TYPES_SW_MINOR_VERSION                  0
#define OCU_IPW_TYPES_SW_PATCH_VERSION                  0
/**@}*/

/*==================================================================================================
*                                      FILE VERSION CHECKS
==================================================================================================*/
/* Check if included Ocu_eMios_Types.h header file has same vendor */
#if (OCU_IPW_TYPES_VENDOR_ID != OCU_EMIOS_TYPES_VENDOR_ID)
    #error "Ocu_Ipw_Types.h and Ocu_eMios_Types.h have different vendor ids"
#endif

/* Check if included Ocu_eMios_Types.h header file has same AUTOSAR version */
#if ((OCU_IPW_TYPES_AR_RELEASE_MAJOR_VERSION    !=  OCU_EMIOS_TYPES_AR_RELEASE_MAJOR_VERSION) || \
     (OCU_IPW_TYPES_AR_RELEASE_MINOR_VERSION    !=  OCU_EMIOS_TYPES_AR_RELEASE_MINOR_VERSION) || \
     (OCU_IPW_TYPES_AR_RELEASE_REVISION_VERSION !=  OCU_EMIOS_TYPES_AR_RELEASE_REVISION_VERSION))
    #error "AutoSar Version Numbers of Ocu_Ipw_Types.h and Ocu_eMios_Types.h are different"
#endif

/* Check if included Ocu_eMios_Types.h header file has same software version */
#if ((OCU_IPW_TYPES_SW_MAJOR_VERSION !=  OCU_EMIOS_TYPES_SW_MAJOR_VERSION) || \
     (OCU_IPW_TYPES_SW_MINOR_VERSION !=  OCU_EMIOS_TYPES_SW_MINOR_VERSION) || \
     (OCU_IPW_TYPES_SW_PATCH_VERSION !=  OCU_EMIOS_TYPES_SW_PATCH_VERSION))
    #error "Software Version Numbers of Ocu_Ipw_Types.h and Ocu_eMios_Types.h are different"
#endif

/* Check if included Ocu_Types.h header file has same vendor */
#if (OCU_IPW_TYPES_VENDOR_ID != OCU_TYPES_VENDOR_ID)
    #error "Ocu_Ipw_Types.h and Ocu_Types.h have different vendor ids"
#endif

/* Check if included Ocu_Types.h header file has same AUTOSAR version */
#if ((OCU_IPW_TYPES_AR_RELEASE_MAJOR_VERSION    !=  OCU_TYPES_AR_RELEASE_MAJOR_VERSION) || \
     (OCU_IPW_TYPES_AR_RELEASE_MINOR_VERSION    !=  OCU_TYPES_AR_RELEASE_MINOR_VERSION) || \
     (OCU_IPW_TYPES_AR_RELEASE_REVISION_VERSION !=  OCU_TYPES_AR_RELEASE_REVISION_VERSION))
    #error "AutoSar Version Numbers of Ocu_Ipw_Types.h and Ocu_Types.h are different"
#endif

/* Check if included Ocu_Types.h header file has same software version */
#if ((OCU_IPW_TYPES_SW_MAJOR_VERSION !=  OCU_TYPES_SW_MAJOR_VERSION) || \
     (OCU_IPW_TYPES_SW_MINOR_VERSION !=  OCU_TYPES_SW_MINOR_VERSION) || \
     (OCU_IPW_TYPES_SW_PATCH_VERSION !=  OCU_TYPES_SW_PATCH_VERSION))
    #error "Software Version Numbers of Ocu_Ipw_Types.h and Ocu_Types.h are different"
#endif

/*==================================================================================================
*                                           CONSTANTS
==================================================================================================*/


/*==================================================================================================
*                                       PLATFORM SPECIFIC DEFINES AND MACROS
==================================================================================================*/


/*==================================================================================================
*                                       DEFINES AND MACROS
==================================================================================================*/
/* @brief Symbolic name for EMIOS channels */
/**
* @violates @ref Ocu_IPW_Types_H_REF_2 Violates Advisory Rule 2.3, A project should not contain unused type declarations.
* @violates @ref Ocu_IPW_Types_H_REF_1 Violates Advisory Rule 2.5, A project should not contain unused define declarations.
*/
#define OCU_EMIOS_CHANNEL             ((Ocu_ChannelIpType)0)

/*==================================================================================================
*                                  STRUCTURES AND OTHER TYPEDEFS
==================================================================================================*/

/*
* @brief      IP type used to implement a Ocu channel
*/
/**
* @violates @ref Ocu_IPW_Types_H_REF_2 Violates Advisory Rule 2.3, A project should not contain unused type declarations.
* @violates @ref Ocu_IPW_Types_H_REF_1 Violates Advisory Rule 2.5, A project should not contain unused define declarations.
*/
typedef uint8 Ocu_ChannelIpType;

typedef struct 
{
    /** @brief Index in the IP specific configuration table */
    CONST(uint8, OCU_CONST) u8IdxChannelConfig;
} Ocu_IpChannelConfigType;

/**
* @brief   IP specific configuration structure
* 
*/
typedef struct
{
    /* @brief pointer to the configured channels for EMIOS */
    CONSTP2CONST(Ocu_eMios_IpConfigType, OCU_CONST, OCU_APPL_CONST) peMiosIpConfig;
    /* @brief Pointer to Array containing IP type and index in the IP configuration table for each Ocu channel */
    CONST(Ocu_IpChannelConfigType,  OCU_CONST)  (*pIpChannelsConfig)[];
} Ocu_IpConfigType;

/*==================================================================================================
*                                  GLOBAL VARIABLE DECLARATIONS
==================================================================================================*/

/*==================================================================================================
*                                      FUNCTION PROTOTYPES
==================================================================================================*/
      

#ifdef __cplusplus
}
#endif

#endif    /* OCU_IPW_TYPES_H */

/** @} */

