/*!
 * @file     CDD_Pdl_PBcfg.c
 *
 * @version  1.0.0
 *
 * @brief    This source file includes the configuration parameters of the Pdl module.
 */

/*******************************************************************************
* Project Name      : AUTOSAR MCAL
* Platform          : Arm
* Autosar Standard  : Classic Platform 4.4.0
* Revision Number   :
* Compiled Version  : G32A10xx_MCAL_1_0_0_01-Otc-25
*
* Copyright (C) 2026 Geehy Semiconductor
*
* You may not use this file except in compliance with the GEEHY COPYRIGHT NOTICE
* (Geehy Semiconductor Software License Agreement).
*
* The program is only for reference, which is distributed in the hope that it
* will be useful and instructional for customers to develop their software.
* Unless required by applicable law or agreed to in writing, the program is
* distributed on an "AS IS" BASIS, WITHOUT ANY WARRANTY OR CONDITIONS OF ANY
* KIND, either express or implied. See the Geehy Semiconductor Software License Agreement for
* the governing permissions and limitations under the License.
*
*******************************************************************************/

#ifdef __cplusplus
extern "C"
{
#endif  /* ifdef __cplusplus */

#include "CDD_Pdl.h"

/**********************************************************************************************************************
                                    VENDOR ID & AUTOSAR VERSION INFO
***********************************************************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define PDL_PBCFG_VENDOR_ID                      0x00C1U
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PDL_PBCFG_AR_RELEASE_MAJOR_VERSION       0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PDL_PBCFG_AR_RELEASE_MINOR_VERSION       0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PDL_PBCFG_AR_RELEASE_REVISION_VERSION    0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */ 
#define PDL_PBCFG_SW_MAJOR_VERSION               0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PDL_PBCFG_SW_MINOR_VERSION               0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PDL_PBCFG_SW_PATCH_VERSION               0x00U

/**********************************************************************************************************************
                                        VERSION INFOMATION VERIFICATION
***********************************************************************************************************************/
/* Make sure the vendor ids are the same between CDD_Pdl_PBcfg.c and CDD_Pdl.h */
#if (PDL_PBCFG_VENDOR_ID != CDD_PDL_H_VENDOR_ID)
#error "Vendor ids mismatch between CDD_Pdl_PBcfg.c and CDD_Pdl.h"
#endif  /* {if (PDL_PBCFG_VENDOR_ID != CDD_PDL_H_VENDOR_ID)} */

/* Make sure the AUTOSAR major version number is the same between CDD_Pdl_PBcfg.c and CDD_Pdl.h */
#if (PDL_PBCFG_AR_RELEASE_MAJOR_VERSION != CDD_PDL_H_AR_RELEASE_MAJOR_VERSION)
#error "AUTOSAR Major Version Numbers mismatch between CDD_Pdl_PBcfg.c and CDD_Pdl.h"
#endif
/* Make sure the AUTOSAR minor version number is the same between CDD_Pdl_PBcfg.c and CDD_Pdl.h */
#if (PDL_PBCFG_AR_RELEASE_MINOR_VERSION != CDD_PDL_H_AR_RELEASE_MINOR_VERSION)
#error "AUTOSAR Minor Version Numbers mismatch between CDD_Pdl_PBcfg.c and CDD_Pdl.h"
#endif
/* Make sure the AUTOSAR revision version number is the same between CDD_Pdl_PBcfg.c and CDD_Pdl.h */
#if (PDL_PBCFG_AR_RELEASE_REVISION_VERSION != CDD_PDL_H_AR_RELEASE_REVISION_VERSION)
#error "AUTOSAR Revision Version Numbers mismatch between CDD_Pdl_PBcfg.c and CDD_Pdl.h"
#endif

/* Make sure the software major version number is the same between CDD_Pdl_PBcfg.c and CDD_Pdl.h */
#if (PDL_PBCFG_SW_MAJOR_VERSION  != CDD_PDL_H_SW_MAJOR_VERSION)
#error "Software Major Version Numbers mismatch between CDD_Pdl_PBcfg.c and CDD_Pdl.h"
#endif
/* Make sure the software minor version number is the same between CDD_Pdl_PBcfg.c and CDD_Pdl.h */
#if (PDL_PBCFG_SW_MINOR_VERSION != CDD_PDL_H_SW_MINOR_VERSION)
#error "Software Minor Version Numbers mismatch between CDD_Pdl_PBcfg.c and CDD_Pdl.h"
#endif
/* Make sure the software patch version number is the same between CDD_Pdl_PBcfg.c and CDD_Pdl.h */
#if (PDL_PBCFG_SW_PATCH_VERSION != CDD_PDL_H_SW_PATCH_VERSION)
#error "Software Patch Version Numbers mismatch between CDD_Pdl_PBcfg.c and CDD_Pdl.h"
#endif

/**********************************************************************************************************************
                                            MACRO DEFINITION
***********************************************************************************************************************/

/**********************************************************************************************************************
                                              FUNCTION DECLARATION
***********************************************************************************************************************/

#define PDL_START_SEC_CODE
#include "Pdl_MemMap.h"

#if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)
/* The notification callback of the DMA Channel Transfer Completion */
extern FUNC(void, PDL_CODE) Dma_Channel1CompletionNotificaiton(void);
/* The notification callback of the DMA Channel Transfer Completion */
extern FUNC(void, PDL_CODE) Dma_Channel5CompletionNotificaiton(void);

#endif  /* {if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)} */

#if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)
/* The notification callback of the DMA Channel Transfer Completion */
extern FUNC(void, PDL_CODE) Dma_Channel5ErrNotificaiton(void);
#endif  /* {if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)} */

#define PDL_STOP_SEC_CODE
#include "Pdl_MemMap.h"

#define PDL_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "Pdl_MemMap.h"

#include "Adc.h"


#if (STD_ON == CDD_PDL_DMA_SUPPORT)

/** The configurations of the Dma channels */
static CONST(Pdl_DmaChConfigType, PDL_CONST) g_pdlDmaChannelConfig[PDL_DMA_CONFIG_CHANNELS_COUNT] =
{
    /* DMA_CH1:DMAChannel_0 */
    {
        DMA_CH_TC_INT_DISABLE | DMA_CH_HT_INT_DISABLE | DMA_CH_TE_INT_DISABLE,
        /* The DMA hardware channel */
        (Pdl_DmaChType)DMA_HW_CH1
#if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)
        ,        
        Adc_DmaChannel1CompletionNotificaiton //&Dma_Channel1CompletionNotificaiton  /* The DMA transport completed notification function */
#endif  /* {if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)} */

#if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)
        ,
        NULL_PTR  /** DMA error notification callback function(user definition) */

#endif  /* {if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)} */
    },
};

/** The configuration of the DMA hardware,including the Control Register and the Channel Priorities. */
static CONST(Pdl_DmaConfigType, PDL_CONST) g_dmaConfig =
{
    /* The count of configured DMA channels. */
    PDL_DMA_CONFIG_CHANNELS_COUNT,
    /* The pointer of the DMA channel configuration */
    &g_pdlDmaChannelConfig
};

/** The basic configuration of the Dma module. */
static CONST(Pdl_DmaHwInitConfigType, PDL_CONST) g_pdlDmaHwConfig =
{
    /* The hardware configuration of the Pdl driver */
    &g_dmaConfig
};

#endif  /* {if (STD_ON == CDD_PDL_DMA_SUPPORT)} */

#if (STD_ON == CDD_PDL_DMA_SUPPORT)
#if (STD_OFF == CDD_PDL_DEM_ERR_REP_DISABLE)
/**
 * @brief    The configuration of the DEM error reporting 
 */
static CONST(Pdl_DemConfigType, PDL_CONST) g_pdlDemConfig =
{
    /* PDL_DMA_UNRECOGNIZED_ERROR */
    {(uint32)STD_OFF, (uint16)0U},
};

#endif  /* {if (STD_OFF == CDD_PDL_DEM_ERR_REP_DISABLE)} */
#endif  /* {if (STD_ON == CDD_PDL_DMA_SUPPORT)} */

/** The basic configuration of the Pdl driver. */
CONST(Pdl_ConfigType, PDL_CONST) g_pdlConfig =
{
#if (STD_ON == CDD_PDL_DMA_SUPPORT)
#if (STD_OFF == CDD_PDL_DEM_ERR_REP_DISABLE)
    &g_pdlDemConfig,
#endif

    &g_pdlDmaHwConfig,
#endif
};

#define PDL_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "Pdl_MemMap.h"

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