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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? s3c2410xintrctl.c

?? 附件是一份S3C2410的原廠BSP源碼
?? C
字號:
/* s3c2410xIntrCtl.c - s3c2410x interrupt controller driver */

/* Copyright 2004, HITSAT, Inc. */

#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



/* Local data 
#define s3c2410x_INT_ALL_ENABLED	(s3c2410x_INT_NUM_LEVELS)
#define s3c2410x_INT_ALL_DISABLED	(s3c2410x_INT_NUM_LEVELS-1)
*/

/* Current interrupt level setting (s3c2410xIntLvlChg). */
/*LOCAL UINT32 s3c2410xIntLvlCurrent = s3c2410x_INT_ALL_DISABLED;  all levels disabled */

/* 
 * 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,0xfeffffbf);	/* Mask all Interrupt. */
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTSUBMSK,0x7ff);	/* Mask all subInterrupt. */

	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_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. */
	
	s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_EINTSTYLE,EINT0_7_STYLE);
	
	/* <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;
	
	/* 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;

	/* Ack interrupt for this level. */
	if((1<<tempUINT32)&((1<<INT_LVL_ADC)|(1<<INT_LVL_UART_0)|(1<<INT_LVL_UART_1)|(1<<INT_LVL_UART_2)))
	{
		s3c2410x_INT_REG_WRITE(s3c2410x_INT_CSR_INTSUBMSK, 0x7ff);
	}
	/* 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;
}









?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本高清不卡一区| 色婷婷av一区| 日本一区中文字幕| 亚洲一区影音先锋| 一区二区三区加勒比av| 亚洲精品国产无天堂网2021| 国产精品电影一区二区三区| 亚洲天堂成人在线观看| 亚洲欧美另类久久久精品| 亚洲精品欧美专区| 亚洲国产成人精品视频| 五月天一区二区三区| 亚洲成人激情av| 麻豆国产一区二区| 国产精品亚洲一区二区三区在线| 国产精品18久久久久久久久| 国产不卡在线一区| 91亚洲精品久久久蜜桃网站| 日本韩国精品在线| 日韩精品专区在线影院观看| 国产婷婷一区二区| 一区二区三区不卡视频| 日韩国产欧美在线视频| 精品在线免费观看| 成人免费毛片高清视频| 欧美性大战xxxxx久久久| 91精品国产高清一区二区三区 | 精品国产一区二区三区不卡| 2021国产精品久久精品| 亚洲三级电影网站| 婷婷亚洲久悠悠色悠在线播放| 热久久久久久久| 成人开心网精品视频| 欧美视频一区在线观看| 久久蜜桃av一区二区天堂| 国产精品久久综合| 五月婷婷综合在线| 波波电影院一区二区三区| 欧美日韩视频在线第一区| 久久免费精品国产久精品久久久久| 亚洲欧洲精品一区二区三区| 日本最新不卡在线| 91色九色蝌蚪| 欧美精品一区二区三区视频| 伊人色综合久久天天| 国内欧美视频一区二区| 91国模大尺度私拍在线视频| 久久午夜老司机| 亚洲va韩国va欧美va精品| 国产成人免费9x9x人网站视频| 欧美日韩一级视频| 中文字幕亚洲欧美在线不卡| 韩国精品免费视频| 欧美老女人第四色| 亚洲丝袜制服诱惑| 国产福利精品导航| 精品免费视频.| 五月激情丁香一区二区三区| 成人免费精品视频| 久久精品日产第一区二区三区高清版 | 日韩欧美国产精品一区| 亚洲一区二区三区小说| aaa欧美色吧激情视频| www国产成人免费观看视频 深夜成人网| 亚洲男人的天堂在线aⅴ视频| 国产成人精品一区二| 日韩一卡二卡三卡| 日韩中文字幕一区二区三区| 91蜜桃婷婷狠狠久久综合9色| 久久久777精品电影网影网| 老司机精品视频线观看86| 6080午夜不卡| 丝袜美腿一区二区三区| 欧美在线不卡视频| 一区二区三区在线看| 99热在这里有精品免费| 日本一区二区三区国色天香| 国产盗摄一区二区| 欧美国产亚洲另类动漫| 成人一区在线看| 国产精品色婷婷久久58| www.色综合.com| 中文字幕在线不卡一区| 成av人片一区二区| 一区二区三区美女| 在线视频一区二区三| 亚洲高清一区二区三区| 欧美午夜精品久久久久久孕妇| 亚洲欧洲精品成人久久奇米网| 97se亚洲国产综合自在线不卡| 亚洲欧美国产三级| 欧美日本韩国一区二区三区视频| 日韩福利视频导航| 日韩三级免费观看| 岛国精品在线播放| 亚洲激情图片qvod| 欧美丰满美乳xxx高潮www| 青青国产91久久久久久| 久久久久久久久久久电影| 99在线精品一区二区三区| 一区二区三区 在线观看视频| 制服.丝袜.亚洲.另类.中文| 精彩视频一区二区三区| 国产精品护士白丝一区av| 日本道色综合久久| 久久福利资源站| 成人欧美一区二区三区小说 | 亚洲影视在线播放| 欧美成人一区二区三区片免费| 国产高清久久久久| 亚洲精品免费在线| 久久久久久久久久美女| 91在线一区二区| 老司机午夜精品| 亚洲欧美在线aaa| 7777精品伊人久久久大香线蕉 | av资源网一区| 亚洲国产精品一区二区久久 | 欧美国产禁国产网站cc| 日本精品免费观看高清观看| 韩国v欧美v亚洲v日本v| 亚洲激情欧美激情| 欧美国产一区在线| 91精品国产麻豆国产自产在线| www.欧美精品一二区| 九色|91porny| 亚洲国产精品视频| 国产精品久久久久一区二区三区共 | 亚洲午夜三级在线| 国产欧美日韩中文久久| 3d成人动漫网站| 在线区一区二视频| 成人性视频网站| 麻豆精品久久久| 亚洲永久精品大片| 久久日韩精品一区二区五区| 51精品秘密在线观看| 成a人片亚洲日本久久| 麻豆免费精品视频| 日韩精品中午字幕| 欧美精品日韩综合在线| 99久久精品一区| 精品一区二区三区视频在线观看| 亚洲视频在线观看一区| 国产精品福利一区二区| 精品黑人一区二区三区久久| 欧洲国产伦久久久久久久| 国产91精品入口| 午夜精品久久久久久久99水蜜桃 | 亚洲一区二区三区不卡国产欧美| 亚洲少妇中出一区| 国产亚洲欧美日韩日本| 日韩午夜在线影院| 91行情网站电视在线观看高清版| 93久久精品日日躁夜夜躁欧美| 国内国产精品久久| 久久精品国产**网站演员| 亚洲成人免费看| 日韩精品久久久久久| 亚洲一区二区在线免费看| 国产精品人人做人人爽人人添 | 欧美一区二区三区免费观看视频| 色88888久久久久久影院野外| 色婷婷av一区| 91丨九色丨尤物| 91首页免费视频| 99久久综合国产精品| 色综合久久综合网97色综合| 成人视屏免费看| a4yy欧美一区二区三区| 国产高清亚洲一区| 亚洲第一在线综合网站| 免费的成人av| 久久成人免费电影| 国产在线视视频有精品| 成人久久视频在线观看| 不卡的av网站| 91麻豆福利精品推荐| 一本色道a无线码一区v| 欧美日韩高清在线| 欧美一区二区三区在线看| 日韩精品一区二区三区中文精品 | 亚洲福利一区二区三区| 久久国产精品免费| 高清av一区二区| 91免费视频观看| 欧美欧美欧美欧美| 亚洲国产精品成人久久综合一区| 中文字幕在线免费不卡| 亚洲一二三四久久| 日韩综合小视频| 国产99精品在线观看| 色婷婷久久久综合中文字幕| 欧美精品成人一区二区三区四区| 7777精品伊人久久久大香线蕉经典版下载| 久久九九全国免费| 亚洲在线视频免费观看| 久久精品99国产精品日本| 国产黑丝在线一区二区三区| 欧美色视频在线观看|