acpy2_setsrcframeidx.c

来自「The DSPLIB is a collection of 39 high-le」· C语言 代码 · 共 45 行

C
45
字号
/*
 *  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_setSrcFrameIndex, ".text:ACPY2_setSrcFrameIndex")

#include <std.h>

#include <csl_edma.h>

#include <idma2_priv.h>

/*
 *  ======== ACPY2_setSrcFrameIndex ======== 
 *  Rapidly configure the source Frame index parameter of an IDMA2 channel
 *  Note that both source and destination indexes are set simultaneously 
 *  on the C6x1x with this API.
 */
Void ACPY2_setSrcFrameIndex(IDMA2_Handle handle, Int frameIndex)
{
    handle->params.srcFrameIndex = frameIndex;
    
    /*
     * For 2D to 2D transfers, src and dst indices must be set to same
     * value.
     */
    if (handle->params.xType == IDMA2_2D2D) {
        handle->params.dstFrameIndex = frameIndex;
    }   
    
    /*
     * The idx register value is recomputed
     */
    handle->config.idx &= 0x0000FFFF;  //clear the frame index field
    handle->config.idx |= 
        EDMA_FMK(IDX,FRMIDX,(handle->params.srcFrameIndex)); 
}


⌨️ 快捷键说明

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