adv7179_init.c

来自「ADI的ADSP-BF561下实现PAL制式video的demo。」· C语言 代码 · 共 95 行

C
95
字号
#include <sys/exception.h>

#include "I2C.h"
#include "ADV7179.h"
void ADV7179_init(void);

extern volatile int SCCB_In_Progress;								
void ADV7179_init(void)
{
short i = 0;
short b = 0;			
	

/*
for (i = 0; i < 26; i+=1){
		printf("i = %i   DAC CONFIG = %i\n", i, DAC_Config[i]);
		I2C_wr(ADV7179WR, i, DAC_Config[i]);
		while(SCCB_In_Progress){};
	}

*/
#if 0
	I2C_wr(ADV7179WR, MODE_REGISTER_1, 0x10);
	while(SCCB_In_Progress){};

//	I2C_wr(ADV7179WR, MODE_REGISTER_1, 0x90);
//	while(SCCB_In_Progress){};


	I2C_wr(ADV7179WR, MODE_REGISTER_2, 0x00);
	while(SCCB_In_Progress){};
	
	
	I2C_wr(ADV7179WR, MODE_REGISTER_3, 0x08);
	while(SCCB_In_Progress){};
	
	I2C_wr(ADV7179WR, MODE_REGISTER_4, 0x10);
	while(SCCB_In_Progress){};

			
	//I2C_wr(ADV7179WR, TIMER_REGISTER_0, BLANK_INPUT_DISABLE);
	//while(SCCB_In_Progress){};
#endif
	I2C_wr(ADV7179WR,0x00,0x05 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x01,0x10 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x02,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x03,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x04,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x07,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x08,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x09,0xCB );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x0A,0x8A );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x0B,0x09 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x0C,0x2A );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x0D,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x0E,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x0F,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x10,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x11,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x12,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x13,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x14,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x15,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x16,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x17,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x18,0x00 );
	while(SCCB_In_Progress){};
	I2C_wr(ADV7179WR,0x19,0x00 );
	while(SCCB_In_Progress){};


}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?