adv7183_reset.c

来自「Using the ADSP-BF561 Blackfin Processor 」· C语言 代码 · 共 71 行

C
71
字号
/*****************************************************************************
**																			**
**	 Project Name: 	LCD											**	
**																			**
******************************************************************************

(C) Copyright 2005 - Analog Devices, Inc.  All rights reserved.

File Name:		ADV7183_reset.c

Date Modified:	5/1/05		CL		Rev 1.0

Software:       VisualDSP++3.5

Hardware:		ADSP-BF561 EZ-KIT Lite

Special Connections:  None

Purpose:		This file initializes the ADV7183A video decoder.
				
******************************************************************************/


#include "main.h"

/********************************************************************************/
/***** Reset_ADV7183()														*****/
/***** Resets the Video decoder through PF2									*****/
/********************************************************************************/


// specific defines for this module. Not used anywhere else
#define ADV7183_OE_bit 2   					// ADV7183 /OE = PF2
#define ADV7183_RESET_bit 13   				// ADV7183 /reset = PF13
#define ADV7183_Lock   0x00ffffff    		// For startup locktime delay
#define ADV7183_Reset_Delay   0x04000000   	// For delay after reset



void Reset_ADV7183(void )
{ long delay_time;

	// configure OE and RESET flags as output
	*pFIO0_DIR |= (1 << ADV7183_OE_bit) | (1 << ADV7183_RESET_bit);
	ssync();

	// disable outputs
	*pFIO0_FLAG_S = (1 << ADV7183_OE_bit);	// set bit to disable ADV7183 outputs
	ssync();

	// generate reset pulse
	*pFIO0_FLAG_C = (1 << ADV7183_RESET_bit);	// clear bit to reset ADV7183 
	ssync();

	*pFIO0_FLAG_S = (1 << ADV7183_RESET_bit);	// set bit to re-enable ADV7183 
	ssync();

	for (delay_time = 0; delay_time < ADV7183_Reset_Delay; delay_time++)
			asm("nop;");

	// now enable outputs
	*pFIO0_FLAG_C = (1 << ADV7183_OE_bit);	// clear bit to enable ADV7183 outputs
	ssync();

	for (delay_time = 0; delay_time < ADV7183_Lock; delay_time++)
			asm("nop;");
	
}


⌨️ 快捷键说明

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