亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ezkitutilities.c

?? UCOS-II2.76在ADI-BF533上的移植.在UCOS-II網(wǎng)站提供的源碼基礎(chǔ)上修改了幾處匯編代碼.采用2.76版系統(tǒng)內(nèi)核移植,在DSP++4.0上調(diào)試成功
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*********************************************************************************

Copyright(c) 2005 Analog Devices, Inc. All Rights Reserved. 

This software is proprietary and confidential.  By using this software you agree
to the terms of the associated Analog Devices License Agreement.  

$RCSfile: ezkitutilities.c,v $
$Revision: 1.15 $
$Date: 2005/08/30 18:41:29 $

Description:	EZ-Kit utility routines.  This file contains a collection
				of functions that automate typical EZ-Kit functionality, 
				including control of LEDs and push buttons.  
			
*********************************************************************************/


/*********************************************************************

Include files

*********************************************************************/

#include <services/services.h>		// system service includes
#include <sysreg.h>					// system config definitions
#include "ezkitutilities.h"			// EZ-Kit utility definitions 



/*********************************************************************

Button/LED to Flag pin mappings

*********************************************************************/

#if defined(__ADSP_EDINBURGH__)			// ADSP-BF533 EZ-Kit specific info
static ADI_FLAG_ID Button[] = {
	/* button[0] (PB1) */ ADI_FLAG_PF8, 	// EZ_FIRST_BUTTON
	/* button[1] (PB2) */ ADI_FLAG_PF9, 
	/* button[2] (PB3) */ ADI_FLAG_PF10, 
	/* button[3] (PB4) */ ADI_FLAG_PF11		// EZ_LAST_BUTTON
};
static ADI_FLAG_ID LED[] = {	//(not used on Edinburgh but needed as placeholder)
	/* led[4] */ ADI_FLAG_PF0, 				// EZ_FIRST_LED
	/* led[5] */ ADI_FLAG_PF0,
	/* led[6] */ ADI_FLAG_PF0,
	/* led[7] */ ADI_FLAG_PF0,
	/* led[8] */ ADI_FLAG_PF0,
	/* led[9] */ ADI_FLAG_PF0				// EZ_LAST_LED
};
#endif

#if defined(__ADSP_BRAEMAR__)			// ADSP-BF537 EZ-Kit specific info
static ADI_FLAG_ID Button[] = {
	/* button[0] (PB1) */ ADI_FLAG_PF2, 	// EZ_FIRST_BUTTON
	/* button[1] (PB2) */ ADI_FLAG_PF3, 
	/* button[2] (PB3) */ ADI_FLAG_PF4, 
	/* button[3] (PB4) */ ADI_FLAG_PF5		// EZ_LAST_BUTTON
};
static ADI_FLAG_ID LED[] = {
	/* led[1] */ ADI_FLAG_PF6, 				// EZ_FIRST_LED
	/* led[2] */ ADI_FLAG_PF7, 
	/* led[3] */ ADI_FLAG_PF8, 
	/* led[4] */ ADI_FLAG_PF9, 
	/* led[5] */ ADI_FLAG_PF10, 
	/* led[6] */ ADI_FLAG_PF11				// EZ_LAST_LED
};
#endif


#if defined(__ADSP_TETON__)
static ADI_FLAG_ID LED[] = {
	/* led[0]  (LED5)  */ ADI_FLAG_PF40, 	// EZ_FIRST_LED
	/* led[1]  (LED6)  */ ADI_FLAG_PF41, 
	/* led[2]  (LED7)  */ ADI_FLAG_PF42, 
	/* led[3]  (LED8)  */ ADI_FLAG_PF43, 
	/* led[4]  (LED9)  */ ADI_FLAG_PF44, 
	/* led[5]  (LED10) */ ADI_FLAG_PF45, 
	/* led[6]  (LED11) */ ADI_FLAG_PF46, 
	/* led[7]  (LED12) */ ADI_FLAG_PF47,
	/* led[8]  (LED13) */ ADI_FLAG_PF32, 
	/* led[9]  (LED14) */ ADI_FLAG_PF33, 
	/* led[10] (LED15) */ ADI_FLAG_PF34, 
	/* led[11] (LED16) */ ADI_FLAG_PF35, 
	/* led[12] (LED17) */ ADI_FLAG_PF36, 
	/* led[13] (LED18) */ ADI_FLAG_PF37, 
	/* led[14] (LED19) */ ADI_FLAG_PF38, 
	/* led[15] (LED20) */ ADI_FLAG_PF39		// EZ_LAST_LED
};

static ADI_FLAG_ID Button[] = {
	/* button[0] (SW6) */ ADI_FLAG_PF5, 	// EZ_FIRST_BUTTON
	/* button[1] (SW7) */ ADI_FLAG_PF6, 
	/* button[2] (SW8) */ ADI_FLAG_PF7, 
	/* button[3] (SW9) */ ADI_FLAG_PF8		// EZ_LAST_BUTTON
};

#endif


#define EZ_NUM_BUTTONS					(sizeof(Button)/sizeof(Button[0]))		// number of buttons
#define EZ_BUTTON_TO_FLAG(ButtonNumber) Button[ButtonNumber-EZ_FIRST_BUTTON]	// converts button number to flag ID

#define EZ_NUM_LEDS						(sizeof(LED)/sizeof(LED[0]))			// number of LEDs
#define EZ_LED_TO_FLAG(LEDNumber) 		LED[LEDNumber-EZ_FIRST_LED]				// converts LED number to flag ID


/*********************************************************************

Peripheral ID Macros

This program works on the EZ-Kits.  The macros
below are used to identify which EZ-Kit we're targeting.  Specifically, 
the FLAG_PERIPHERAL_ID macro is set to the peripheral ID to which the 
interrupt driven push buttons are mapped.  See the adi_int.h file
within the system services library (blackfin/include/services) for
more information on peripheral IDs.  

*********************************************************************/

#if defined(__ADSP_EDINBURGH__)
#define FLAG_PERIPHERAL_ID	(ADI_INT_PFA)
#endif

#if defined(__ADSP_BRAEMAR__)
#define FLAG_PERIPHERAL_ID	(ADI_INT_PORTFG_A)
#endif

#if defined(__ADSP_TETON__)
#define FLAG_PERIPHERAL_ID	(ADI_INT_PF0_15_A)
#endif


/*********************************************************************

Enumerations and defines

*********************************************************************/

#if defined(__ADSP_EDINBURGH__)			// the Edinburgh EZ-Kit uses a flash for ports

#define pFlashA_PortA_In	((volatile unsigned char *)0x20270000)	// address of flash A port A input data register
#define pFlashA_PortA_Out	((volatile unsigned char *)0x20270004)	// address of flash A port A output data register
#define pFlashA_PortA_Dir	((volatile unsigned char *)0x20270006)	// address of flash A port A direction register

#define pFlashA_PortB_In	((volatile unsigned char *)0x20270001)	// address of flash A port B input data register
#define pFlashA_PortB_Out	((volatile unsigned char *)0x20270005)	// address of flash A port B output data register
#define pFlashA_PortB_Dir	((volatile unsigned char *)0x20270007)	// address of flash A port B direction register

#define pFlashB_PortA_In	((volatile unsigned char *)0x202E0000)	// address of flash B port A input data register
#define pFlashB_PortA_Out	((volatile unsigned char *)0x202E0004)	// address of flash B port A output data register
#define pFlashB_PortA_Dir	((volatile unsigned char *)0x202E0006)	// address of flash B port A direction register

#define pFlashB_PortB_In	((volatile unsigned char *)0x202E0001)	// address of flash B port B input data register
#define pFlashB_PortB_Out	((volatile unsigned char *)0x202E0005)	// address of flash B port B output data register
#define pFlashB_PortB_Dir	((volatile unsigned char *)0x202E0007)	// address of flash B port B direction register

#endif


/*********************************************************************

Miscellaneous defines

*********************************************************************/

#if defined(__ADSP_EDINBURGH__)			// ADSP-BF533 EZ-Kit specific info
#define RST_7183 				(0x8) 	    //decoder reset bit #3 in flashA portA
#define PPICLK_ADV7183_SELECT 	(0x10)		//decoder clock to PPI bit #4 in flashA portA
#define ADV7183_OE_MASK 	(0x4)		//ADV7183 /OE = PF2
#define ADV7183_OE			(0)			//Index into Codec flag handler array
#define RST_7171 				(0x4)		// encoder reset
#endif


#if defined(__ADSP_TETON__)
#define ADV7183_RESET		(13)		//decoder reset bit
#define ADV7183_OE 		(2)		//ADV7183 /OE = PF2
#define ADV7183_Reset_Delay   	0x04000000	// For delay after reset
#define ADV7183_Lock   		0x0000ffff	// For startup locktime delay
#define ADV7179_RESET 		(14)		// encoder reset bit
#endif 




/*********************************************************************

static functions


*********************************************************************/

static void ezInitPower(u8 NumCores);			// initializes power to 600/120
static void ezInitAsync(void);			// configures async memory for use
static void ezInitFlashA(void);			// sets up the flash
static void ezInitLEDs(void);			// initialized LEDs
static void ezInitButtons(void);		// initializes buttons

static void ezTerminateLEDs(void);		// terminates LEDs
static void ezTerminateButtons(void);	// terminates buttons


/*********************************************************************

	Function:		ezInit

	Description:	Initializes the Utilities service.  Specifically:
					- configures async memories
					- configures flash (where applicable)
					- configures power to 600/120
					- configures all LEDs
					- configures all pushbuttons
					

*********************************************************************/
void ezInit(u8 NumCores)
{
	
	// configure async memory
#if defined(__ADSP_EDINBURGH__)			// ADSP-BF533 EZ-Kit specific info
	ezInitAsync();
#endif
	
	// configure flash 
#if defined(__ADSP_EDINBURGH__)			// ADSP-BF533 EZ-Kit specific info
	ezInitFlashA();
#endif
	
	// configure power
	ezInitPower(NumCores);

	// configure LEDs
	ezInitLEDs();
	
	// configure buttons
	ezInitButtons();
	
}

/*********************************************************************

	Function:		ezTerminate

	Description:	Terminates the utilities.  Specifically
					- terminates LEDs
					- terminates buttons

		
*********************************************************************/
void ezTerminate()
{
	// terminate LEDs
	ezTerminateLEDs();
	
	// terminate buttons
	ezTerminateButtons();
}




/*********************************************************************

	Function:		ezEnableVideoDecoder

	Description:	Connects up the bus, sets up the video clocking and
					enables the AD7183.  

*********************************************************************/

void ezEnableVideoDecoder(void)			// connects bus, sets up video clock and enables the 7183
{

#if defined(__ADSP_EDINBURGH__)			// ADSP-BF533 EZ-Kit specific info
#define ADV7183_OE_FLAG ADI_FLAG_PF2
	
	unsigned short tempReg;
	
	//The GPIOs of the flash are linked to the ADV7183 reset pin as well as to the 
	//switch that drives the PPI clock. De-assert the ADV7183 reset and link the ADV7183 
	//Clock "LLC1" to the Blackfin PPI clock input.  See EZ-KIT schematics for more details.
	tempReg = *pFlashA_PortA_Out;
	*pFlashA_PortA_Out = tempReg | RST_7183 | PPICLK_ADV7183_SELECT;
	
	//Setup the Blackfin PF registers
#if defined(__ADSP_EDINBURGH__) && (__SILICON_REVISION__==0xffff || __SILICON_REVISION__==0x1)
 		tempReg = *pFIO_INEN;
		*pFIO_INEN = tempReg | ADV7183_OE_MASK;
#endif
	
	// open PF2 and PF13
	adi_flag_Open(ADI_FLAG_PF2);
	adi_flag_Open(ADI_FLAG_PF13);
	
	//Blackfin PF2 pin must be set as output
	adi_flag_SetDirection(ADI_FLAG_PF2, ADI_FLAG_DIRECTION_OUTPUT);
	
	//Set the Blackfin pin PF2 to output enable the ADV7183 data bus	
	adi_flag_Clear(ADI_FLAG_PF2);
	
#endif // Edinburgh


#if defined(__ADSP_TETON__)

 	volatile long delay_time;	

	//Blackfin PF2 pin must be set as output
	adi_flag_SetDirection(ADI_FLAG_PF2, ADI_FLAG_DIRECTION_OUTPUT);

	//Blackfin PF13 pin must be set as output
	adi_flag_SetDirection(ADI_FLAG_PF13, ADI_FLAG_DIRECTION_OUTPUT);
	ssync();
	
	// set bit PF2 to disable ADV7183 outputs
	adi_flag_Set(ADI_FLAG_PF2);
	ssync();

	// clear bit PF13 to reset ADV7183 
	adi_flag_Clear(ADI_FLAG_PF13);
	ssync();

	// set bit PF13 to re-enable ADV7183 
	adi_flag_Set(ADI_FLAG_PF13);
	ssync();

	for (delay_time = 0; delay_time < ADV7183_Reset_Delay; delay_time++)
		asm("nop;");
	
	// clear bit to enable ADV7183 outputs
	adi_flag_Clear(ADI_FLAG_PF2);
	ssync();

	for (delay_time = 0; delay_time < ADV7183_Lock; delay_time++)
		asm("nop;");
				 
#endif   // Teton

}

/*********************************************************************

	Function:		ezEnableVideoEncoder

	Description:	Enables the AD7171 or AD7179

*********************************************************************/

void ezEnableVideoEncoder(void)		// enables the 7171
{

#if defined(__ADSP_EDINBURGH__)			// ADSP-BF533 EZ-Kit specific info
	*pFlashA_PortA_Out = 0;
	*pFlashA_PortA_Out |= RST_7171;
#endif // Edinburgh


#if defined(__ADSP_TETON__)

	// open PF14
	adi_flag_Open(ADI_FLAG_PF14);
	
	//Blackfin PF14 pin must be set as output
	adi_flag_SetDirection(ADI_FLAG_PF14, ADI_FLAG_DIRECTION_OUTPUT);
	ssync();
 
	// clear bit to reset ADV7179, Blackfin pin PF14 	
	adi_flag_Clear(ADI_FLAG_PF14);
	ssync();

	adi_flag_Set(ADI_FLAG_PF14);
	ssync();


#endif   // Teton

}




/*********************************************************************

	Function:	ezDisableVideoEncoder

	Description:	Disables the AD7179.  

*********************************************************************/

void ezDisableVideoEncoder(void)
{

#if defined(__ADSP_TETON__)
	adi_flag_Clear(ADI_FLAG_PF14);

	// close PF14
	adi_flag_Close(ADI_FLAG_PF14);
	
	ssync();
#endif
}


/*********************************************************************

	Function:		ezDisableVideoDecoder

	Description:	 Disables 7183
*********************************************************************/

void ezDisableVideoDecoder(void)
{

#if defined(__ADSP_EDINBURGH__)			// ADSP-BF533 EZ-Kit specific info
	// do we need to do anything???
#endif // Edinburgh

#if defined(__ADSP_TETON__)

	// set bit PF2 to disable ADV7183 outputs
	adi_flag_Set(ADI_FLAG_PF2);
	ssync();

	// clear bit PF13 to reset ADV7183 
	adi_flag_Clear(ADI_FLAG_PF13);
	ssync();	
#endif

	// close PF2 and PF13
	adi_flag_Close(ADI_FLAG_PF2);
	adi_flag_Close(ADI_FLAG_PF13);
	
}


/*********************************************************************

	Function:		ezTurnOnLED

	Description:	Turns an LED on.  

*********************************************************************/

void ezTurnOnLED(u32 LEDNumber)	// turns on an LED
{

#if defined(__ADSP_EDINBURGH__)			// ADSP-BF533 EZ-Kit specific info
	switch(LEDNumber) {
		case 4:
			*pFlashA_PortB_Out |= 0x0001;
			break;
		case 5:
			*pFlashA_PortB_Out |= 0x0002;
			break;
		case 6:
			*pFlashA_PortB_Out |= 0x0004;
			break;
		case 7:
			*pFlashA_PortB_Out |= 0x0008;
			break;
		case 8:
			*pFlashA_PortB_Out |= 0x0010;
			break;
		case 9:
			*pFlashA_PortB_Out |= 0x0020;
			break;
	}
#endif // Edinburgh

#if defined(__ADSP_BRAEMAR__) || defined (__ADSP_TETON__) // ADSP-BF537 & BF561 EZ-Kit specific info
	adi_flag_Set(EZ_LED_TO_FLAG(LEDNumber));
#endif // Braemar or teton

}
			


/*********************************************************************

	Function:		ezTurnOffLED

	Description:	Turns an LED off.  

*********************************************************************/

void ezTurnOffLED(u32 LEDNumber)	// turns on an LED
{

#if defined(__ADSP_EDINBURGH__)			// ADSP-BF533 EZ-Kit specific info
	switch(LEDNumber) {
		case 4:
			*pFlashA_PortB_Out &= ~0x0001;
			break;
		case 5:
			*pFlashA_PortB_Out &= ~0x0002;
			break;
		case 6:
			*pFlashA_PortB_Out &= ~0x0004;
			break;
		case 7:
			*pFlashA_PortB_Out &= ~0x0008;
			break;
		case 8:
			*pFlashA_PortB_Out &= ~0x0010;
			break;
		case 9:
			*pFlashA_PortB_Out &= ~0x0020;
			break;
	}
#endif // Edinburgh

#if defined(__ADSP_BRAEMAR__) || defined (__ADSP_TETON__) // ADSP-BF537 & BF561 EZ-Kit specific info
	adi_flag_Clear(EZ_LED_TO_FLAG(LEDNumber));
#endif // Braemar or Teton

}
			

/*********************************************************************

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久亚洲国产美女国产盗摄| 色婷婷av一区二区| 日韩美女在线视频| 国产精品一区二区在线播放| 国产精品久久久久久妇女6080 | 777xxx欧美| 麻豆国产欧美日韩综合精品二区| 精品99999| 91视频你懂的| 日韩精品一级中文字幕精品视频免费观看 | 色综合色狠狠天天综合色| 亚洲国产一区二区在线播放| 日韩欧美色综合网站| 国产精品18久久久| 亚洲欧美日韩国产一区二区三区| 欧美日韩精品专区| 国产九色sp调教91| 亚洲精品成人少妇| 精品少妇一区二区三区在线播放| 成人app在线| 日韩在线a电影| 国产农村妇女毛片精品久久麻豆| 色欧美日韩亚洲| 久久精品理论片| 亚洲精品乱码久久久久久黑人| 这里只有精品视频在线观看| 国产不卡视频一区| 香蕉成人啪国产精品视频综合网 | 国产精品美女久久久久久| 欧美日韩一卡二卡| 国产+成+人+亚洲欧洲自线| 亚洲福利一二三区| 国产精品久久久久一区二区三区| 欧美日韩小视频| 成人av中文字幕| 久久精品国产99久久6| 亚洲免费观看视频| 久久久久久免费| 欧美疯狂性受xxxxx喷水图片| 国产91丝袜在线播放0| 日本成人在线视频网站| 亚洲日本中文字幕区| 久久综合五月天婷婷伊人| 欧美午夜精品一区二区三区| 国产成人免费av在线| 另类综合日韩欧美亚洲| 午夜激情一区二区| 久草精品在线观看| 国产精品久久久久四虎| 国产精品亚洲一区二区三区在线| 欧美精选午夜久久久乱码6080| 国产成人午夜视频| 人人超碰91尤物精品国产| 亚洲午夜在线视频| 亚洲美女免费视频| 亚洲国产激情av| 久久夜色精品一区| 欧美电视剧免费观看| 欧美一卡二卡在线| 欧美日韩午夜在线| 欧美日韩一级二级三级| 欧美三级视频在线观看| 91激情在线视频| 色综合咪咪久久| 91在线一区二区三区| 97精品久久久午夜一区二区三区 | 韩国视频一区二区| 韩国精品久久久| 青青草国产成人av片免费| 日韩精品一二三区| 奇米精品一区二区三区四区 | 精品国产乱码久久久久久免费| 欧美一级精品在线| 日韩一区二区不卡| 欧美不卡视频一区| 精品日韩欧美在线| 国产日韩欧美高清在线| 欧美韩国日本不卡| 成人欧美一区二区三区1314| 亚洲天堂网中文字| 一区二区三区成人在线视频| 亚洲成人手机在线| 久久精品72免费观看| 精品亚洲aⅴ乱码一区二区三区| 国产在线精品视频| 国产99一区视频免费| 97国产一区二区| 欧美揉bbbbb揉bbbbb| 51精品久久久久久久蜜臀| 日韩午夜电影av| 欧美激情综合五月色丁香小说| 国产精品第五页| 亚洲一区在线电影| 麻豆精品国产传媒mv男同| 国产成人在线观看免费网站| av不卡免费在线观看| 欧美日韩免费一区二区三区| 91精品国产高清一区二区三区 | 久久久亚洲精华液精华液精华液| 中文字幕欧美区| 亚洲蜜臀av乱码久久精品蜜桃| 午夜视频一区在线观看| 国产酒店精品激情| 欧美亚洲自拍偷拍| 精品国产区一区| 亚洲精品国产无套在线观| 日韩在线一区二区| 成人激情小说网站| 欧美老人xxxx18| 久久久国产精品麻豆| 亚洲综合视频在线观看| 国精品**一区二区三区在线蜜桃| 99久久亚洲一区二区三区青草| 欧美精品久久一区二区三区| 国产日韩欧美激情| 日韩中文字幕不卡| av一本久道久久综合久久鬼色| 精品视频1区2区3区| 国产视频一区二区三区在线观看| 亚洲精品中文在线观看| 国产在线不卡一卡二卡三卡四卡| 色婷婷亚洲综合| 久久亚洲影视婷婷| 亚洲一区中文日韩| 床上的激情91.| 日韩精品专区在线影院观看| 亚洲乱码日产精品bd| 国产精品1024| 欧美一区二区三区在线观看视频| 亚洲天堂av一区| 国产成人精品网址| 日韩欧美一区中文| 亚洲一区二区中文在线| 成人高清视频在线| 精品国产不卡一区二区三区| 亚洲成人午夜电影| 色综合久久99| 国产精品久久久久9999吃药| 蜜臀精品久久久久久蜜臀| 91官网在线观看| 亚洲人吸女人奶水| 国产寡妇亲子伦一区二区| 日韩一区二区电影网| 天天操天天干天天综合网| 色婷婷久久久亚洲一区二区三区| 国产欧美日韩精品一区| 韩国v欧美v日本v亚洲v| 日韩一二三四区| 婷婷亚洲久悠悠色悠在线播放| 色乱码一区二区三区88 | 亚洲综合色噜噜狠狠| 96av麻豆蜜桃一区二区| 亚洲国产精品av| 高清国产一区二区三区| 久久久91精品国产一区二区精品| 奇米影视7777精品一区二区| 7777女厕盗摄久久久| 亚洲成av人片观看| 欧美精品在线一区二区| 午夜精品福利久久久| 8x8x8国产精品| 视频一区二区三区在线| 精品婷婷伊人一区三区三| 亚洲成av人片在线观看无码| 欧美性色黄大片| 亚洲高清免费在线| 在线播放中文字幕一区| 日韩国产精品91| 欧美v日韩v国产v| 韩国精品在线观看| 欧美国产精品久久| 99精品欧美一区二区蜜桃免费| 亚洲欧美色综合| 欧美日韩美女一区二区| 免费在线看成人av| 日韩精品一区二区三区中文不卡 | 国产精品天干天干在线综合| 国产不卡免费视频| 亚洲麻豆国产自偷在线| 色老汉一区二区三区| 日韩二区三区四区| 精品国产一区二区三区不卡 | 欧美日韩国产一二三| 麻豆精品久久精品色综合| 国产午夜一区二区三区| 99久久综合精品| 三级影片在线观看欧美日韩一区二区| 日韩欧美自拍偷拍| 成人a免费在线看| 亚洲成人精品一区二区| 久久综合一区二区| 色综合久久66| 久久精品国产亚洲5555| 国产精品乱码妇女bbbb| 欧美三级视频在线播放| 国产一区二区三区四区五区入口| 亚洲欧美在线高清| 91精品国模一区二区三区| 国产精品香蕉一区二区三区| 亚洲制服丝袜av|