dss_edmacisr.c
来自「使用於 TI dsk6711中的很多好用的例子可以看」· C语言 代码 · 共 58 行
C
58 行
/*
* Copyright 2003 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.51.00 11-29-2003 (xdas-2.50.00.9)
*/
/*
* ======== 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 + =
减小字号Ctrl + -
显示快捷键?