⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csl_edma3.h

📁 Dm6455 driver,magbe useful to you!
💻 H
📖 第 1 页 / 共 5 页
字号:
 * ===========================================================================
 */
extern CSL_Status  CSL_edma3ChannelClose (
    CSL_Edma3ChannelHandle      hEdma
);

/*
 * =============================================================================
 *   @func CSL_edma3ChannelSetupParam
 *
 *   @desc
 *      Does the Channel setup i.e the channel to param set mapping(if relevant)
 *
 *   @arg   hEdma
 *          Channel Handle 
 *
 *   @arg   paramNum
 *          parameter set to be mapped to the channel
 *
 *   @ret   CSL_Status
 *          CSL_SOK             - Setup Param successful
 *          CSL_ESYS_BADHANDLE  - Invalid handle
 *          CSL_ESYS_INVPARAMS  - Invalid parameter
 *
 *   @eg
 *          CSL_Edma3Handle         hModule;
            CSL_Edma3Obj            edmaObj;
            CSL_Edma3Context        context;
            CSL_Edma3HwSetup        hwSetup;
            CSL_Status              status;
            Uint16                  paramNum;
            CSL_Edma3ChannelHandle  hChannel;
            CSL_Edma3HwDmaChannelSetup  dmahwSetup[CSL_EDMA3_NUM_DMACH] = 
                                              CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
            CSL_Edma3HwQdmaChannelSetup qdmahwSetup[CSL_EDMA3_NUM_QDMACH] = 
                                              CSL_EDMA3_QDMACHANNELSETUP_DEFAULT; 
            // Module Initialization
            CSL_edma3Init(&context);
             
            // Module Level Open    
            hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
            
            // Module Setup
            hwSetup.dmaChaSetup  = &dmahwSetup[0];
            hwSetup.qdmaChaSetup = &qdmaSetup[0];
            CSL_edma3HwSetup(hModule,&hwSetup);
            
            // Channel 0 Open in context of Shadow region 0
            chAttr.regionNum = CSL_EDMA3_REGION_0;
            chAttr.chaNum = CSL_EDMA3_CHA_DSPINT;
            hChannel = CSL_edma3ChannelOpen(&ChObj,
                                    CSL_EDMA3,
                                    &chAttr,                            
                                    &status);   
        
            // Set the parameter entry number to channel
            paramNum = 100;
            CSL_edma3HwChannelSetupParam(hChannel,paramNum);
            ...
 *
 * ===========================================================================
 */
extern CSL_Status  CSL_edma3HwChannelSetupParam (
    CSL_Edma3ChannelHandle      hEdma,
    Uint16                      paramNum 
);

/*
 * =============================================================================
 *   @func CSL_edma3ChannelSetupTriggerWord
 *
 *   @desc
 *      Sets up the channel trigger word.This is applicable only 
 *      for QDMA channels.
 *
 *   @arg   hEdma
 *          Channel Handle 
 *
 *   @arg   triggerWord
 *          trigger word (0-7) for the channel
 *
 *   @ret   CSL_Status
 *          CSL_SOK             - Setup Param successful
 *          CSL_ESYS_BADHANDLE  - Invalid handle
 *          CSL_ESYS_INVPARAMS  - Invalid parameter
 *
 *   @eg
 *          CSL_Edma3Handle         hModule;
            CSL_Edma3Obj            edmaObj;
            CSL_Edma3Context        context;
            CSL_Edma3HwSetup        hwSetup;
            CSL_Status              status;
            CSL_Edma3ChannelHandle  hChannel;
            CSL_Edma3HwDmaChannelSetup  dmahwSetup[CSL_EDMA3_NUM_DMACH] = 
                                              CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
            CSL_Edma3HwQdmaChannelSetup qdmahwSetup[CSL_EDMA3_NUM_QDMACH] = 
                                              CSL_EDMA3_QDMACHANNELSETUP_DEFAULT; 
            // Module Initialization
            CSL_edma3Init(&context);
             
            // Module Level Open    
            hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
            
            // Module Setup
            hwSetup.dmaChaSetup  = &dmahwSetup[0];
            hwSetup.qdmaChaSetup = &qdmaSetup[0];
            CSL_edma3HwSetup(hModule,&hwSetup);
            
            // Channel 0 Open in context of Shadow region 0
            chAttr.regionNum = CSL_EDMA3_REGION_0;
            chAttr.chaNum = CSL_EDMA3_CHA_DSPINT;
            hChannel = CSL_edma3ChannelOpen(&ChObj,
                                    CSL_EDMA3,
                                    &chAttr,                            
                                    &status);   
        
            // Sets up the QDMA Channel 0 trigger Word to the 3rd trigger word
            CSL_edma3HwChannelSetupTriggerWord(hChannel,3);
            ...
 *
 * ===========================================================================
 */
extern CSL_Status  CSL_edma3HwChannelSetupTriggerWord (
    CSL_Edma3ChannelHandle      hEdma,
    Uint8                       triggerWord   
);

/*
 * =============================================================================
 *   @func CSL_edma3ChannelSetupQue
 *
 *   @desc
 *      Does the Channel setup i.e the channel to que mapping
 *
 *   @arg   hEdma
 *          Channel Handle 
 *
 *   @arg   que
 *          Queue to be mapped to the channel
 *
 *   @ret   CSL_Status
 *          CSL_SOK             - Setup Param successful
 *          CSL_ESYS_BADHANDLE  - Invalid handle
 *          CSL_ESYS_INVPARAMS  - Invalid parameter
 *
 *   @eg
 *          CSL_Edma3Handle         hModule;
            CSL_Edma3Obj            edmaObj;
            CSL_Edma3Context        context;
            CSL_Edma3HwSetup        hwSetup;
            CSL_Status              status;
            CSL_Edma3Que            evtQue;
            CSL_Edma3ChannelHandle  hChannel;
            CSL_Edma3HwDmaChannelSetup  dmahwSetup[CSL_EDMA3_NUM_DMACH] = 
                                              CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
            CSL_Edma3HwQdmaChannelSetup qdmahwSetup[CSL_EDMA3_NUM_QDMACH] = 
                                              CSL_EDMA3_QDMACHANNELSETUP_DEFAULT; 
            // Module Initialization
            CSL_edma3Init(&context);
             
            // Module Level Open    
            hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
            
            // Module Setup
            hwSetup.dmaChaSetup  = &dmahwSetup[0];
            hwSetup.qdmaChaSetup = &qdmaSetup[0];
            CSL_edma3HwSetup(hModule,&hwSetup);
            
            // Channel 0 Open in context of Shadow region 0
            chAttr.regionNum = CSL_EDMA3_REGION_0;
            chAttr.chaNum = CSL_EDMA3_CHA_DSPINT;
            hChannel = CSL_edma3ChannelOpen(&ChObj,
                                    CSL_EDMA3,
                                    &chAttr,                            
                                    &status);   
        
            // Set up the channel to que mapping
            CSL_edma3HwChannelSetupQue(hChannel,CSL_EDMA3_QUE_3);
            ...
 *
 * ===========================================================================
 */
extern CSL_Status  CSL_edma3HwChannelSetupQue (
    CSL_Edma3ChannelHandle       hEdma,
    CSL_Edma3Que                 que    
);

/*
 * =============================================================================
 *   @func CSL_edma3GetHwChannelSetupParam
 *
 *   @desc
 *      Obtains the current channel to parameter set mapping.
 *
 *   @arg   hEdma
 *          Channel Handle 
 *
 *   @arg   paramNum
 *          parameter set currently mapped to the channel
 *
 *   @ret   CSL_Status
 *          CSL_SOK             - Setup Param successful
 *          CSL_ESYS_BADHANDLE  - Invalid handle
 *          CSL_ESYS_INVPARAMS  - Invalid parameter
 *
 *   @eg
 *          CSL_Edma3Handle         hModule;
            CSL_Edma3Obj            edmaObj;
            CSL_Edma3Context        context;
            CSL_Edma3HwSetup        hwSetup;
            CSL_Status              status;
            Uint16                  paramNum;
            CSL_Edma3ChannelHandle  hChannel;
            CSL_Edma3HwDmaChannelSetup  dmahwSetup[CSL_EDMA3_NUM_DMACH] = 
                                              CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
            CSL_Edma3HwQdmaChannelSetup qdmahwSetup[CSL_EDMA3_NUM_QDMACH] = 
                                              CSL_EDMA3_QDMACHANNELSETUP_DEFAULT; 
            // Module Initialization
            CSL_edma3Init(&context);
             
            // Module Level Open    
            hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
            
            // Module Setup
            hwSetup.dmaChaSetup  = &dmahwSetup[0];
            hwSetup.qdmaChaSetup = &qdmaSetup[0];
            CSL_edma3HwSetup(hModule,&hwSetup);
            
            // Channel 0 Open in context of Shadow region 0
            chAttr.regionNum = CSL_EDMA3_REGION_0;
            chAttr.chaNum = CSL_EDMA3_CHA_DSPINT;
            hChannel = CSL_edma3ChannelOpen(&ChObj,
                                    CSL_EDMA3,
                                    &chAttr,                            
                                    &status);   
        
            // Get the parameter entry number to which a channel is mapped to 
            CSL_edma3GetHwChannelSetupParam(hChannel,&paramNum);
            ...
 *
 * ===========================================================================
 */
