📄 c6711_qdma.c
字号:
/*****************************************************************************
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -