/**********************************************************************************************************************
 *  COPYRIGHT
 *  -------------------------------------------------------------------------------------------------------------------
 *  \verbatim
 *
 *                 TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION
 *
 *                 Property of Texas Instruments, Unauthorized reproduction and/or distribution
 *                 is strictly prohibited.  This product  is  protected  under  copyright  law
 *                 and  trade  secret law as an  unpublished work.
 *                 (C) Copyright Texas Instruments - 2014.  All rights reserved.
 *
 *  \endverbatim
 *  -------------------------------------------------------------------------------------------------------------------
 * 
 *  -------------------------------------------------------------------------------------------------------------------
 *  FILE DESCRIPTION
 *  -------------------------------------------------------------------------------------------------------------------
 *         File:  Adc.h
 *    Component:  Tms570_AutosarAdcDriver
 *       Module:  AdcDriver
 *    Generator:  None
 *
 *  Description:  The ADC driver is responsible for controlling the analog-digital converter and for accessing the 
 *                results of a conversion. In detail it initializes the converter, provides services for starting
 *                and ending a conversion, and for selecting the trigger source and trigger condition.
 * ---------------------------------------------------------------------------------------------------------------------
 * Author:  Vishwanath Reddy
 *---------------------------------------------------------------------------------------------------------------------
 * Revision History
 *---------------------------------------------------------------------------------------------------------------------
 * Version        Date         Author               Change ID        Description
 *---------------------------------------------------------------------------------------------------------------------
 * 02.21.00       30Sep2014    Vishwanath Reddy     SDOCM00113127    Initial Version 
 * 02.21.01       23Aug2016    Vishwanath Reddy     SDOCM00121248    ADC_SW_PATCH_VERSION updated.
 *                                                                   adc_cfg.h and adc_cfg.c files changes to make XDM
 *                                                                   file AS4.0.3 compliant.
 * 02.30.00       01Dec2016    Sudhakar Singh           None         Update version info
 * 05.30.00       15Mar2017    Sudhakar Singh       SDOCM00122834    Version supports TMS570LSxx Family of Devices.
 *********************************************************************************************************************/



#ifndef ADC_H
#define ADC_H
#include "Std_Types.h"
/**********************************************************************************************************************
 *  GLOBAL CONSTANT MACROS
 *********************************************************************************************************************/

 /* Vendor and module identification */
#define ADC_VENDOR_ID                            ((uint16)44U)
#define ADC_MODULE_ID                            ((uint16)123U)
#define ADC_INSTANCE_ID   						 ((uint8)0U)

/* AUTOSAR Software Specification Version Information */
#define ADC_AR_RELEASE_MAJOR_VERSION       (0x04U)
#define ADC_AR_RELEASE_MINOR_VERSION       (0x00U)
#define ADC_AR_RELEASE_REVISION_VERSION    (0x03U)

/* Component Version Information */
#define ADC_SW_MAJOR_VERSION               (5U)              
#define ADC_SW_MINOR_VERSION               (30U)                   
#define ADC_SW_PATCH_VERSION               (0U)                    

/* SourceId : ADC_SourceId_021 */
/* DesignId : ADC_DesignId_001 */
/* Requirements : AR_ADC_SR49, AR_ADC_SR50  */
/* Error Codes in Development-Mode */
/* This error is raised when an API function is called, which needs an initialized ADC. */
#ifndef ADC_E_UNINIT
#define ADC_E_UNINIT                             ((uint8)0x0AU)
#endif
/* An API function can not be called because of an ongoing process. */
#ifndef ADC_E_BUSY
#define ADC_E_BUSY                               ((uint8)0x0BU)
#endif
/* This error is raised when an API function is called, which needs an ongoing or completed conversion. */
#ifndef ADC_E_IDLE
#define ADC_E_IDLE                               ((uint8)0x0CU)
#endif
/* This error is raised when Adc_Init() is called when the module is already initialized. */
#ifndef ADC_E_ALREADY_INITIALIZED
#define ADC_E_ALREADY_INITIALIZED                ((uint8)0x0DU)
#endif
/* This error is raised when Adc_Init() has been called with a NULL_PTR. */
#ifndef ADC_E_PARAM_CONFIG
#define ADC_E_PARAM_CONFIG                       ((uint8)0x0EU)
#endif
/* This error is raised when Adc_SetupResultBuffer or Adc_GetVersionInfo called with invalid data buffer pointer. */
#ifndef ADC_E_PARAM_POINTER
#define ADC_E_PARAM_POINTER                      ((uint8)0x14U)
#endif
/* This error is raised when an API function is called with an invalid group ID. */
#ifndef ADC_E_PARAM_GROUP
#define ADC_E_PARAM_GROUP                        ((uint8)0x15U)
#endif
/* This error is raised when API function Adc_EnableHardwareTrigger or Adc_DisableHardwareTrigger is called
 * for a group with continuous conversion mode. */
#ifndef ADC_E_WRONG_CONV_MODE
#define ADC_E_WRONG_CONV_MODE                    ((uint8)0x16U)
#endif
/* This error is raised when a trigger-specific API function is called for group with wrong trigger source. 
 * For example EnableHardwareTrigger() is called for a software triggered group. */
#ifndef ADC_E_WRONG_TRIGG_SRC
#define ADC_E_WRONG_TRIGG_SRC                    ((uint8)0x17U)
#endif
/* This error is raised when Adc_EnableNotificationFunction or Adc_DisableNotificationFunction is called for a 
 * group whose configuration set has no notification available. */
#ifndef ADC_E_NOTIF_CAPABILITY
#define ADC_E_NOTIF_CAPABILITY                   ((uint8)0x18U)
#endif
/* This error is raised when a conversion is started but the result buffer has not been initialized before. */
#ifndef ADC_E_BUFFER_UNINIT
#define ADC_E_BUFFER_UNINIT                      ((uint8)0x19U)
#endif
/* This error is raised when Adc_ReadGroup() is called with parameter DataBufferPtr referencing NULL_PTR. */
#ifndef ADC_E_PARAM_READ_BUFFER
#define ADC_E_PARAM_READ_BUFFER                  ((uint8)0x1AU)
#endif
/* This error is raised when Adc_GetStreamLastPointer() is called with parameter PtrToSamplePtr referencing NULL_PTR. */
#ifndef ADC_E_PARAM_STREAM_PTR
#define ADC_E_PARAM_STREAM_PTR                   ((uint8)0x1CU)
#endif


/* Adc Service Identification */
#define ADC_SID_INIT                             ((uint8)0x00U)
#define ADC_SID_SETUP_RESULT_BUFFER              ((uint8)0x0CU)
#define ADC_SID_DEINIT                           ((uint8)0x01U)
#define ADC_SID_START_GROUP_CONVERSION           ((uint8)0x02U)
#define ADC_SID_STOP_GROUP_CONVERSION            ((uint8)0x03U)
#define ADC_SID_READ_GROUP                       ((uint8)0x04U)
#define ADC_SID_ENABLE_HARDWARE_TRIGGER          ((uint8)0x05U)
#define ADC_SID_DISABLE_HARDWARE_TRIGGER         ((uint8)0x06U)
#define ADC_SID_ENABLE_GROUP_NOTIFICATION        ((uint8)0x07U)
#define ADC_SID_DISABLE_GROUP_NOTIFICATION       ((uint8)0x08U)
#define ADC_SID_GET_GROUP_STATUS                 ((uint8)0x09U)
#define ADC_SID_GET_STREAM_LAST_POINTER          ((uint8)0x0BU)
#define ADC_SID_GET_VERSION_INFO                 ((uint8)0x0AU)


/**********************************************************************************************************************
 *  GLOBAL DATA TYPES AND STRUCTURES
 *********************************************************************************************************************/ 
/* Number of samples (full channel sets) in buffer. */
typedef uint8  Adc_ThresholdType;

/* Numeric ID of an ADC channel group. Range: 0-254, 255 is reserved for ADC_INVALID_GRP_ID */
typedef uint8  Adc_GroupType;

/* Type for reading the converted values of a channel group (raw, without further scaling, right aligned). */
typedef uint16 Adc_ValueGroupType;

/* Type of clock input for the conversion unit to select different clock sources or event pin trigger. 0u selects
 * event pin, 1u - 7u internal timers.  */
typedef uint8  Adc_ClockSourceType;

/* Type of clock prescaler factor. Only bits 4:0 are in use. */
typedef uint8  Adc_PrescaleType;

/* Type of sampling time, i.e. the time during which the value is sampled (in clockcycles). Only bits 11:0 are in use.*/
typedef uint16 Adc_SamplingTimeType;

/* Type of channel resolution in number of bits. Valid values: 8, 10 and 12 */
typedef uint8  Adc_ResolutionType;

/* Current status of the conversion of the requested ADC Channel group. */
typedef enum
{
  ADC_IDLE,
  ADC_BUSY,
  ADC_COMPLETED,
  ADC_STREAM_COMPLETED
} Adc_StatusType;

/* Type for configuring the trigger source for an ADC Channel group. */
typedef enum
{
  ADC_TRIGG_SRC_SW,
  ADC_TRIGG_SRC_HW
} Adc_TriggerSourceType;

/* Type for configuring the conversion mode of an ADC Channel group. */
typedef enum
{
  ADC_CONV_MODE_ONESHOT,
  ADC_CONV_MODE_CONTINUOUS
} Adc_GroupConvModeType;

/* Priority level of the channel. Lowest priority is 0. */
typedef uint8  Adc_GroupPriorityType;

/* Type of assignment of channels to a channel group. A 32 bit variable: bit number n is set if channel n is member 
 * of this group */
typedef uint32 Adc_GroupDefType; 

/* Type for configuring the number of group conversions in streaming access mode (in single access mode, 
 * parameter is 1). */
typedef uint16  Adc_StreamNumSampleType;

/* Numeric ID of an ADC Hw Unit. */
typedef uint8  Adc_HwUnitType;

/* Type for configuring the streaming access mode buffer type. */
typedef enum
{
  ADC_STREAM_BUFFER_LINEAR,
  ADC_STREAM_BUFFER_CIRCULAR
} Adc_StreamBufferModeType;

/* Type for configuring the access mode to group conversion results. */
typedef enum
{
  ADC_ACCESS_MODE_SINGLE,
  ADC_ACCESS_MODE_STREAMING
} Adc_GroupAccessModeType;

/* Type for configuring on which edge of the hardware trigger signal the driver should start the conversion. */
typedef enum
{
  ADC_HW_TRIG_RISING_EDGE,
  ADC_HW_TRIG_FALLING_EDGE,
  ADC_HW_TRIG_BOTH_EDGES
} Adc_HwTriggerSignalType;

/* Type for the value of the ADC module embedded timer. 0u is for event pin trigger, 1u-7u is for internal timers */
typedef uint8  Adc_HwTriggerTimerType;

/* Type for configuring the prioritization mechanism. */ 
typedef enum
{
  ADC_PRIORITY_NONE,
  ADC_PRIORITY_HW,
  ADC_PRIORITY_HW_SW
} Adc_PriorityImplementationType;

/* Type for configuring the Result Alignment Type. */ 
typedef enum
{
  ADC_ALIGN_LEFT,
  ADC_ALIGN_RIGHT  
} Adc_ResultAlignmentType;

/* Replacement mechanism, which is used on ADC group level, if a group conversion is interrupted by a 
 * group with higher priority.  */
typedef enum
{
  ADC_GROUP_REPL_ABORT_RESTART,
  ADC_GROUP_REPL_SUSPEND_RESUME
} Adc_GroupReplacementType;

/* Reference type for Adc_ValueGroupType */
typedef P2VAR(Adc_ValueGroupType,    AUTOMATIC, ADC_APPL_DATA) Adc_ValueGroupRefType;

/* Reference on a reference on Adc_ValueGroupType */
typedef P2VAR(Adc_ValueGroupRefType, AUTOMATIC, ADC_APPL_DATA) Adc_ValueGroupRefRefType;

/* This type is for storing runtime variables of each group (RAM) */
typedef struct
{
  Adc_ValueGroupRefType     ResultBuffer_pt;        /* Pointer to the result buffer provided by the user */ 
  Adc_StreamNumSampleType   SampleCountdown_t;      /* Responsible for buffer processing, e.g. wrapping around buffer */ 
  Adc_StreamNumSampleType   ValidSampleCount_t;     /* Contains the number of vaild samples, that are curr. in buffer */
  Adc_StatusType            Status_t;               /* Contains the current status of the group */        
  Adc_ThresholdType         Threshold_t;            /* Number of SAMPLES, which have to be copied from fifo to buffer */
  uint8                     Notification_u8;        /* Status of the notification function */
} Adc_GroupDataType;

/* Reference type for Adc_GroupDataType */
typedef P2VAR(Adc_GroupDataType, AUTOMATIC, ADC_VAR) Adc_GroupDataRefType;
/* Type for notification function pointer */
typedef P2FUNC(void, ADC_APPL_CODE, Adc_NotifFuncPtrType) (void);

