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

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

?? s3c2410xintrctl.c

?? 操作系統(tǒng)中的一找你個(gè)的相關(guān)的淡淡的碼源代碼
?? C
字號(hào):
/* s3c2410xIntrCtl.c - MagicARM2410 interrupt controller driver */

#include "vxWorks.h"
#include "config.h"

IMPORT	FUNCPTR sysIntLvlVecChkRtn;
IMPORT	FUNCPTR sysIntLvlEnableRtn;
IMPORT	FUNCPTR sysIntLvlDisableRtn;

/* hardware access methods */
#ifndef s3c2410x_INT_REG_READ
#define s3c2410x_INT_REG_READ(reg,result) \
	((result) = *(volatile UINT32 *)(reg))
#endif

#ifndef s3c2410x_INT_REG_WRITE
#define s3c2410x_INT_REG_WRITE(reg,data) \
	(*((volatile UINT32 *)(reg)) = (data))
#endif


/* Current interrupt level setting (s3c2410xIntLvlChg). */

/* 
 * A mask word.  Bits are set in this word when a specific level
 * is enabled. It is used to mask off individual levels that have
 * not been explicitly enabled.
 */
LOCAL UINT32 s3c2410xIntLvlEnabled;


/* forward declarations */
STATUS	s3c2410xIntLvlVecChk (int*, int*);
STATUS	s3c2410xIntLvlEnable (int);
STATUS	s3c2410xIntLvlDisable (int);

/*
 * s3c2410xIntDevInit - initialize the interrupt controller
 *
 * This routine will:
 *	<1> Initialize the interrupt controller device;
 *	<2> Disabling all interrupt sources;
 *	<3> Connect the device driver specific routines into the architecture level hooks.
 *
 *	If the BSP needs to create a wrapper routine around any of the arhitecture level routines,
 *	it should install the pointer to the wrapper routine after calling this routine.
 * 
 * RETURNS: N/A.
 */
int s3c2410xIntDevInit (void)
{
	UINT32 tempUINT32 = 0;
	
	/* <1> Initialize the interrupt controller device; */
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMSK,0xffffffff);	/* Mask all Interrupt. */
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTSUBMSK,0x7ff);	/* Mask all subInterrupt. */
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_EINTMASK,0x00FFFFF0);	/* Mask all EINT Interrupt. */
	
	s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_SUBSRCPND,tempUINT32);
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_SUBSRCPND,tempUINT32);	/* Clear SUBSRCPND */


	s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_EINTPND,tempUINT32);
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_EINTPND,tempUINT32);	/* Clear EINT EINTPENDn */
	
	s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_SRCPND,tempUINT32);
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_SRCPND,tempUINT32);	/* Clear SRCPND */
	
	s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTPND,tempUINT32);
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTPND,tempUINT32);	/* Clear INTPND. */
	
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMOD,0);		/* Select IRQ mode. */
	
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_PRIORITY,0);		/* Set priority. */
	
	
	
	/* <3> Install the driver routines in the architecture hooks */
	sysIntLvlVecChkRtn	= s3c2410xIntLvlVecChk;
	sysIntLvlEnableRtn	= s3c2410xIntLvlEnable;
	sysIntLvlDisableRtn	= s3c2410xIntLvlDisable;

	/* all sources disabled */
	s3c2410xIntLvlEnabled = 0;

	return OK;
}

/*
 * s3c2410xIntLvlVecChk - check for and return any pending interrupts
 *
 * This routine interrogates the hardware to determine the highest priority
 * interrupt pending.  It returns the vector associated with that interrupt, and
 * also the interrupt priority level prior to the interrupt (not the
 * level of the interrupt).  The current interrupt priority level is then
 * raised to the level of the current interrupt so that only higher priority
 * interrupts will be accepted until this interrupt is finished.
 *
 * The return value ERROR indicates that no pending interrupt was found and
 * that the level and vector values were not returned.
 *
 * RETURNS: OK or ERROR if no interrupt is pending.
 */
STATUS  s3c2410xIntLvlVecChk
	(
		int* pLevel,  /* ptr to receive old interrupt level */
		int* pVector  /* ptr to receive current interrupt vector */
	)
{
	UINT32 tempUINT32;
	UINT32 int_pand;
	/* Read pending interrupt register and mask undefined bits */
	s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTPND, tempUINT32);

	/* If no interrupt is pending, return ERROR */
	if((tempUINT32 & s3c2410x_INT_CSR_MASK_VAL) == 0) return ERROR;

	/* get the number of the pending interrupt */
	s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTOFFSET, tempUINT32);

	*pVector = tempUINT32;

	 switch(tempUINT32)
	 	{
			case INT_LVL_EINT_0:
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTMSK,int_pand);
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMSK, (int_pand|BIT0));
				break;
			case INT_LVL_EINT_1:
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTMSK,int_pand);
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMSK, (int_pand|BIT1));
				break;
			case INT_LVL_EINT_2:
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTMSK,int_pand);
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMSK, (int_pand|BIT2));
				break;
			case INT_LVL_EINT_3:
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTMSK,int_pand);
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMSK, (int_pand|BIT3));
				break;
			case INT_LVL_EINT_4_7:
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_EINTMASK,int_pand);
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_EINTMASK, (int_pand|0xf0));
				break;
			case INT_LVL_EINT_8_23:
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_EINTMASK, 0xfffff0);
				break;			
			case INT_LVL_ADC:
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTSUBMSK,int_pand);
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTSUBMSK, (int_pand|0x0400));
				break;
			case INT_LVL_RTC:
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTMSK,int_pand);
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMSK, (int_pand|BIT30));
				break;
			case INT_LVL_UART_2:
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTSUBMSK,int_pand);
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTSUBMSK, (int_pand|0x01c0));
				break;
			case INT_LVL_UART_1:
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTSUBMSK,int_pand);
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTSUBMSK, (int_pand|0x0038));
				break;
			case INT_LVL_UART_0:
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTSUBMSK,int_pand);
				s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTSUBMSK, (int_pand|0x0007));
				break;
			case INT_LVL_LCD:/*add by supercontrol for lcd*/
			  s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTMSK,int_pand);
			  s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMSK, (int_pand|BIT16));
			case INT_LVL_IIC:/*add by supercontrol for iic*/
				s3c2410x_INT_REG_READ(s3c2410x_INT_CSR_INTMSK,int_pand);
			  s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMSK, (int_pand|BIT27));
			  break;
			default:
	 	}
	/* s3c2410xIntLvlDisable(tempUINT32); */
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_SRCPND, (1<<tempUINT32));
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTPND, (1<<tempUINT32));

	return OK;
}


/*
 * s3c2410xIntLvlEnable - enable a single interrupt level
 *
 * Enable a specific interrupt level.  The enabled level will be allowed to
 * generate an interrupt, when the overall interrupt level is set below the
 * specified level.  Without being enabled, the interrupt is blocked regardless
 * of the overall interrupt level setting.
 *
 * RETURNS: OK or ERROR if the specified level cannot be enabled.
 */
STATUS  s3c2410xIntLvlEnable
	(
		int level  /* level to be enabled */
	)
{
	int key;

	if(level < 0 || level >= s3c2410x_INT_NUM_LEVELS) return ERROR;
	/* set bit in enable mask */
	key = intLock();
	s3c2410xIntLvlEnabled |= (1 << (level));
	
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMSK,	((~s3c2410xIntLvlEnabled) & s3c2410x_INT_CSR_MASK_VAL));
	intUnlock(key);
	
	return OK;
}

/*
 * s3c2410xIntLvlDisable - disable a single interrupt level
 *
 * Disable a specific interrupt level.  The disabled level is prevented
 * from generating an interrupt even if the overall interrupt level is set
 * below the specified level.
 *
 * RETURNS: OK or ERROR, if the specified interrupt level cannot be disabled.
 */
STATUS  s3c2410xIntLvlDisable
	(
		int level  /* level to be disabled */
	)
{
	int key;
	
	if(level < 0 || level >= s3c2410x_INT_NUM_LEVELS) return ERROR;
	/* clear bit in enable mask */
	key = intLock();
	s3c2410xIntLvlEnabled &= ~(1 <<( level));
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTMSK,	((~s3c2410xIntLvlEnabled) & s3c2410x_INT_CSR_MASK_VAL));
	intUnlock(key);

	return OK;
}









?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产一区久久| 在线观看成人免费视频| 日韩精品一级中文字幕精品视频免费观看| 日本一区二区视频在线| 久久久三级国产网站| 日韩免费观看高清完整版| 欧美日韩国产小视频| 欧美伦理影视网| 7777精品伊人久久久大香线蕉经典版下载| 在线免费一区三区| 91网站视频在线观看| av动漫一区二区| 日本电影欧美片| 欧美蜜桃一区二区三区| 在线电影欧美成精品| 欧美丰满少妇xxxbbb| 欧美一区二区三区婷婷月色| 欧美日韩国产首页在线观看| 91精品国产综合久久精品麻豆 | 久99久精品视频免费观看| 视频一区视频二区中文| 久久99精品国产| 高清视频一区二区| 色综合天天综合狠狠| 在线观看欧美日本| 欧美一区二区三区成人| 久久久不卡网国产精品一区| 亚洲日本丝袜连裤袜办公室| 日韩精品亚洲专区| 国产成人综合亚洲91猫咪| 99久久久国产精品免费蜜臀| 91蜜桃在线观看| 欧美军同video69gay| 精品国产一区二区三区久久影院| 亚洲国产成人午夜在线一区| 亚洲一区在线视频观看| 精品在线观看视频| 日本乱人伦aⅴ精品| 精品免费99久久| 一区二区三区不卡视频在线观看| 日产国产欧美视频一区精品 | 中文字幕一区三区| 性久久久久久久久| 国产成人日日夜夜| 欧美性受xxxx黑人xyx| 精品国产一区二区三区四区四| 亚洲你懂的在线视频| 美女视频网站黄色亚洲| www.亚洲精品| 精品av久久707| 亚洲国产中文字幕在线视频综合| 国产精品夜夜嗨| 91精选在线观看| 亚洲精品久久7777| 国产91精品免费| 欧美大片拔萝卜| 一级做a爱片久久| 国产成人自拍网| 精品久久国产字幕高潮| 夜夜爽夜夜爽精品视频| av福利精品导航| 国产亚洲1区2区3区| 男男视频亚洲欧美| 欧美日本视频在线| 亚洲精品视频在线看| 国产成人免费视频精品含羞草妖精| 欧美一区二区精品久久911| 亚洲免费高清视频在线| 盗摄精品av一区二区三区| 日韩视频在线你懂得| 亚洲bdsm女犯bdsm网站| 欧美亚洲综合另类| 一区二区三区日韩精品视频| 99在线视频精品| 国产精品初高中害羞小美女文| 国产一区 二区| 久久久电影一区二区三区| 国产美女在线观看一区| 精品国产一区二区三区久久久蜜月 | 日韩精品一区二区三区视频在线观看| 亚洲在线视频免费观看| 91亚洲精品久久久蜜桃| 国产精品成人免费| av亚洲产国偷v产偷v自拍| 国产精品欧美一级免费| 成人av在线播放网站| 国产精品嫩草影院av蜜臀| 国产suv精品一区二区6| 国产精品福利一区| 在线免费视频一区二区| 亚洲国产综合视频在线观看| 91精品国产手机| 久久精品国产亚洲5555| 精品国产乱码久久久久久老虎 | 日韩va欧美va亚洲va久久| 欧美军同video69gay| 理论电影国产精品| 久久久久国产精品免费免费搜索| 高清国产午夜精品久久久久久| 国产精品青草久久| 在线观看日韩国产| 激情五月激情综合网| 日本一区二区成人| 在线观看视频91| 激情国产一区二区| 日韩美女视频一区| 51午夜精品国产| 成人精品视频.| 天堂蜜桃91精品| 日本一区二区动态图| 欧美羞羞免费网站| 国产麻豆精品95视频| 一区二区三区自拍| 精品电影一区二区三区| 成人av网站大全| 久久精品国产久精国产| 国产精品美女久久久久aⅴ | 亚洲一区免费视频| 欧美tk—视频vk| 色综合一区二区| 国产在线精品国自产拍免费| 一区二区三区在线观看视频| 欧美哺乳videos| 欧美日精品一区视频| 国产成人亚洲精品青草天美 | 久久精品噜噜噜成人av农村| 综合激情网...| 久久综合资源网| 欧美人xxxx| 99久久精品国产麻豆演员表| 美女视频免费一区| 亚洲国产精品一区二区久久恐怖片| 国产午夜精品美女毛片视频| 欧美一区二区在线免费播放| 91影视在线播放| 国产一区二区三区不卡在线观看| 亚洲国产综合在线| 亚洲人成7777| 中文字幕av资源一区| 日韩一区二区三区视频在线观看| 欧美这里有精品| 91在线视频免费观看| 国产v日产∨综合v精品视频| 麻豆精品国产传媒mv男同| 一区二区欧美精品| 综合激情网...| 欧美国产精品久久| 国产亚洲精品超碰| 久久一留热品黄| ww亚洲ww在线观看国产| 日韩手机在线导航| 欧美电视剧免费观看| 日韩一区二区精品| 在线成人免费视频| 欧美日韩国产精品成人| 欧美日韩一区二区三区高清| 欧美性猛交xxxx黑人交 | 亚洲国产综合人成综合网站| 亚洲精品视频观看| 亚洲精品伦理在线| 一区二区欧美视频| 亚洲电影第三页| 五月天一区二区三区| 视频一区在线视频| 美脚の诱脚舐め脚责91 | 激情五月激情综合网| 国产在线精品视频| 成人一区二区视频| 99久久er热在这里只有精品66| av动漫一区二区| 欧美日韩日日骚| 欧美va亚洲va国产综合| 国产亚洲视频系列| 亚洲欧洲av另类| 午夜欧美2019年伦理| 婷婷久久综合九色综合伊人色| 老司机午夜精品| 成人av网站在线| 欧美欧美欧美欧美| 欧美精品一区二区三区蜜桃视频 | 成人黄色av电影| 欧美午夜精品理论片a级按摩| 欧美日产在线观看| 久久先锋影音av鲁色资源| 亚洲蜜臀av乱码久久精品蜜桃| 午夜精品一区二区三区免费视频 | 国产91综合一区在线观看| 波多野结衣在线aⅴ中文字幕不卡 波多野结衣在线一区 | 亚洲欧美另类久久久精品| 亚洲国产日韩一级| 国产自产视频一区二区三区| www.66久久| 欧美一区二区三区免费观看视频| 久久久亚洲午夜电影| 亚洲乱码中文字幕综合| 久久99国产精品免费| 91网站在线观看视频| 欧美成人三级电影在线| 亚洲综合丁香婷婷六月香| 精品一区二区免费在线观看|