📄 acpy2_initchan.c
字号:
/*
* Copyright 2002 by Texas Instruments Incorporated.
* All rights reserved. Property of Texas Instruments Incorporated.
* Restricted rights to use, duplicate or disclose this code are
* granted through contract.
*
*/
/* "@(#) XDAS 2.5.11 10-11-02 (xdas-d15)" */
#pragma CODE_SECTION(ACPY2_initChannel, ".text:ACPY2_initChannel")
#include <std.h>
#include <csl_edma.h>
#include <_acpy2.h>
#include <idma2_priv.h>
/*
* ======== ACPY2_initChannel ========
* Initialize the IDMA2 channel object passed in. Set the priority level
* based on the queue id.
*
*/
Void ACPY2_initChannel(IDMA2_Handle handle, Int queueId)
{
/*
* NOTE: qid is an arbitrary number that has to be mapped to physical
* hardware queues on the C6x EDMA device. The scheme chosen here
* is to map even queue ids to low priority h/w queue and odd queue
* ids to high priority h/w queue. This scheme can be customized to
* suit a specific application.
*/
if ((queueId % _ACPY2_NUM_HWQUEUES) == 0) {
//Set to low priority
(handle->config).opt = EDMA_FMK(OPT,PRI,EDMA_OPT_PRI_LOW);
}
else {
//Set to high priority
(handle->config).opt = EDMA_FMK(OPT,PRI,EDMA_OPT_PRI_HIGH);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -