📄 dma_config.c
字号:
/******************************************************************************/
//
// Name: BF532-based EZ-KIT DMA Setup
//
/******************************************************************************
Purpose: The file sets up the DMA transfer
*********************************************************************************/
#include <cdefBF533.h>
#define Line_Length 720
#define Frame_Length 576
void Init_DMA(void)
{
//Target address of the DMA
*pDMA0_START_ADDR = 0x00;
//Line_Length 16bit transfers will be executed
*pDMA0_X_COUNT = Line_Length;
//The modifier is set to 2 because of the 16bit transfers
*pDMA0_X_MODIFY = 0x2;
//Frame_Length 16bit transfers will be executed
*pDMA0_Y_COUNT = Frame_Length;
//The modifier is set to 2 because of the 16bit transfers
*pDMA0_Y_MODIFY = 0x2;
//PPI Peripheral is used
*pDMA0_PERIPHERAL_MAP = 0x0;
//DMA Config: Enable DMA | Memory write DMA | 2-D DMA | Discard DMA FIFO before start | enable assertation of interrupt | NDSIZE for stop mode | Enable STOP DMA
*pDMA0_CONFIG =0x10b7; //DMAEN | DI_EN | WNR | WDSIZE_16| DMA2D | RESTART | DI_EN;
}//end Init_DMA
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -