📄 mx21_dma.h
字号:
/**********************************************************************
*
* (C) COPYRIGHT 2004 FREESCALE, INC.
* ALL RIGHTS RESERVED
*
*
* Group/Division: WMSG/MMDO
*
* Description:
*
* Related Specifications:
*
* Errata:
*
* File Name: MX21_DMA.h
* Revision Number: 0.1
* Author(s): E Kroitor
* Date created: 30 September 2004
* Revision History:
* Date Rev Description
* ---- --- -----------
* 30Sept04 0.1 First draft
*
**********************************************************************/
#ifndef _MX21DMA_H_
#define _MX21DMA_H_
#include "MX21_MemMap.h"
#include "MX21_Macros.h"
#include "MX21_DataTypes.h"
#include "MX21_Common.h"
/********************************************************************
F U N C T I O N P R O T O T Y P E S
/*********************************************************************/
#define NUMBER_OF_BYTES 512
#define DMA_BURST_LENGTH 64
#define SDRAM_TEST_LENGTH NUMBER_OF_BYTES
#define SDRAM_TEST_LENGTH_WORD NUMBER_OF_BYTES / 4
#define OFFSET_FOR_CODE 0x10000
#define SOURCE_ADDRESS 0xC2000000
#define DESTINATION_ADDRESS 0xC3000000
/* DMA transfer example program */
void
dmaDemo(void); // main dma demo function
/*--------------------------------------------------
//
// Main Function
//-------------------------------------------------*/
void
fillMem(uint32_t); // start creating pattern
/*---------------------------------------------------
//
// Fill SDRAM memory source with predetermined pattern
//--------------------------------------------------*/
void
dmaSetUp(p_uint32_t, // source address
p_uint32_t, // destination address
int, // total bytes
int ); // burst length total
/*---------------------------------------------------
//
// Set up DMA for memory to memory transfer
//--------------------------------------------------*/
void
enableDmaTransfer(uint32_t); // transfer data via dma
/*---------------------------------------------------
//
// Enable DMA transfer and check if pattern on destination
// address is the same as the pattern on the source address.
// If it is the same, PASS
//--------------------------------------------------*/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -