/**
*     @file Icu_Ipw_Irq.h
*     @version 1.0.0
*
*     @brief   AUTOSAR Icu - Brief description.
*     @details Detailed description.
*
*     @addtogroup ICU_MODULE
*     @{
*/
/*==================================================================================================
*     Project AUTOSAR 4.3 MCAL
*     Platform PA
*     Peripheral eMIOS SIU
*     Dependencies none
*
*     Autosar Version 4.3.1
*     Autosar Revision ASR_REL_4_3_REV_0001
*     Autosar ConfVariant
*     SWVersion 1.0.0
*     BuildVersion 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 ICU_IPW_IRQ_H
#define ICU_IPW_IRQ_H

#ifdef __cplusplus
extern "C"{
#endif

/**
* @page misra_violations MISRA-C:2012 violations
*
* @section [global]
* Violates MISRA 2012 Advisory Directive 4.9, A function should be used in preference to a function-like macro
* where they are interchangeable.
* This violation is done to reduce code complexity by using function-like macros
*
* @section ICU_IPW_IRQ_H_REF_1
* Violates MISRA 2012 Required Directive 4.10, Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
* This violation is not fixed since the inclusion of <MA>_MemMap.h is as per AUTOSAR requirement [SWS_MemMap_00003].
*
* @section ICU_IPW_IRQ_H_REF_2
* Violates MISRA 2012 Advisory Rule 20.1, #include directives should only be preceded by preprocessor
* directives or comments.
* <MA>_MemMap.h is included after each section define in order to set the current memory section as defined by AUTOSAR.
*
* @section ICU_IPW_IRQ_H_REF_3
* Violates MISRA 2012 Advisory Rule 2.5, A project should not contain unused macro declarations.
* Define is/might be 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 "Icu_Types.h"
#include "Icu_Irq.h"

/*==================================================================================================
*                                SOURCE FILE VERSION INFORMATION
==================================================================================================*/
#define ICU_IPW_IRQ_VENDOR_ID                       43

#define ICU_IPW_IRQ_AR_RELEASE_MAJOR_VERSION        4
#define ICU_IPW_IRQ_AR_RELEASE_MINOR_VERSION        3
#define ICU_IPW_IRQ_AR_RELEASE_REVISION_VERSION     1
#define ICU_IPW_IRQ_SW_MAJOR_VERSION                1
#define ICU_IPW_IRQ_SW_MINOR_VERSION                0
#define ICU_IPW_IRQ_SW_PATCH_VERSION                0

/*==================================================================================================
*                                       FILE VERSION CHECKS
==================================================================================================*/
#if (ICU_IPW_IRQ_VENDOR_ID != ICU_TYPES_VENDOR_ID)
    #error "Icu_Ipw_Irq.h and Icu_Types.h have different vendor IDs"
#endif
/* Check if Icu_Ipw_Irq file and Icu_Types header file are of the same Autosar version */
#if ((ICU_IPW_IRQ_AR_RELEASE_MAJOR_VERSION != ICU_TYPES_AR_RELEASE_MAJOR_VERSION) || \
     (ICU_IPW_IRQ_AR_RELEASE_MINOR_VERSION != ICU_TYPES_AR_RELEASE_MINOR_VERSION) || \
     (ICU_IPW_IRQ_AR_RELEASE_REVISION_VERSION != ICU_TYPES_AR_RELEASE_REVISION_VERSION))
    #error "AutoSar Version Numbers of Icu_Types.h and Icu_Ipw_Irq.h are different"
#endif
/* Check if Icu_Ipw_Irq file and Icu_Types header file are of the same Software version */
#if ((ICU_IPW_IRQ_SW_MAJOR_VERSION != ICU_TYPES_SW_MAJOR_VERSION) || \
     (ICU_IPW_IRQ_SW_MINOR_VERSION != ICU_TYPES_SW_MINOR_VERSION) || \
     (ICU_IPW_IRQ_SW_PATCH_VERSION != ICU_TYPES_SW_PATCH_VERSION))
    #error "Software Version Numbers of Icu_Types.h and Icu_Ipw_Irq.h are different"
#endif

#if (ICU_IPW_IRQ_VENDOR_ID != ICU_IRQ_VENDOR_ID)
    #error "Icu_Ipw_Irq.h and Icu_Irq.h have different vendor IDs"
#endif
/* Check if source file and Icu_Irq header file are of the same Autosar version */
#if ((ICU_IPW_IRQ_AR_RELEASE_MAJOR_VERSION != ICU_IRQ_AR_RELEASE_MAJOR_VERSION) || \
     (ICU_IPW_IRQ_AR_RELEASE_MINOR_VERSION != ICU_IRQ_AR_RELEASE_MINOR_VERSION) || \
     (ICU_IPW_IRQ_AR_RELEASE_REVISION_VERSION != ICU_IRQ_AR_RELEASE_REVISION_VERSION))
    #error "AutoSar Version Numbers of Icu_Irq.h and Icu_Ipw_Irq.h are different"
#endif
/* Check if source file and Icu_Irq header file are of the same Software version */
#if ((ICU_IPW_IRQ_SW_MAJOR_VERSION != ICU_IRQ_SW_MAJOR_VERSION) || \
     (ICU_IPW_IRQ_SW_MINOR_VERSION != ICU_IRQ_SW_MINOR_VERSION) || \
     (ICU_IPW_IRQ_SW_PATCH_VERSION != ICU_IRQ_SW_PATCH_VERSION))
    #error "Software Version Numbers of Icu_Irq.h and Icu_Ipw_Irq.h are different"
#endif
/*==================================================================================================
*                                            CONSTANTS
==================================================================================================*/


/*==================================================================================================
*                                        DEFINES AND MACROS
==================================================================================================*/

#define ICU_START_SEC_CODE
/**
* @violates @ref ICU_IPW_IRQ_H_REF_1 Directive 4.10, Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*
* @violates @ref ICU_IPW_IRQ_H_REF_2 Advisory Rule 20.1, #include directives should only be preceded by
* preprocessor directives or comments.
*/
#include "Icu_MemMap.h"
/**
* @brief Mapping macro between get edge numbers eTimer functionality and high level function
*
* @violates @ref ICU_IPW_IRQ_H_REF_3 Violates Advisory Rule 2.5, A project should not contain unused macro declarations.
*
*/
#define Icu_Ipw_ReportEvents(hwChannel, overflow) \
        Icu_ReportEvents((Icu_ChannelType)(hwChannel), (overflow))
/**
* @brief Mapping macro between get edge numbers eTimer functionality and high level function
*
* @violates @ref ICU_IPW_IRQ_H_REF_3 Violates Advisory Rule 2.5, A project should not contain unused macro declarations.
*
*/
#define Icu_Ipw_ReportWakeupAndOverflow(hwChannel, overflow) \
        Icu_ReportWakeupAndOverflow((Icu_ChannelType)(hwChannel), (overflow))

#if (ICU_TIMESTAMP_API == STD_ON)
/**
* @brief Mapping macro between get edge numbers eTimer functionality and high level function
*
* @violates @ref ICU_IPW_IRQ_H_REF_3 Violates Advisory Rule 2.5, A project should not contain unused macro declarations.
*
*/
#define Icu_Ipw_Timestamp(hwChannel,capturedWords,bufferPtr,overflow) \
        Icu_Timestamp((Icu_ChannelType)(hwChannel),(capturedWords),(bufferPtr),(overflow))
#endif /* ICU_TIMESTAMP_API == STD_ON */

#if (ICU_SIGNAL_MEASUREMENT_API == STD_ON)
/**
* @brief Mapping macro between get edge numbers eTimer functionality and high level function
*
* @violates @ref ICU_IPW_IRQ_H_REF_3 Violates Advisory Rule 2.5, A project should not contain unused macro declarations.
*
*/
#define Icu_Ipw_SignalMeasurement(hwChannel, activePulseWidth, period, overflow) \
        Icu_SignalMeasurement((Icu_ChannelType)(hwChannel), (activePulseWidth), (period), (overflow))
#endif

#define ICU_STOP_SEC_CODE
/**
* @violates @ref ICU_IPW_IRQ_H_REF_1 Directive 4.10, Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*
* @violates @ref ICU_IPW_IRQ_H_REF_2 Advisory Rule 20.1, #include directives should only be preceded by
* preprocessor directives or comments.
*/
#include "Icu_MemMap.h"
/*==================================================================================================
*                                              ENUMS
==================================================================================================*/


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

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

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

#ifdef __cplusplus
}
#endif

#endif  /* ICU_IPW_IRQ_H */
/** @} */