extern CSL_Status  CSL_edma3GetHwChannelSetupParam (
    CSL_Edma3ChannelHandle       hEdma,
    Uint16                      *paramNum    
);

/*
 * =============================================================================
 *   @func CSL_edma3GetHwChannelSetupTriggerWord
 *
 *   @desc
 *      Gets channel trigger word.This is applicable only for QDMA channels.
 *      
 *   @arg   hEdma
 *          Channel Handle 
 *
 *   @arg   triggerWord
 *          Trigger word setup in the (QDMA)channel
 *
 *   @ret   CSL_Status
 *          CSL_SOK             - Setup Param successful
 *          CSL_ESYS_BADHANDLE  - Invalid handle
 *          CSL_ESYS_INVPARAMS  - Invalid parameter
 *
 *   @eg
 *          CSL_Edma3Handle         hModule;
            CSL_Edma3Obj            edmaObj;
            CSL_Edma3Context        context;
            CSL_Edma3HwSetup        hwSetup;
            CSL_Status              status;
            CSL_Edma3ChannelHandle  hChannel;
            Uint8                   triggerWord;
            CSL_Edma3HwDmaChannelSetup  dmahwSetup[CSL_EDMA3_NUM_DMACH] = 
                                              CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
            CSL_Edma3HwQdmaChannelSetup qdmahwSetup[CSL_EDMA3_NUM_QDMACH] = 
                                              CSL_EDMA3_QDMACHANNELSETUP_DEFAULT; 
            // Module Initialization
            CSL_edma3Init(&context);
             
            // Module Level Open    
            hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
            
            // Module Setup
            hwSetup.dmaChaSetup  = &dmahwSetup[0];
            hwSetup.qdmaChaSetup = &qdmaSetup[0];
            CSL_edma3HwSetup(hModule,&hwSetup);
            
            // Channel 0 Open in context of Shadow region 0
            chAttr.regionNum = CSL_EDMA3_REGION_0;
            chAttr.chaNum = CSL_EDMA3_CHA_DSPINT;
            hChannel = CSL_edma3ChannelOpen(&ChObj,
                                    CSL_EDMA3,
                                    &chAttr,                            
                                    &status);   
        
            // Get the trigger word programmed for a channel
            CSL_edma3GetHwChannelSetupTriggerWord(hChannel,&triggerWord);
            ...
 *
 * ===========================================================================
 */
extern CSL_Status  CSL_edma3GetHwChannelSetupTriggerWord (
    CSL_Edma3ChannelHandle      hEdma,
    Uint8                       *triggerWord  
);

/*
 * =============================================================================
 *   @func CSL_edma3GetHwChannelSetupQue
 *
 *   @desc
 *      Obtains the Channel setup i.e the channel to que mapping
 *
 *   @arg   hEdma
 *          Channel Handle 
 *
 *   @arg   que
 *          Queue currently mapped to the channel
 *
 *   @ret   CSL_Status
 *          CSL_SOK             - Setup Param successful
 *          CSL_ESYS_BADHANDLE  - Invalid handle
 *          CSL_ESYS_INVPARAMS  - Invalid parameter
 *
 *   @eg
 *          CSL_Edma3Handle         hModule;
            CSL_Edma3Obj            edmaObj;
            CSL_Edma3Context        context;
            CSL_Edma3HwSetup        hwSetup;
            CSL_Status              status;
            CSL_Edma3Que            evtQue;
            CSL_Edma3ChannelHandle  hChannel;
            CSL_Edma3HwDmaChannelSetup  dmahwSetup[CSL_EDMA3_NUM_DMACH] = 
                                              CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
            CSL_Edma3HwQdmaChannelSetup qdmahwSetup[CSL_EDMA3_NUM_QDMACH] = 
                                              CSL_EDMA3_QDMACHANNELSETUP_DEFAULT; 
            // Module Initialization
            CSL_edma3Init(&context);
             
            // Module Level Open    
            hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
            
            // Module Setup
            hwSetup.dmaChaSetup  = &dmahwSetup[0];
            hwSetup.qdmaChaSetup = &qdmaSetup[0];
            CSL_edma3HwSetup(hModule,&hwSetup);
            
            // Channel 0 Open in context of Shadow region 0
            chAttr.regionNum = CSL_EDMA3_REGION_0;
            chAttr.chaNum = CSL_EDMA3_CHA_DSPINT;
            hChannel = CSL_edma3ChannelOpen(&ChObj,
                                    CSL_EDMA3,
                                    &chAttr,                            
                                    &status);   
        
            // Get the que to which a channel is mapped
            CSL_edma3GetHwChannelSetupQue(hCh

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -