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

📄 dss_edmacisr.c

📁 DSP 基于 TMS320C6711 DSK 的功能演示程序
💻 C
字号:
/*
 *  Copyright 2001 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.
 *  U.S. Patent Nos. 5,283,900  5,392,448
 */
/* "@(#) XDAS 2.12 05-21-01 (__imports)" */
/*
 *  ======== dss_edmacisr.c ========
 *
 */

#include <std.h>

#include <dss.h>

#include "c6711dsk.h"

/*
 *  ======== DSS_edmaIsr ========
 */
Void DSS_edmaIsr(Void)
{
    /*
     * This ISR is called under 2 conditions. Either when EDMA has received a
     * complete buffer of samples from Serial Port (Codec) or when a EDMA has
     * completed transmission of a buffer to the Serial Port (Codec).  This
     * ISR must configure the next buffer to be filled by the EDMA in each case.
     */

    int channel = 0;

    channel = *(volatile Uns *) CIPR;
        
    /*----------------------------------------------------------------------*/
    if  (channel & (0x0001<<1)) {       /* Channel = McBSP Buffer Rx'ed */
        PIP_put(&DSS_rxPipe);

        DSS_rxCnt = 0;          /* Reset Buffer Count for sync  */

        DSS_rxPrime();
        
        *(volatile Uns *) CIPR  = (0x0001<<1);  /* Reset EDMA Channel Flag */
    }
        
    /*----------------------------------------------------------------------*/
    if  (channel & (0x0002<<1)) {       /* Channel = McBSP Buffer Tx'ed */
        PIP_free(&DSS_txPipe);

        DSS_txCnt = 0;                  /* Reset Buffer Count for sync  */

        DSS_txPrime();

        *(volatile Uns *) CIPR  = (0x0002<<1);  /* Reset EDMA Channel Flag */
    }
}

⌨️ 快捷键说明

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