/*==================================================================================================
*   Project              : RTD AUTOSAR 4.4
*   Platform             : CORTEXM
*   Peripheral           : ADC_SAR
*   Dependencies         : none
*
*   Autosar Version      : 4.4.0
*   Autosar Revision     : ASR_REL_4_4_REV_0000
*   Autosar Conf.Variant :
*   SW Version           : 0.9.0
*   Build Version        : S32K3_RTD_0_9_0__ASR_REL_4_4_REV_0000_20210326
*
*   (c) Copyright 2020 - 2021 NXP Semiconductors
*   All Rights Reserved.
*
*   NXP Confidential. This software is owned or controlled by NXP and may only be
*   used strictly in accordance with the applicable license terms. By expressly
*   accepting such terms or by downloading, installing, activating and/or otherwise
*   using the software, you are agreeing that you have read, and that you agree to
*   comply with and are bound by, such license terms. If you do not agree to be
*   bound by the applicable license terms, then you may not retain, install,
*   activate or otherwise use the software.
==================================================================================================*/

#ifndef ADC_SAR_IP_DEVICEREGISTERS_H
#define ADC_SAR_IP_DEVICEREGISTERS_H

/**
*   @file
*
*   @addtogroup adc_sar_ip Adc Sar IPL
*   @{
*/

#include "Adc_Sar_Ip_CfgDefines.h"

/* Declare Dev Assert */
#if defined (ADC_SAR_IP_DEV_ERROR_DETECT)
#include "Devassert.h"
#define ADC_SAR_DEV_ASSERT(x) DevAssert(x)
#else
#define ADC_SAR_DEV_ASSERT(x) ((void)0)
#endif /* defined (ADC_SAR_IP_DEV_ERROR_DETECT) */

/*
 * Include the cpu specific register header files.
 *
 * The CPU macro should be declared in the project or makefile.
 */
#if defined(S32G2XX)
    #include "Adc_Sar_Ip_HeaderWrapper_S32G2.h"
#elif defined(S32R45)
    #include "Adc_Sar_Ip_HeaderWrapper_S32R45.h"
#elif defined(S32K3XX)
    #include "Adc_Sar_Ip_HeaderWrapper_S32K3.h"
#else
    #error "Unknown platform!"
#endif

/*==================================================================================================
*                                SOURCE FILE VERSION INFORMATION
==================================================================================================*/
#define ADC_SAR_IP_VENDOR_ID_DEVICEREGISTERS_H                      43
#define ADC_SAR_IP_AR_RELEASE_MAJOR_VERSION_DEVICEREGISTERS_H       4
#define ADC_SAR_IP_AR_RELEASE_MINOR_VERSION_DEVICEREGISTERS_H       4
#define ADC_SAR_IP_AR_RELEASE_REVISION_VERSION_DEVICEREGISTERS_H    0
#define ADC_SAR_IP_SW_MAJOR_VERSION_DEVICEREGISTERS_H               0
#define ADC_SAR_IP_SW_MINOR_VERSION_DEVICEREGISTERS_H               9
#define ADC_SAR_IP_SW_PATCH_VERSION_DEVICEREGISTERS_H               0
/*==================================================================================================
*                                      FILE VERSION CHECKS
==================================================================================================*/

/* Check if Adc Sar Ip Device Registers header file and Adc Sar Ip Configuration Defines header file are of the same vendor */
#if (ADC_SAR_IP_VENDOR_ID_DEVICEREGISTERS_H != ADC_SAR_IP_VENDOR_ID_CFGDEFINES_H)
    #error "Adc_Sar_Ip_DeviceRegisters.h and Adc_Sar_Ip_CfgDefines.h have different vendor ids"
#endif

/* Check if Adc Sar Ip Device Registers header file and Adc Sar Ip Configuration Defines header file are of the same Autosar version */
#if ((ADC_SAR_IP_AR_RELEASE_MAJOR_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_AR_RELEASE_MAJOR_VERSION_CFGDEFINES_H) || \
     (ADC_SAR_IP_AR_RELEASE_MINOR_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_AR_RELEASE_MINOR_VERSION_CFGDEFINES_H) || \
     (ADC_SAR_IP_AR_RELEASE_REVISION_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_AR_RELEASE_REVISION_VERSION_CFGDEFINES_H) \
    )
    #error "AutoSar Version Numbers of Adc_Sar_Ip_DeviceRegisters.h and Adc_Sar_Ip_CfgDefines.h are different"
#endif

/* Check if Adc Sar Ip Device Registers header file and Adc Sar Ip Configuration Defines header file are of the same Software version */
#if ((ADC_SAR_IP_SW_MAJOR_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_SW_MAJOR_VERSION_CFGDEFINES_H) || \
     (ADC_SAR_IP_SW_MINOR_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_SW_MINOR_VERSION_CFGDEFINES_H) || \
     (ADC_SAR_IP_SW_PATCH_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_SW_PATCH_VERSION_CFGDEFINES_H) \
    )
  #error "Software Version Numbers of Adc_Sar_Ip_DeviceRegisters.h and Adc_Sar_Ip_CfgDefines.h are different"
#endif

/* Check if Adc Sar Ip Device Registers header file and Adc Sar Ip Header Wrapper header file are of the same vendor */
#if (ADC_SAR_IP_VENDOR_ID_DEVICEREGISTERS_H != ADC_SAR_IP_VENDOR_ID_HEADERWRAPPER_H)
    #error "Adc_Sar_Ip_DeviceRegisters.h and Adc_Sar_Ip_HeaderWrapper_<Device>.h have different vendor ids"
#endif

/* Check if Adc Sar Ip Device Registers header file and Adc Sar Ip Header Wrapper header file are of the same Autosar version */
#if ((ADC_SAR_IP_AR_RELEASE_MAJOR_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_AR_RELEASE_MAJOR_VERSION_HEADERWRAPPER_H) || \
     (ADC_SAR_IP_AR_RELEASE_MINOR_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_AR_RELEASE_MINOR_VERSION_HEADERWRAPPER_H) || \
     (ADC_SAR_IP_AR_RELEASE_REVISION_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_AR_RELEASE_REVISION_VERSION_HEADERWRAPPER_H) \
    )
    #error "AutoSar Version Numbers of Adc_Sar_Ip_DeviceRegisters.h and Adc_Sar_Ip_HeaderWrapper_<Device>.h are different"
#endif

/* Check if Adc Sar Ip Device Registers header file and Adc Sar Ip Header Wrapper header file are of the same Software version */
#if ((ADC_SAR_IP_SW_MAJOR_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_SW_MAJOR_VERSION_HEADERWRAPPER_H) || \
     (ADC_SAR_IP_SW_MINOR_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_SW_MINOR_VERSION_HEADERWRAPPER_H) || \
     (ADC_SAR_IP_SW_PATCH_VERSION_DEVICEREGISTERS_H != ADC_SAR_IP_SW_PATCH_VERSION_HEADERWRAPPER_H) \
    )
  #error "Software Version Numbers of Adc_Sar_Ip_DeviceRegisters.h and Adc_Sar_Ip_HeaderWrapper_<Device>.h are different"
#endif

/*TODO Version checks with Devassert */

/** @} */

#endif /* ADC_SAR_IP_DEVICEREGISTERS_H */
