c6711_qdma.c

来自「该代码实现了 两次下载法在dspC6713平台上 烧写flash的操作过程」· C语言 代码 · 共 58 行

C
58 行
字号
/*****************************************************************************
* File name :     C6711_QDMA.c
* Description:
******************************************************************************/
#ifndef MASTER_FILE
#define C6711_GLOBALS
#include "includes.h"
#endif

#include "QDMA.H"

/******************************************************************************
* Function    : qdma_init()
* description : Initializing QDMA transfer.
*               A typical QDMA transfer is performed by writing four of the 
*               parameter values to their registers followed by the write of 
*               the fifth parameter to its corresponding pseudo-register.
******************************************************************************/
void qdma_init(
              unsigned int src_addr,    
              unsigned int dst_addr,    
              unsigned int element_count,    
              unsigned int frame_count,
              unsigned int element_index,
              unsigned int frame_index,    
              unsigned int s_opt   
                  )
{
 QDMA_SRC_WRITE(src_addr,0); 
 QDMA_DST_WRITE(dst_addr,0); 
 QDMA_ELECNT_WRITE(element_count,0); 
 QDMA_FRMCNT_WRITE(frame_count,0);  
 QDMA_ELEIDX_WRITE(element_index,0); 
 QDMA_FRMIDX_WRITE(frame_index,0); 
 QDMA_OPT_WRITE(s_opt,1); 
 
}


/******************************************************************************
* Function   : qdma_reset()                                                  
* Description: This function reset QDMA Parameters to 0.                           
******************************************************************************/
void qdma_reset()
{
 QDMA_OPT_WRITE(0,0);  
 QDMA_SRC_WRITE(0,0); 
 QDMA_DST_WRITE(0,0); 
 QDMA_ELECNT_WRITE(0,0); 
 QDMA_FRMCNT_WRITE(0,0);  
 QDMA_ELEIDX_WRITE(0,0); 
 QDMA_FRMIDX_WRITE(0,0);
  
}


/* END OF FILE */

⌨️ 快捷键说明

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