📄 dmafreechannel.c
字号:
/******************************************************************************
* *
* ********** *
* ************ *
* *** *** *
* *** ++ *** *
* *** + + *** CHIPCON *
* *** + *
* *** + + *** *
* *** ++ *** *
* *** *** *
* ************ *
* ********** *
* *
*******************************************************************************
Filename: dmaFreeChannel.c
Target: cc2430
Author: EFU
Revised: 16/12-2005
Revision: 1.0
******************************************************************************/
#include <string.h>
#include "cul.h"
extern DMA_DESC __xdata dmaChannel1to4[4];
extern DMA_TABLE_ENTRY dmaTable[DMA_ADM_NUMBER_OF_CHANNELS];
//-----------------------------------------------------------------------------
// See cul.h for a description of this function.
//-----------------------------------------------------------------------------
void culDmaFreeChannel(BYTE dmaChannelNumber){
// Saving the old interrupt enable status and turning off global interrupt.
BYTE savedIntEnable = IEN0;
INT_GLOBAL_ENABLE(INT_OFF);
// Turning off the DMA channel
DMA_ABORT_CHANNEL(dmaChannelNumber);
// Clearing the channel occupied flag in the table
dmaTable[dmaChannelNumber].assigned = FALSE;
dmaTable[dmaChannelNumber].callBackFunction = NULL;
// Restoring the interrupt enable status
IEN0 = savedIntEnable;
return;
} // ends culDmaFreeChannel()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -