/*!
* @file     CDD_Pdl_Cfg.h
*
* @version  1.0.0
*
* @brief    PDL configuration for IntegrationAppCrypto_Dma (DMA + Crypto demo).
*           DEM reporting disabled so Dem module is not required in the link.
*
* Copyright (C) 2026 Geehy Semiconductor
*/

#ifndef CDD_PDL_CFG_H
#define CDD_PDL_CFG_H

#ifdef __cplusplus
extern "C"{
#endif

#include "Mcal.h"

#define PDL_CFG_H_VENDOR_ID                       0x00C1U
#define PDL_CFG_H_AR_RELEASE_MAJOR_VERSION        0x04U
#define PDL_CFG_H_AR_RELEASE_MINOR_VERSION        0x04U
#define PDL_CFG_H_AR_RELEASE_REVISION_VERSION     0x00U
#define PDL_CFG_H_SW_MAJOR_VERSION                0x01U
#define PDL_CFG_H_SW_MINOR_VERSION                0x00U
#define PDL_CFG_H_SW_PATCH_VERSION                0x00U

#ifdef ENABLE_INTERMODULE_MCAL_CHECK
    #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
    #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
    #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
    #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

#define CDD_PDL_DMA_SUPPORT                           (STD_ON)
#define CDD_PDL_DEINIT_API                            (STD_ON)
#define CDD_PDL_VERSION_INFO_API                      (STD_ON)
#define CDD_PDL_DEV_ERR_DETECT_ENABLE                 (STD_ON)

#define PDL_DMA_CH1_ISR_EN
#define PDL_DMA_CH2_ISR_EN
#define PDL_DMA_CH3_ISR_EN
#define PDL_DMA_CH4_ISR_EN
#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

/** STD_ON: do not attach DEM production error reporting (no Dem linkage). */
#define CDD_PDL_DEM_ERR_REP_DISABLE                   (STD_ON)

#define CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT          (STD_ON)
#define CDD_PDL_DMA_GET_CH_ERR_STAT_API               (STD_ON)
#define CDD_PDL_DMA_NOTIFICATION_ENABLE              (STD_ON)

#define PDL_DMA_CONFIG_CHANNELS_COUNT                (1U)

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

#if (STD_ON == CDD_PDL_DMA_SUPPORT)
#if (STD_OFF == CDD_PDL_DEM_ERR_REP_DISABLE)
typedef struct
{
    VAR(Mcal_DemErrorType, PDL_VAR) pdlDmaUnrecognizedError;
} Pdl_DemConfigType;
#endif
#endif

#ifdef __cplusplus
}
#endif

#endif