/* Create a pointer on incomplete type Adc_GroupConfigDefType for forward referencing Adc_GroupConfigDefType in 
 * ProcessFunctions below. 
 */
typedef const struct P2VAR(Adc_GroupConfigDefType, AUTOMATIC, ADC_PBCFG) Adc_GroupConfigDefPtrType;

/* Type for Adc_ProcessBuffer function pointer */
typedef P2FUNC(void, ADC_CODE, Adc_ProcessBufferFuncPtrType) (Adc_GroupConfigDefPtrType GroupConfigPtr);
/* Type for Adc_ProcessConversion function pointer */
typedef P2FUNC(void, ADC_CODE, Adc_ProcessConvFuncPtrType) (Adc_GroupConfigDefPtrType GroupConfigPtr);

typedef P2VAR(uint32, AUTOMATIC, ADC_VAR) Adc_RegisterRefType;
/* This struct type is for group specific register access. Each hw group has the same registers (e.g. a channel select
 * register) with the same distances between each other. The purpose of this struct is to easily access this registers.
 * Therefore use a pointer to this struct at the group base address. The group base address is: 
 * Hardware_Unit_Register_Base_Adress + Group_Offset
 * 
 * with group offset = 0x00 for group EV
 *                   = 0x04 for group G1
 *                   = 0x08 for group G2
 */
typedef struct
{
  uint32 Reserved00;       /* group base */
  uint32 Reserved01;       /* Offset: 0x004 */ 
  uint32 Reserved02;       /* Offset: 0x008 */ 
  uint32 Reserved03;       /* Offset: 0x00C */
  uint32 ModeCtrlReg;      /* Offset: 0x010 */ 
  uint32 Reserved04;       /* Offset: 0x014 */ 
  uint32 Reserved05;       /* Offset: 0x018 */
  uint32 SourceReg;        /* Offset: 0x01C */
  uint32 Reserved06;       /* Offset: 0x020 */
  uint32 Reserved07;       /* Offset: 0x024 */
  uint32 IntEnaReg;        /* Offset: 0x028 */
  uint32 Reserved08;       /* Offset: 0x02C */
  uint32 Reserved09;       /* Offset: 0x030 */
  uint32 IntFlgReg;        /* Offset: 0x034 */
  uint32 Reserved10;       /* Offset: 0x038 */
  uint32 Reserved11;       /* Offset: 0x03C */
  uint32 IntThrReg;        /* Offset: 0x040 */
  uint32 Reserved12;       /* Offset: 0x044 */
  uint32 Reserved13;       /* Offset: 0x048 */
  uint32 DmaCtrlReg;       /* Offset: 0x04C */
  uint32 Reserved14;       /* Offset: 0x050 */
  uint32 Reserved15;       /* Offset: 0x054 */
  uint32 Reserved16;       /* Offset: 0x058 */
  uint32 Reserved17;       /* Offset: 0x05C */
  uint32 SampTimeReg;      /* Offset: 0x060 */
  uint32 Reserved18;       /* Offset: 0x064 */
  uint32 Reserved19;       /* Offset: 0x068 */
  uint32 StatusReg;        /* Offset: 0x06C */
  uint32 Reserved20;       /* Offset: 0x070 */
  uint32 Reserved21;       /* Offset: 0x074 */
  uint32 ChSelectReg;      /* Offset: 0x078 */
} Adc_RegType;


/* This type is for storing post-build configured group variables (ROM) */
struct Adc_GroupConfigDefType
{
  Adc_GroupDefType              GroupDefinition_t;              /* Bit number n of this variable is set if channel n 
                                                                 * belongs to this group.*/
  volatile Adc_GroupDataRefType GroupData_pt;                   /* Pointer to the runtime variables of this group */
  P2VAR(Adc_RegType, AUTOMATIC, MSR_REGSPACE) HwGroupBase_pt;   /* Base address of the hw group on which this group is
                                                                 * going to be mapped. This is the base address of the
                                                                 * hw unit plus an offset for the group:
                                                                 * Base + 0x00, 0x04 or 0x08 for hardware event group,
                                                                 * group1 and group2. */
  P2VAR(uint32, AUTOMATIC, MSR_REGSPACE) HwFifoBuffer_p;        /* Pointer to the fifo buffer read register. This
                                                                 * pointer depends on the hw UNIT base address and
                                                                 * on the offset of the hardware group on which this
                                                                 * group is going to be mapped. */
  CONST(Adc_NotifFuncPtrType, ADC_PBCFG)         Notification_p[2U];   /* Pointers to notification functions */
  CONST(Adc_ProcessBufferFuncPtrType, ADC_PBCFG) ProcessBuffer_p;     /* Ptr to buffer processing function. */
  CONST(Adc_ProcessConvFuncPtrType, ADC_PBCFG)   ProcessConversion_p; /* Ptr to function that is called after buffer
                                                                       * read.*/
  Adc_SamplingTimeType          GroupSampTime_t;                /* Sampling time (only 12 bits in use) */
  Adc_StreamNumSampleType       StreamingNumSamples_t;          /* Contains how many samples fit into result buffer */
  Adc_GroupConvModeType         GroupConversionMode_t;          /* Operation mode of the group */
  Adc_TriggerSourceType         GroupTriggSrc_t;                /* Determines the trigger source (hw or sw trigger) */
  Adc_GroupAccessModeType       GroupAccessMode_t;              /* Defines the type of the groups buffer */
  Adc_StreamBufferModeType      StreamingBufferMode_t;          /* Use linear or circular stream buffer */
  Adc_HwTriggerSignalType       HwTrigSignal_t;                 /* Use rising or falling edge for event pin trigger */
  Adc_ThresholdType             GroupThreshold_t;               /* Number of samples in fifo, after which a threshold 
                                                                 * interrupt is triggered. The result of
                                                                 * GroupThreshold * NumberOfGroupChannels_u8 has to be 
                                                                 * less than the fifo buffer size. */
  Adc_ResolutionType            GroupResolution_t;              /* Group resolution (coded) */
  Adc_HwUnitType                GroupHwUnitId_t;                /* Numeric Id of an Adc hw unit. */
  Adc_HwTriggerTimerType        GroupHwTriggerTimer_t;          /* Hardware trigger event: Zero when group is triggered
                                                                 * by event pin; 1-7 for internal timers */
  uint8                         GroupHwGroupId_u8;              /* Contains on which physical group this group has to 
                                                                 * be mapped. Use only the indices defined above 
                                                                 * (e.g. HW_GROUP_EVT) */
  uint8                         NumberOfGroupChannels_u8;       /* The number of channels of a group */
  uint8                         GroupStopMode_u8;               /* Determines whether the group stops implicitly or has
                                                                 * to be stopped by the user */
} ;

typedef struct Adc_GroupConfigDefType Adc_GroupConfigType;

/* This type is for storing post-build configured hw unit variables (ROM) */
typedef struct
{
  uint32                    FifoBndA_u32;           /* Watch out! FifoBndA * 2 = event group fifo size in words */
  uint32                    FifoBndB_u32;           /* Has to be greater than FifoBndA. */
  Adc_RegisterRefType       HwUnitBase_pu32;        /* The register base address of this hw unit */
  Adc_PrescaleType          Prescale_t;             /* Only five bits in use */
} Adc_HwUnitConfigType;

typedef P2CONST(Adc_GroupConfigType, AUTOMATIC, ADC_PBCFG)   Adc_GroupConfigRefType;
typedef P2CONST(Adc_HwUnitConfigType, AUTOMATIC, ADC_PBCFG)  Adc_HwUnitConfigRefType;

/* Data structure containing the set of configuration parameters required for initializing the ADC Driver 
 * and ADC HW Unit(s).
 */
typedef struct
{
  Adc_HwUnitConfigRefType   HwUnit_at;              /* References the array of hw units */
  Adc_GroupConfigRefType    Group_at;               /* References the array of groups */
  Adc_HwUnitType            NumberOfHwUnits_t;      /* Contains the number of hw units configured */
  Adc_GroupType             NumberOfGroups_t;       /* Contains the number of groups configured */
} Adc_ConfigType;


/* Reference type for Adc_ConfigType. */
typedef P2CONST(Adc_ConfigType, AUTOMATIC, ADC_PBCFG) Adc_ConfigRefType; 

/* Structure used to contain Published Information */
typedef struct
{
   boolean    AdcChannelValueSigned;                 /* Information whether the result value of the ADC driver has sign
                                                        information (true) or not (false). */                                                     
   boolean   AdcGroupFirstChannelFixed;              /* Information whether the first channel of an ADC Channel group 
                                                        can be configured (false) or is fixed (true) to a value 
														determined by the ADC HW Unit. */                                                     
   uint8   AdcMaxChannelResolution;                  /* Maximum Channel resolution in bits */   
} Adc_PublishedInformationType;

