📄 main.c
字号:
/*****************************************************************************************/
//
// Name: BF533 EZ-KIT video ITU-656 receive mode
//
/*****************************************************************************************
(C) Copyright 2006 - Analog Devices, Inc. All rights reserved.
File Name: Main.c
Date Modified: 10/25/04 Rev 0.2
Software: VisualDSP++4.5
Hardware: BF533 EZ-KIT Board
Special Connections: Connect a CVBS video source to the right bottom video jack "AVIN1"
change switch #6 of SW3 to on of the ADSP-BF533 EZ-KIT Lite.
Purpose: After reset the ADV7183 is configured to output digital
video data in ITU656 mode 8bits wide. Additionally, The DSP is
configured to receive video data in ITU-656 format via the PPI Interface.
The DMA channel 0 is dedicated to transfer the data to the
external SDRAM immediately (Address 0x0).
******************************************************************************************/
#include <cdefBF533.h> //BF533 Register Pointer Definition
#include <stdio.h>
#include <sys\exception.h> //Interrupt Handling Header
#include <sysreg.h>
#include "ccblkfn.h"
char test_S[10];
char test_D[10];
void Init_DMA(void)
{
int i,j;
*pMDMA_S0_START_ADDR=test_S;
i=sizeof(test_S);
*pMDMA_S0_X_COUNT=i;
*pMDMA_S0_CONFIG=0<<15|0<<12|0<<8|0<<7|0<<6|0<<5|0<<4|0<<2|0<<1|1<<0;
*pMDMA_D0_START_ADDR=test_D;
j=sizeof(test_D);
*pMDMA_D0_X_COUNT=j;
*pMDMA_D0_CONFIG=0<<15|0<<12|0<<8|0<<7|0<<6|0<<5|0<<4|0<<2|1<<1|1<<0;
}//end Init_DMA
void main()
{
int i = 0,j=0;
*pEBIU_AMGCTL=0x00f2;
*pEBIU_AMBCTL0=0xffc2ffc2;
*pEBIU_AMBCTL1=0xffc2ffc2;
for (i=0;i<sizeof(test_S);i++)
{
test_S[i]=i+100;
}
for (i=0;i<sizeof(test_D);i++)
{
test_D[i]=0;
}
printf("\n PROGRAM IS RUN! ..........\n");
Init_DMA(); //DMA Setup "SDRAM->SDRAM"
for(i=0;i<100000;i++)
{
j++;
}
printf("\n PROGRAM IS END!\n");
while (1)
{
i = 1;
}
}//end main
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -