📄 main_control.c
字号:
/*****************************************************************************************/
//
// Name: BF533 Object Tracking
//
/*****************************************************************************************
File Name: Main_ConTrol.c
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 "Main_Control.h"
#include "DMA_Config.h"
#include "Flash_Setup.h"
#include "ISR_Config.h"
#include "PLL_Setup.h"
#include "PPI_Config.h"
#include "SDRAM_Config.h"
#include "Ob_Track.h"
#include "I2C.h"
#include "videograph.h"
BOOL VideoInInit(void)
{
//Initialize SAA7113
SAA7113_Cnfg();
// Initialize DMA for SAA7113
Init_DMA(); //DMA Setup "PPI->DMA->SDRAM" Its conigured in Sotp Mode
// Initialize PPI for SAA7113
Init_PPI(); //PPI Setup
asm("ssync;");
// Enable PPI
*pPPI_CONTROL |= PORT_EN;
return TRUE;
}
BOOL VideoOutInit(void)
{
// Initialize ADV7171
ADV7179_Cnfg();
// Initialize frame buffer
PalVideoOutFrameBufferInit();
// Initialize DMA for ADV7171
Init_ADV7171_DMA();
// Initialize PPI for ADV7171
Init_ADV7171_PPI();
// Enable DMA
*pDMA0_CONFIG |= DMAEN;
asm("ssync;");
// Enable PPI
*pPPI_CONTROL |= PORT_EN;
return TRUE;
}
void main()
{
int i,j,count;
unsigned char temp[3];
count=0;
/*------------------------------------------------*/
//setup;
Init_PLL();
Init_EBIU(); //Async Memory Interface Setup
Init_Interrupts(); //Enter an interrupt subroutine after DMA has been finished
Init_SDRAM(); //SDRAM Setup to store the video image
/////////
SAA7113_Cnfg();
ADV7179_Cnfg();
// for(i=0;i<500;i++) {j=0;}
// VideoInInit();
// *pFIO_INEN |= KEY2;
// *pFIO_DIR &= ~KEY2;
//VideoOutInit();
while (1)
{
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -