/*!
* @file     Pdl_DmaIrq.c
*
* @version  1.0.0
*
* @brief    The source file of the Dma interrupt handler driver.
*           This source file contains the API specification and other variables of the Dma interrupt handler driver.
* @attention
*
* Project Name      : AUTOSAR MCAL
*
* Platform          : Arm
*
* Autosar Standard  : Classic Platform 4.4.0
*
* 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 usefull 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 "StdRegMacros.h"
#include "Mcal.h"
#include "Pdl_DmaTypes.h"
#include "Pdl_Dma.h"
#include "CDD_Pdl.h"
#include "CDD_Pdl_Cfg.h"

/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @defgroup PDL_Driver
  * @brief PDL driver modules
  @{
*/

/** @defgroup PDL_Macros
  @{
*/
/***********************************************************************************************************************
                                    VENDOR ID & AUTOSAR VERSION INFO
***********************************************************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define PDL_DMA_IRQ_VENDOR_ID                         0x00C1U
/** Module ID of this module, as defined in the BSW Module List. */
#define PDL_DMA_IRQ_MODULE_ID                         0x00FFU
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PDL_DMA_IRQ_AR_RELEASE_MAJOR_VERSION          0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PDL_DMA_IRQ_AR_RELEASE_MINOR_VERSION          0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define PDL_DMA_IRQ_AR_RELEASE_REVISION_VERSION       0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */   
#define PDL_DMA_IRQ_SW_MAJOR_VERSION                  0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PDL_DMA_IRQ_SW_MINOR_VERSION                  0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define PDL_DMA_IRQ_SW_PATCH_VERSION                  0x00U
/**@} end of group PDL_Macros */
/**********************************************************************************************************************
                                        VERSION INFOMATION VERIFICATION
***********************************************************************************************************************/
#if (PDL_DMA_IRQ_VENDOR_ID != PDL_DMA_H_VENDOR_ID)
    #error "Vendor ids mismatch between Pdl_DmaIrq.c and Pdl_Dma.h"
#endif  /* {if (PDL_DMA_IRQ_VENDOR_ID != PDL_DMA_H_VENDOR_ID)} */

/* Make sure the AUTOSAR major version number is the same between Pdl_Dma.h and Pdl_DmaIrq.c */
#if (PDL_DMA_IRQ_AR_RELEASE_MAJOR_VERSION != PDL_DMA_H_AR_RELEASE_MAJOR_VERSION)
#error "AUTOSAR Major Version Numbers mismatch between Pdl_Dma.h and Pdl_DmaIrq.c"
#endif
/* Make sure the AUTOSAR minor version number is the same between Pdl_Dma.h and Pdl_DmaIrq.c */
#if (PDL_DMA_IRQ_AR_RELEASE_MINOR_VERSION != PDL_DMA_H_AR_RELEASE_MINOR_VERSION)
#error "AUTOSAR Minor Version Numbers mismatch between Pdl_Dma.h and Pdl_DmaIrq.c"
#endif
/* Make sure the AUTOSAR revision version number is the same between Pdl_Dma.h and Pdl_DmaIrq.c */
#if (PDL_DMA_IRQ_AR_RELEASE_REVISION_VERSION != PDL_DMA_H_AR_RELEASE_REVISION_VERSION)
#error "AUTOSAR Revision Version Numbers mismatch Pdl_Dma.h and Pdl_DmaIrq.c"
#endif

/* Make sure the software major version number is the same between Pdl_Dma.h and Pdl_DmaIrq.c */
#if (PDL_DMA_IRQ_SW_MAJOR_VERSION != PDL_DMA_H_SW_MAJOR_VERSION)
#error "Software Major Version Numbers mismatch between Pdl_Dma.h and Pdl_DmaIrq.c"
#endif
/* Make sure the software minor version number is the same between Pdl_Dma.h and Pdl_DmaIrq.c */
#if (PDL_DMA_IRQ_SW_MINOR_VERSION != PDL_DMA_H_SW_MINOR_VERSION)
#error "Software Minor Version Numbers mismatch between Pdl_Dma.h and Pdl_DmaIrq.c"
#endif
/* Make sure the software patch version number is the same between Pdl_Dma.h and Pdl_DmaIrq.c */
#if (PDL_DMA_IRQ_SW_PATCH_VERSION != PDL_DMA_H_SW_PATCH_VERSION)
#error "Software Patch Version Numbers mismatch between Pdl_Dma.h and Pdl_DmaIrq.c"
#endif

#if (PDL_DMA_IRQ_VENDOR_ID != PDL_DMA_TYPES_H_VENDOR_ID)
    #error "Vendor ids mismatch between Pdl_DmaIrq.c and Pdl_DmaTypes.h"
#endif  /* {if (PDL_DMA_IRQ_VENDOR_ID != PDL_DMA_TYPES_H_VENDOR_ID)} */

/* Make sure the AUTOSAR major version number is the same between Pdl_DmaIrq.c and Pdl_DmaTypes.h */
#if (PDL_DMA_IRQ_AR_RELEASE_MAJOR_VERSION    != PDL_DMA_TYPES_H_AR_RELEASE_MAJOR_VERSION)
#error "AUTOSAR Major Version Numbers mismatch between Pdl_DmaIrq.c and Pdl_DmaTypes.h"
#endif
/* Make sure the AUTOSAR minor version number is the same between Pdl_DmaIrq.c and Pdl_DmaTypes.h */
#if (PDL_DMA_IRQ_AR_RELEASE_MINOR_VERSION    != PDL_DMA_TYPES_H_AR_RELEASE_MINOR_VERSION)
#error "AUTOSAR Minor Version Numbers mismatch between Pdl_DmaIrq.c and Pdl_DmaTypes.h"
#endif
/* Make sure the AUTOSAR revision version number is the same between Pdl_DmaIrq.c and Pdl_DmaTypes.h */
#if (PDL_DMA_IRQ_AR_RELEASE_REVISION_VERSION != PDL_DMA_TYPES_H_AR_RELEASE_REVISION_VERSION)
#error "AUTOSAR Revision Version Numbers mismatch Pdl_DmaIrq.c and Pdl_DmaTypes.h"
#endif

/* Make sure the software major version number is the same between Pdl_DmaIrq.c and Pdl_DmaTypes.h */
#if (PDL_DMA_IRQ_SW_MAJOR_VERSION != PDL_DMA_TYPES_H_SW_MAJOR_VERSION)
#error "Software Major Version Numbers mismatch between Pdl_DmaIrq.c and Pdl_DmaTypes.h"
#endif
/* Make sure the software minor version number is the same between Pdl_DmaIrq.c and Pdl_DmaTypes.h */
#if (PDL_DMA_IRQ_SW_MINOR_VERSION != PDL_DMA_TYPES_H_SW_MINOR_VERSION)
#error "Software Minor Version Numbers mismatch between Pdl_DmaIrq.c and Pdl_DmaTypes.h"
#endif
/* Make sure the software patch version number is the same between Pdl_DmaIrq.c and Pdl_DmaTypes.h */
#if (PDL_DMA_IRQ_SW_PATCH_VERSION != PDL_DMA_TYPES_H_SW_PATCH_VERSION)
#error "Software Patch Version Numbers mismatch between Pdl_DmaIrq.c and Pdl_DmaTypes.h"
#endif

#ifdef ENABLE_INTERMODULE_MCAL_CHECK
    /* Make sure the AUTOSAR major version number is the same between  Pdl_DmaIrq.c and Mcal.h */
    #if (PDL_DMA_IRQ_AR_RELEASE_MAJOR_VERSION != MCAL_H_AR_RELEASE_MAJOR_VERSION) 
    #error "AUTOSAR Major Version Numbers mismatch between between Pdl_DmaIrq.c and Mcal.h"
    #endif
    /* Make sure the AUTOSAR minor version number is the same between  Pdl_DmaIrq.c and Mcal.h */
    #if (PDL_DMA_IRQ_AR_RELEASE_MINOR_VERSION != MCAL_H_AR_RELEASE_MINOR_VERSION) 
    #error "AUTOSAR Minor Version Numbers mismatch between Pdl_DmaIrq.c and Mcal.h"
    #endif

#endif  

#ifdef ENABLE_INTERMODULE_MCAL_CHECK
    /* Make sure the AUTOSAR major version number is the same between  Pdl_Dma_Irq.cand StdRegMacros.h */
    #if (PDL_DMA_IRQ_AR_RELEASE_MAJOR_VERSION != STD_REG_MACROS_H_AR_RELEASE_MAJOR_VERSION)
    #error "AUTOSAR Major Version Numbers mismatch between Pdl_Dma_Irq.cand StdRegMacros.h"
    #endif
    /* Make sure the AUTOSAR minor version number is the same between  Pdl_Dma_Irq.cand StdRegMacros.h */
    #if (PDL_DMA_IRQ_AR_RELEASE_MINOR_VERSION != STD_REG_MACROS_H_AR_RELEASE_MINOR_VERSION)
    #error "AUTOSAR Minor Version Numbers mismatch between Pdl_Dma_Irq.cand StdRegMacros.h"
    #endif

#endif  

#if (PDL_DMA_IRQ_VENDOR_ID != CDD_PDL_H_VENDOR_ID)
    #error "Vendor ids mismatch between Pdl_DmaIrq.c and CDD_Pdl.h"
#endif  /* {if (PDL_DMA_IRQ_VENDOR_ID != CDD_PDL_H_VENDOR_ID)} */

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

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

#if (PDL_DMA_IRQ_VENDOR_ID != PDL_CFG_H_VENDOR_ID)
    #error "Vendor ids mismatch between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h"
#endif  /* {if (PDL_DMA_IRQ_VENDOR_ID != PDL_CFG_H_VENDOR_ID)} */

/* Make sure the AUTOSAR major version number is the same between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h */
#if (PDL_DMA_IRQ_AR_RELEASE_MAJOR_VERSION    != PDL_CFG_H_AR_RELEASE_MAJOR_VERSION)
#error "AUTOSAR Major Version Numbers mismatch between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h"
#endif
/* Make sure the AUTOSAR minor version number is the same between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h */
#if (PDL_DMA_IRQ_AR_RELEASE_MINOR_VERSION    != PDL_CFG_H_AR_RELEASE_MINOR_VERSION)
#error "AUTOSAR Minor Version Numbers mismatch between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h"
#endif
/* Make sure the AUTOSAR revision version number is the same between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h */
#if (PDL_DMA_IRQ_AR_RELEASE_REVISION_VERSION != PDL_CFG_H_AR_RELEASE_REVISION_VERSION)
#error "AUTOSAR Revision Version Numbers mismatch between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h"
#endif

/* Make sure the software major version number is the same between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h */
#if (PDL_DMA_IRQ_SW_MAJOR_VERSION != PDL_CFG_H_SW_MAJOR_VERSION)
#error "Software Major Version Numbers mismatch between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h"
#endif
/* Make sure the software minor version number is the same between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h */
#if (PDL_DMA_IRQ_SW_MINOR_VERSION != PDL_CFG_H_SW_MINOR_VERSION)
#error "Software Minor Version Numbers mismatch between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h"
#endif
/* Make sure the software patch version number is the same between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h */
#if (PDL_DMA_IRQ_SW_PATCH_VERSION != PDL_CFG_H_SW_PATCH_VERSION)
#error "Software Patch Version Numbers mismatch between Pdl_DmaIrq.c and CDD_Pdl_Cfg.h"
#endif

/**********************************************************************************************************************
                                                FUNCTION DECLARATION
***********************************************************************************************************************/
/** @defgroup PDL_Fuctions
  @{
*/
#ifdef CDD_PDL_DMA_SUPPORT
#if (STD_ON == CDD_PDL_DMA_SUPPORT)

#if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)    
    #ifdef PDL_DMA_CH1_ISR_EN
        static ISR(Pdl_DmaIrq_Ch1Isr);
    #endif  /* ifdef ifdef PDL_DMA_CH1_ISR_EN */
    
    #ifdef PDL_DMA_CH2_ISR_EN
        static ISR(Pdl_DmaIrq_Ch2Isr);
    #endif  /* ifdef PDL_DMA_CH2_ISR_EN */
    
    #ifdef PDL_DMA_CH3_ISR_EN
        static ISR(Pdl_DmaIrq_Ch3Isr);
    #endif  /* ifdef PDL_DMA_CH3_ISR_EN */
    
    #ifdef PDL_DMA_CH4_ISR_EN
        static ISR(Pdl_DmaIrq_Ch4Isr);
    #endif  /* ifdef PDL_DMA_CH4_ISR_EN */
    
    #ifdef PDL_DMA_CH5_ISR_EN
        static ISR(Pdl_DmaIrq_Ch5Isr);
    #endif  /* ifdef PDL_DMA_CH5_ISR_EN */
#endif  /* {if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)} */

#if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)
    #ifdef PDL_DMA_CH1_ERR_ISR_EN
        static ISR(Pdl_DmaIrq_Ch1ErrIsr);
    #endif  /* ifdef ifdef PDL_DMA_CH1_ERR_ISR_EN */
    
    #ifdef PDL_DMA_CH2_ERR_ISR_EN
        static ISR(Pdl_DmaIrq_Ch2ErrIsr);
    #endif  /* ifdef PDL_DMA_CH2_ERR_ISR_EN */
    
    #ifdef PDL_DMA_CH3_ERR_ISR_EN
        static ISR(Pdl_DmaIrq_Ch3ErrIsr);
    #endif  /* ifdef PDL_DMA_CH3_ERR_ISR_EN */
    
    #ifdef PDL_DMA_CH4_ERR_ISR_EN
        static ISR(Pdl_DmaIrq_Ch4ErrIsr);
    #endif  /* ifdef PDL_DMA_CH4_ERR_ISR_EN */
    
    #ifdef PDL_DMA_CH5_ERR_ISR_EN
        static ISR(Pdl_DmaIrq_Ch5ErrIsr);
    #endif  /* ifdef PDL_DMA_CH5_ERR_ISR_EN */
#endif /* {if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)} */

/**********************************************************************************************************************
                                                    GLOBAL FUNCTION
***********************************************************************************************************************/
#define PDL_START_SEC_CODE
#include "Pdl_MemMap.h"

#if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)

    #ifdef PDL_DMA_CH5_ISR_EN
   /*!
    * @brief         The interrupt handler of the Dma channel5.
    * @param[in]     void
    * @retval        void
    */  
    static ISR(Pdl_DmaIrq_Ch5Isr)
    {
        PDL_DMA_CH_NOTIFI((Pdl_DmaChType)DMA_HW_CH5);
        EXIT_INTERRUPT();  /* Exit the interrupt */
    }
    #endif /* ifdef PDL_DMA_CH5_ISR_EN */

    #ifdef PDL_DMA_CH4_ISR_EN    
   /*!
    * @brief         The interrupt handler of the Dma channel4.
    * @param[in]     void
    * @retval        void
    */  
    static ISR(Pdl_DmaIrq_Ch4Isr)
    {
        PDL_DMA_CH_NOTIFI((Pdl_DmaChType)DMA_HW_CH4);
        EXIT_INTERRUPT();  /* Exit the interrupt */
    }
    #endif /* ifdef PDL_DMA_CH4_ISR_EN */

    #ifdef PDL_DMA_CH3_ISR_EN
   /*!
    * @brief         The interrupt handler of the Dma channel3.
    * @param[in]     void
    * @retval        void
    */
    static ISR(Pdl_DmaIrq_Ch3Isr)
    {
        PDL_DMA_CH_NOTIFI((Pdl_DmaChType)DMA_HW_CH3);
        EXIT_INTERRUPT();  /* Exit the interrupt */
    }
    #endif /* ifdef PDL_DMA_CH3_ISR_EN */

    #ifdef PDL_DMA_CH2_ISR_EN
   /*!
    * @brief         The interrupt handler of the Dma channel2.
    * @param[in]     void
    * @retval        void
    */ 
    static ISR(Pdl_DmaIrq_Ch2Isr)
    {
        PDL_DMA_CH_NOTIFI((Pdl_DmaChType)DMA_HW_CH2);
        EXIT_INTERRUPT();  /* Exit the interrupt */
    }
    #endif /* ifdef PDL_DMA_CH2_ISR_EN */

    #ifdef PDL_DMA_CH1_ISR_EN
   /*!
    * @brief         The interrupt handler of the Dma channel1.
    * @param[in]     void
    * @retval        void
    */  
    static ISR(Pdl_DmaIrq_Ch1Isr)
    {
        PDL_DMA_CH_NOTIFI((Pdl_DmaChType)DMA_HW_CH1);
        EXIT_INTERRUPT();  /* Exit the interrupt */
    }
    #endif /* ifdef PDL_DMA_CH1_ISR_EN */

#endif

#if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)
    #ifdef PDL_DMA_CH1_ERR_ISR_EN
   /*!
    * @brief         The interrupt handler of the Dma Channel1 error.
    * @param[in]     void
    * @retval        void
    */  
    
    static ISR(Pdl_DmaIrq_Ch1ErrIsr)
    {
        if (NULL_PTR != g_pdlConfigPtr)
        {
            /* Detect the unrecognized error */
            Pdl_HW_ERR_NOTIFI(DMA_HW_CH1, DMA_UNRECOG_ERR);
        }
        else
        {
            /* do nothing */
        }

        EXIT_INTERRUPT();  /* Exit the interrupt */
    }
    #endif

    #ifdef PDL_DMA_CH2_ERR_ISR_EN
    static ISR(Pdl_DmaIrq_Ch2ErrIsr)
    {
        if (NULL_PTR != g_pdlConfigPtr)
        {
            /* Detect the unrecognized error */
            Pdl_HW_ERR_NOTIFI(DMA_HW_CH2, DMA_UNRECOG_ERR);
        }
        else
        {
            /* do nothing */
        }

        EXIT_INTERRUPT();  /* Exit the interrupt */
    }
    #endif

    #ifdef PDL_DMA_CH3_ERR_ISR_EN
    static ISR(Pdl_DmaIrq_Ch3ErrIsr)
    {
        if (NULL_PTR != g_pdlConfigPtr)
        {
            /* Detect the unrecognized error */
            Pdl_HW_ERR_NOTIFI(DMA_HW_CH3, DMA_UNRECOG_ERR);
        }
        else
        {
            /* do nothing */
        }

        EXIT_INTERRUPT();  /* Exit the interrupt */
    }
    #endif

    #ifdef PDL_DMA_CH4_ERR_ISR_EN
    static ISR(Pdl_DmaIrq_Ch4ErrIsr)
    {
        if (NULL_PTR != g_pdlConfigPtr)
        {
            /* Detect the unrecognized error */
            Pdl_HW_ERR_NOTIFI(DMA_HW_CH4, DMA_UNRECOG_ERR);
        }
        else
        {
            /* do nothing */
        }

        EXIT_INTERRUPT();  /* Exit the interrupt */
    }
    #endif

    #ifdef PDL_DMA_CH5_ERR_ISR_EN
    static ISR(Pdl_DmaIrq_Ch5ErrIsr)
    {
        if (NULL_PTR != g_pdlConfigPtr)
        {
            /* Detect the unrecognized error */
            Pdl_HW_ERR_NOTIFI(DMA_HW_CH5, DMA_UNRECOG_ERR);
        }
        else
        {
            /* do nothing */
        }

        EXIT_INTERRUPT();  /* Exit the interrupt */
    }
    #endif

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

/*!
* @brief         This function handles DMA_CH1_IRQHandler exception.
* @param[in]     None
* @retval        void
*/
void DMA_CH1_IRQHandler(void)
{
#if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)

    uint8 al1Flag = Pdl_Dma_ReadStatusFlag(DMA1_FLAG_AL1);
    uint8 te1Flag = Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TE1);

    if((al1Flag != (uint8)0) && (te1Flag == (uint8)0))
    {
        if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_HT1))
        {
            /* If the half transfer complete flag is set, clear the flag */
            Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_HT1);
#ifdef PDL_DMA_CH1_ISR_EN
            /* Check the interrupt enable status */
            if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH1, DMA_INT_HTIE))
            {
                Pdl_DmaIrq_Ch1Isr();
            }
            else
            {
                /* do nothing */
            }
#endif
        }
        else
        {
            /* do nothing */
        }

        if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TF1))
        {
            /* If the transfer complete flag is set, clear the flag */
            Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_TF1);
#ifdef PDL_DMA_CH1_ISR_EN
            
            if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH1, DMA_INT_TFIE))
            {
                Pdl_DmaIrq_Ch1Isr();
            }
            else
            {
                /* do nothing */
            }
#endif
        }
        else
        {
            /* do nothing */
        }

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

#if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)
    if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TE1))
    {
        Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_TE1);
 #ifdef PDL_DMA_CH1_ERR_ISR_EN
        if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH1, DMA_INT_TEIE))
        {
            Pdl_DmaIrq_Ch1ErrIsr();
        }
        else
        {
            /* do nothing */
        }
#endif
    }
    else
    {
        /* do nothing */
    }
#endif /* {if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)} */
}

/*!
* @brief         This function handles DMA_CH2_3_IRQHandler exception.
* @param[in]     None
* @retval        void
*/
void DMA_CH2_3_IRQHandler(void)
{
#if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)

    uint8 al2Flag = Pdl_Dma_ReadStatusFlag(DMA1_FLAG_AL2);
    uint8 te2Flag = Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TE2);

    uint8 al3Flag = Pdl_Dma_ReadStatusFlag(DMA1_FLAG_AL3);
    uint8 te3Flag = Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TE3);

    if((al2Flag != (uint8)0) && (te2Flag == (uint8)0))
    {
        if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_HT2))
        {
            /* If the half transfer complete flag is set, clear the flag */
            Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_HT2);
#ifdef PDL_DMA_CH2_ISR_EN
            if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH2, DMA_INT_HTIE))
            {
                Pdl_DmaIrq_Ch2Isr();
            }
            else
            {
                /* do nothing */
            }
#endif
        }
        else
        {
            /* do nothing */
        }
        
        if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TF2))
        {
            /* If the transfer complete flag is set, clear the flag */
            Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_TF2);
#ifdef PDL_DMA_CH2_ISR_EN
            if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH2, DMA_INT_TFIE))
            {
                Pdl_DmaIrq_Ch2Isr();
            }
            else
            {
                /* do nothing */
            }
#endif
        }
        else
        {
            /* do nothing */
        }

    }
    else
    {
        /* do nothing */
    }
    
    if((al3Flag != (uint8)0) && (te3Flag == (uint8)0))
    {
        if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_HT3))
        {
            /* If the half transfer complete flag is set, clear the flag */
            Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_HT3);
#ifdef PDL_DMA_CH3_ISR_EN
            if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH3, DMA_INT_HTIE))
            {
                Pdl_DmaIrq_Ch3Isr();
            }
            else
            {
                /* do nothing */
            }
#endif
        }
        else
        {
            /* do nothing */
        }
        
        if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TF3))
        {
            /* If the transfer complete flag is set, clear the flag */
            Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_TF3);
#ifdef PDL_DMA_CH3_ISR_EN
            if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH3, DMA_INT_TFIE))
            {
                Pdl_DmaIrq_Ch3Isr();
            }
            else
            {
                /* do nothing */
            }
#endif
        }
        else
        {
            /* do nothing */
        }

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

#if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)
    if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TE2))
    {
        /* If the half transfer complete flag is set, clear the flag */
        Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_TE2);
#ifdef PDL_DMA_CH2_ERR_ISR_EN
        if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH2, DMA_INT_TEIE))
        {
            Pdl_DmaIrq_Ch2ErrIsr();
        }
        else
        {
            /* do nothing */
        }
#endif
    }
    else
    {
        /* do nothing */
    }
   
   if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TE3))
    {
        /* If the transfer complete flag is set, clear the flag */
        Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_TE3);
#ifdef PDL_DMA_CH3_ERR_ISR_EN
        if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH3, DMA_INT_TEIE))
        {
            Pdl_DmaIrq_Ch3ErrIsr();
        }
        else
        {
            /* do nothing */
        }
#endif
    }
    else
    {
        /* do nothing */
    }

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

/*!
* @brief         This function handles DMA_CH4_5_IRQHandler exception.
* @param[in]     None
* @retval        void
*/
void DMA_CH4_5_IRQHandler(void)
{
#if (STD_ON == CDD_PDL_DMA_NOTIFICATION_ENABLE)

    uint8 al4Flag = Pdl_Dma_ReadStatusFlag(DMA1_FLAG_AL4);
    uint8 te4Flag = Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TE4);

    uint8 al5Flag = Pdl_Dma_ReadStatusFlag(DMA1_FLAG_AL5);
    uint8 te5Flag = Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TE5);

    /* DMA_HW_CH4 */
    if((al4Flag != (uint8)0) && (te4Flag == (uint8)0))
    {
        if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_HT4))
        {
            /* If the half transfer complete flag is set, clear the flag */
            Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_HT4);
#ifdef PDL_DMA_CH4_ISR_EN
            if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH4, DMA_INT_HTIE))
            {
                Pdl_DmaIrq_Ch4Isr();
            }
            else
            {
                /* do nothing */
            }
#endif
        }
        else
        {
            /* do nothing */
        }

        if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TF4))
        {
            /* If the transfer complete flag is set, clear the flag */
            Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_TF4);
#ifdef PDL_DMA_CH4_ISR_EN
            if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH4, DMA_INT_TFIE))
            {
                Pdl_DmaIrq_Ch4Isr();
            }
            else
            {
                /* do nothing */
            }
#endif
        }
        else
        {
            /* do nothing */
        }

    }
    else
    {
        /* do nothing */
    }
    
    /* DMA_HW_CH5 */
    if((al5Flag != (uint8)0) && (te5Flag == (uint8)0))
    {
        if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_HT5))
        {
            /* If the half transfer complete flag is set, clear the flag */
            Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_HT5);
#ifdef PDL_DMA_CH5_ISR_EN
            if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH5, DMA_INT_HTIE))
            {
                Pdl_DmaIrq_Ch5Isr();
            }
            else
            {
                /* do nothing */
            }
#endif
        }
        else
        {
            /* do nothing */
        }
        
        if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TF5))
        {
            /* If the transfer complete flag is set, clear the flag */
            Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_TF5);
#ifdef PDL_DMA_CH5_ISR_EN
            if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH5, DMA_INT_TFIE))
            {
                Pdl_DmaIrq_Ch5Isr();
            }
            else
            {
                /* do nothing */
            }
#endif
        }
        else
        {
            /* do nothing */
        }

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

#if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)
    if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TE4))
    {
        /* If the half transfer complete flag is set, clear the flag */
        Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_TE4);
#ifdef PDL_DMA_CH4_ERR_ISR_EN
        if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH4, DMA_INT_TEIE))
        {
            Pdl_DmaIrq_Ch4ErrIsr();
        }
        else
        {
            /* do nothing */
        }
#endif
    }
    else
    {
        /* do nothing */
    }
    
    if((uint8)0 != Pdl_Dma_ReadStatusFlag(DMA1_FLAG_TE5))
    {
        /* If the transfer complete flag is set, clear the flag */
        Pdl_Dma_ClrStsFlag((uint32)DMA1_FLAG_TE5);
#ifdef PDL_DMA_CH5_ERR_ISR_EN
        if((uint8)DISABLE != Pdl_Dma_ReadInitEn(DMA_HW_CH5, DMA_INT_TEIE))
        {
            Pdl_DmaIrq_Ch5ErrIsr();
        }
        else
        {
            /* do nothing */
        }
#endif
    }
    else
    {
        /* do nothing */
    }
#endif /* {if (STD_ON == CDD_PDL_DMA_ERR_NOTIFICATION_SUPPORT)} */
}

#define PDL_STOP_SEC_CODE
#include "Pdl_MemMap.h"

#endif  
#endif  /* ifdef CDD_PDL_DMA_SUPPORT */

/**@} end of group PDL_Fuctions */
#ifdef __cplusplus
}
#endif  /* ifdef __cplusplus */
/**@} end of group PDL_Driver */
/**@} end of group G32A10xx_StdPeriphDriver */
