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

📄 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
 */
/* "@(#) DSP/BIOS 4.51.0 05-23-01 (barracuda-i10)" */
/*
 *  ======== dss_edmacisr.c ========
 */

#include <std.h>
#include <log.h>
#include <pip.h>

#define _EDMA_  1

#include "dss.h"
#include "dss_priv.h"

/*
 *  ======== DSS_edmaIsr ========
 *
 *  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.
 */
Void DSS_edmaIsr(Void)
{
    Int channel = EDMA_RGET(CIPR);  /* get Channel Interrupt Pending bits */

    DSS_computePhase(channel);      /* compute I/O phase difference */
    
    LOG_message("DSS_edmaIsr: 0x%x", channel);
    
    if (channel & DSS_RXDONE) { /* Channel = McBSP Buffer Rx'ed */
        PIP_put(&DSS_rxPipe);
        DSS_rxCnt = 0;                  /* Reset Buffer Count for sync */

        EDMA_RSET(CIPR, DSS_RXDONE);    /* Reset EDMA Channel Flag */
        DSS_rxPrime(TRUE);
    }

    if (channel & DSS_TXDONE) { /* Channel = McBSP Buffer Tx'ed */
        PIP_free(&DSS_txPipe);
        DSS_txCnt = 0;                  /* Reset Buffer Count for sync */
        
        EDMA_RSET(CIPR, DSS_TXDONE);    /* Reset EDMA Channel Flag */
        DSS_txPrime(TRUE);
    }
}

⌨️ 快捷键说明

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