/**********************************************************************************************************************
 * INCLUDES
 *********************************************************************************************************************/
#include "Adc_Cfg.h"

/**********************************************************************************************************************
 *  GLOBAL DATA TYPES AND STRUCTURES
 *********************************************************************************************************************/
#if(STD_ON == ADC_SAFETI_API)
/* ADC Config registers */
typedef struct Adc_AdcConfigRegTag
{
	uint32              Adc_ReaBack_OpModeCtrlReg;               /* Operation mode control register */
	uint32              Adc_ReaBack_FifoEndCtrlReg;              /* Control register for Fifo size */
	uint32              Adc_ReaBack_FifoBoundCtrlReg;            /* Fifo Boundary control register */
	uint32              Adc_ReaBack_PrescaleCtrlReg;             /* Clock prescale control register */
} Adc_AdcConfigReg;
extern Adc_AdcConfigReg Adc_AdcConfig;
#endif

/**********************************************************************************************************************
 *  GLOBAL FUNCTION PROTOTYPES
 *********************************************************************************************************************/
/* Declarations of API functions */
FUNC(void, ADC_CODE) Adc_Init(P2CONST(Adc_ConfigType, AUTOMATIC, ADC_PBCFG) ConfigPtr);  
FUNC(Std_ReturnType, ADC_CODE) Adc_SetupResultBuffer(Adc_GroupType Group,Adc_ValueGroupRefType DataBufferPtr);
FUNC(Adc_StatusType, ADC_CODE) Adc_GetGroupStatus(Adc_GroupType Group);
FUNC(Adc_StreamNumSampleType, ADC_CODE) Adc_GetStreamLastPointer(Adc_GroupType Group,Adc_ValueGroupRefRefType PtrToSamplePtr);

#if (STD_ON == ADC_DEINIT_API)
  FUNC(void, ADC_CODE) Adc_DeInit(void);
#endif

#if (STD_ON == ADC_ENABLE_START_STOP_GROUP_API)
  FUNC(void, ADC_CODE) Adc_StartGroupConversion(Adc_GroupType Group);
  FUNC(void, ADC_CODE) Adc_StopGroupConversion(Adc_GroupType Group);
#endif

#if (STD_ON == ADC_READ_GROUP_API)
  FUNC(Std_ReturnType, ADC_CODE) Adc_ReadGroup(Adc_GroupType Group, Adc_ValueGroupRefType DataBufferPtr);
#endif

#if (STD_ON == ADC_HW_TRIGGER_API)
  FUNC(void, ADC_CODE) Adc_EnableHardwareTrigger(Adc_GroupType Group);
  FUNC(void, ADC_CODE) Adc_DisableHardwareTrigger(Adc_GroupType Group);
#endif

#if (STD_ON == ADC_GRP_NOTIF_CAPABILITY)
  FUNC(void, ADC_CODE) Adc_EnableGroupNotification(Adc_GroupType Group);
  FUNC(void, ADC_CODE) Adc_DisableGroupNotification(Adc_GroupType Group);
#endif

#if (STD_ON == ADC_VERSION_INFO_API)
  FUNC(void, ADC_CODE)  Adc_GetVersionInfo(P2VAR(Std_VersionInfoType, AUTOMATIC, ADC_APPL_DATA) versioninfo);
#endif

#if(STD_ON == ADC_SAFETI_API)
  FUNC(Std_ReturnType, ADC_CODE) Adc_ConfigRegReadBack(VAR(uint32, AUTOMATIC) Adc_HwUnitId);
#endif

#if (STD_ON ==  ADC_SELF_TEST_ENABLE)
  FUNC(void, ADC_CODE) Adc_StartConversionSelfTest(Adc_GroupType group);
  FUNC(Std_ReturnType, ADC_CODE) Adc_SelfTestPerform(Adc_GroupType group,uint8 *result);
#endif

#if (STD_ON ==  ADC_CALIBRATE_FUNCTION_ENABLE)
  FUNC(Std_ReturnType, ADC_CODE) Adc_CalibrateFunction(uint32 Adc_HwUnitId);
#endif

#endif  /* ADC_H */
  
/**********************************************************************************************************************
 *  END OF FILE: Adc.h
 *********************************************************************************************************************/

