/*!
* @file     CDD_Pdl_PBcfg.c
*
* @brief    PDL post-build configuration for IntegrationAppCrypto_Dma.
*
* Copyright (C) 2026 Geehy Semiconductor
*/

#ifdef __cplusplus
extern "C"
{
#endif

#include "CDD_Pdl.h"

#define PDL_PBCFG_VENDOR_ID                      0x00C1U
#define PDL_PBCFG_AR_RELEASE_MAJOR_VERSION       0x04U
#define PDL_PBCFG_AR_RELEASE_MINOR_VERSION       0x04U
#define PDL_PBCFG_AR_RELEASE_REVISION_VERSION    0x00U
#define PDL_PBCFG_SW_MAJOR_VERSION               0x01U
#define PDL_PBCFG_SW_MINOR_VERSION               0x00U
#define PDL_PBCFG_SW_PATCH_VERSION               0x00U

#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_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
#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
#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
#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
#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
#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

#define PDL_START_SEC_CODE
#include "Pdl_MemMap.h"

#if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)
extern FUNC(void, PDL_CODE) Dma_Channel1CompletionNotificaiton(void);
#endif

#if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)
extern FUNC(void, PDL_CODE) Dma_Channel5ErrNotificaiton(void);
#endif

#define PDL_STOP_SEC_CODE
#include "Pdl_MemMap.h"

#define PDL_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "Pdl_MemMap.h"

#if (STD_ON == CDD_PDL_DMA_SUPPORT)

static CONST(Pdl_DmaChConfigType, PDL_CONST) g_pdlDmaChannelConfig[PDL_DMA_CONFIG_CHANNELS_COUNT] =
{
    {
        DMA_CH_TC_INT_ENABLE | DMA_CH_HT_INT_ENABLE | DMA_CH_TE_INT_ENABLE,
        (Pdl_DmaChType)DMA_HW_CH1
#if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)
        ,
        &Dma_Channel1CompletionNotificaiton
#endif
#if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)
        ,
        NULL_PTR
#endif
    }
};

static CONST(Pdl_DmaConfigType, PDL_CONST) g_dmaConfig =
{
    PDL_DMA_CONFIG_CHANNELS_COUNT,
    &g_pdlDmaChannelConfig
};

static CONST(Pdl_DmaHwInitConfigType, PDL_CONST) g_pdlDmaHwConfig =
{
    &g_dmaConfig
};

#endif

#if (STD_ON == CDD_PDL_DMA_SUPPORT)
#if (STD_OFF == CDD_PDL_DEM_ERR_REP_DISABLE)
static CONST(Pdl_DemConfigType, PDL_CONST) g_pdlDemConfig =
{
    {(uint32)STD_OFF, (uint16)0U},
};
#endif
#endif

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
