/*!
 * @file     CDD_Pdl_Cfg.h
 *
 * @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.
*
*******************************************************************************/

#ifndef CDD_PDL_CFG_H
#define CDD_PDL_CFG_H

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

#include "Mcal.h"

/**********************************************************************************************************************
                                    VENDOR ID & AUTOSAR VERSION INFO
***********************************************************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define PDL_CFG_H_VENDOR_ID                       0x00C1U
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PDL_CFG_H_AR_RELEASE_MAJOR_VERSION        0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PDL_CFG_H_AR_RELEASE_MINOR_VERSION        0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PDL_CFG_H_AR_RELEASE_REVISION_VERSION     0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PDL_CFG_H_SW_MAJOR_VERSION                0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PDL_CFG_H_SW_MINOR_VERSION                0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PDL_CFG_H_SW_PATCH_VERSION                0x00U

/**********************************************************************************************************************
                                        VERSION INFOMATION VERIFICATION
***********************************************************************************************************************/
#ifdef ENABLE_INTERMODULE_MCAL_CHECK
    /* Make sure the AUTOSAR major version number is the same between CDD_Pdl_Cfg.h and Mcal.h */
    #if (PDL_CFG_H_AR_RELEASE_MAJOR_VERSION != MCAL_H_AR_RELEASE_MAJOR_VERSION)
    #error "AUTOSAR Major Version Numbers mismatch between CDD_Pdl_Cfg.h and Mcal.h"
    #endif
    /* Make sure the AUTOSAR minor version number is the same between CDD_Pdl_Cfg.h and Mcal.h */
    #if (PDL_CFG_H_AR_RELEASE_MINOR_VERSION != MCAL_H_AR_RELEASE_MINOR_VERSION)
    #error "AUTOSAR Minor Version Numbers mismatch between CDD_Pdl_Cfg.h and Mcal.h"
    #endif
#endif  /* ifdef ENABLE_INTERMODULE_MCAL_CHECK */

#ifdef ENABLE_INTERMODULE_MCAL_CHECK
    /* Make sure the AUTOSAR major version number is the same between CDD_Pdl_Cfg.h and modules.h */
    #if (PDL_CFG_H_AR_RELEASE_MAJOR_VERSION != MODULES_H_AR_RELEASE_MAJOR_VERSION)
    #error "AUTOSAR Major Version Numbers mismatch between CDD_Pdl_Cfg.h and modules.h"
    #endif
    /* Make sure the AUTOSAR minor version number is the same between CDD_Pdl_Cfg.h and modules.h */
    #if (PDL_CFG_H_AR_RELEASE_MINOR_VERSION != MODULES_H_AR_RELEASE_MINOR_VERSION)
    #error "AUTOSAR Minor Version Numbers mismatch between CDD_Pdl_Cfg.h and modules.h"
    #endif
#endif  /* ifdef ENABLE_INTERMODULE_MCAL_CHECK */

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

/** Enable/disable the Dma driver. */
#define CDD_PDL_DMA_SUPPORT                           (STD_ON)

/** Adds/removes the service Pdl_DeInit() from the code. */
#define CDD_PDL_DEINIT_API                            (STD_ON)

/** Switch to indicate that the API of getting version information is supported. */
#define CDD_PDL_VERSION_INFO_API                      (STD_ON)

/** Enable/disable the development error detection and notification. */
#define CDD_PDL_DEV_ERR_DETECT_ENABLE                 (STD_OFF)

/** The Dma channel 1 interrupt enabled */
#define PDL_DMA_CH1_ISR_EN 
/** The Dma channel 2 interrupt enabled */
#define PDL_DMA_CH2_ISR_EN 
/** The Dma channel 3 interrupt enabled */
#define PDL_DMA_CH3_ISR_EN 
/** The Dma channel 4 interrupt enabled */
#define PDL_DMA_CH4_ISR_EN 
/** The Dma channel 5 interrupt enabled */
#define PDL_DMA_CH5_ISR_EN 

#define PDL_DMA_CH1_ERR_ISR_EN
#define PDL_DMA_CH2_ERR_ISR_EN
#define PDL_DMA_CH3_ERR_ISR_EN
#define PDL_DMA_CH4_ERR_ISR_EN
#define PDL_DMA_CH5_ERR_ISR_EN

/** Enable/disable the production error reporting */
#define CDD_PDL_DEM_ERR_REP_DISABLE                   (STD_OFF)

/** Enable/disable the notification when the Dma detecting errors */
#define CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT          (STD_OFF)

/** Adds/removes the service Pdl_TopDmaChErrStsGet() from the code */
#define CDD_PDL_DMA_GET_CH_ERR_STAT_API               (STD_ON)

/** Enable/disable the Dma transfer completion notification */
#define CDD_PDL_DMA_NOTIFICATION_ENABLE              (STD_OFF)

#define PDL_DMA_CONFIG_CHANNELS_COUNT                (2U)

#define PDL_CONFIGURATION_POSTBUILD \
    extern CONST(Pdl_ConfigType, PDL_CONST) g_pdlConfig;

/**********************************************************************************************************************
                                             OTHER TYPE DEFINITION
***********************************************************************************************************************/
#if (STD_ON == CDD_PDL_DMA_SUPPORT)
#if (STD_OFF == CDD_PDL_DEM_ERR_REP_DISABLE)
/**
 * @brief   The configuration of the DEM error.
 */
typedef struct
{
    VAR(Mcal_DemErrorType, PDL_VAR) pdlDmaUnrecognizedError;
} Pdl_DemConfigType;



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

#ifdef __cplusplus
}
#endif  /* ifdef __cplusplus */
#endif  /* ifndef CDD_PDL_CFG_H */

