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

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

?? sngks32cintrctl.c

?? Vxworks下BSP源碼
?? C
字號:
/* sngks32cIntrCtl.c - Samsung KS32C interrupt controller driver *//* Copyright 1984-2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01c,02oct01,m_h  race condition01b,26apr01,m_h  convert tabs to spaces for readability01a,12apr01,m_h  created from snds100 template.*//*DESCRIPTIONThis module implements interrupt controller driver for Samsung's KS32C50100microprocessor which is an ARM based processor with several integrated peripherals.  It has an interrupt controller, two 32-bit timers, one Ethernet controller, two HDLC controllers, one IIC controller, general purpose I/O ports, and a 2-channel DMA controller.The KS32C interrupt controller is a simple, generic interrupt controllerthat manages 21 levels of interrupts from various sources internal to themicroprocessor and external to it.  For external interrupts are supported.The interrupt controller has control and pending status registers, maskregister and supports level-sensitive interrupts.  This library providesthe routines to manage interrupts multiplexed by the KS32C interrupt controller.The KS32C interrupt controller registers used by this driver are describedbelow under the symbolic names used herein.SNGKS32C_INTENB (write): this is the mask register described in theKS32C50100 Users' Manual.  When this register is written, each data bit that is clear (0) causes the corresponding interrupt to be enabled.Each bit that is set (1) causes the corresponding interrupt to be disabled.SNGKS32C_INTPEND (read): this is the interrupt pending register.When this register is read, each data bit that is set (1) indicates thatan interrupt is pending from the corresponding source. Level 20 is thehighest priority and level 0 is the lowest.SNGKS32C_INTMODE (write): this register is used to configure the interruptsin FIQ or IRQ mode.  Each bit set in this register configures the correspondinginterrupt as FIQ.  Otherwise the interrupt is treated as IRQ.  VxWorksdoes not support the high priority FIQ mode of interrupts.  Hence all theinterrupts have to be configured in IRQ mode.The interrupt priority registers can be used to change the prioritiesof the interrupts from the default settings.  This feature is notsupported in this driver.  All the interrupts are set with the defaultpriority ordering.The number of interrupts supported by the device i.e. the number ofvalid bits in the SNGKS32C_INTPEND register (21), is specified bySNGKS32C_INTNUMLEVELS.sngks32carm7.h has defined the addresses of the controller chips registers:SNGKS32C_INTENB, SNGKS32C_INTDIS and SNGKS32C_INTPEND and also the driver constants SNGKS32C_INTMASK_VAL, SNGKS32C_INTNUMLEVELS.The chip registers are memory-mapped at specified addresses internal tothe processor.  32-bit accesses can be made to these register locations.The macros SNGKS32C_INT_REG_READ and SNGKS32C_INT_REG_WRITE are used toaccess these registers.The BSP will initialize this driver in sysHwInit2(), after initializingthe main interrupt library, usually intLibInit().  The initializationroutine, sngks32cIntDevInit() will setup the interrupt controller device,it will mask off all individual interrupt sources and then set theinterrupt level to enable all interrupts.  See sngks32cIntDevInit for moreinformation.All of the functions in this library are global.  This allows them tobe used by the BSP if it is necessary to create wrapper routines or toincorporate several drivers together as one.SEE ALSO<Samsung KS32C50100 User's Manual>*/#include "vxWorks.h"#include "config.h"#include "intLib.h"#include "sngks32c.h"#include "myDef.h"void myDelay();#if !defined (AT91C_AIC_IPR) || !defined (AT91C_AIC_IECR) || \    !defined (AT91C_AIC_IDCR) || !defined (AT91C_AIC_ICCR) || \    !defined (AT91C_AIC_ISCR) || !defined (AT91C_INTNUMLEVELS)#   error missing AT91C interrupt definitions#endif/* hardware access methods */#ifndef AT91C_INT_REG_READ#   define AT91C_INT_REG_READ(x,result) \        ((result) = *(volatile UINT32 *)(x))#endif    /*AT91C_INT_REG_READ*/#ifndef AT91C_INT_REG_WRITE#   define AT91C_INT_REG_WRITE(x,data) \        (*((volatile UINT32 *)(x)) = (data))#endif /*AT91C_INT_REG_WRITE*//* Local data *//* * 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 at91cIntLvlMask;/* forward declarations */STATUS    at91cIntLvlVecChk  (int*, int*);STATUS    at91cIntLvlEnable  (int);STATUS    at91cIntLvlDisable (int);STATUS at91cIntAck(int level);/********************************************************************************* at91cIntDevInit - initialize the interrupt controller** This routine will initialize the interrupt controller device, disabling all* interrupt sources.  It will also 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*/void at91cIntDevInit (void)    {    /* install the driver routines in the architecture hooks */	UCHAR i;    sysIntLvlVecChkRtn     = at91cIntLvlVecChk;    sysIntLvlEnableRtn     = at91cIntLvlEnable;    sysIntLvlDisableRtn    = at91cIntLvlDisable;/*    sysIntLvlVecAckRtn	=at91cIntAck;	*/    at91cIntLvlMask  = 0x0;     /* all sources disabled */    for(i=0;i<32;i++)	{		*((volatile UINT32 *)(0xfffff000+i*4))=0x20;  /*所有改為邊沿觸發*/		*(volatile UINT32 *)(0xfffff080+i*4)=i;	}    *(volatile UINT32 *)0xfffff004=0;    *(volatile UINT32 *)0xfffff060=0;		    at91cIntLvlMask  = 0x0;     /* all sources disabled */    AT91C_INT_REG_WRITE (AT91C_AIC_IDCR, ~at91cIntLvlMask);    AT91C_INT_REG_WRITE (AT91C_AIC_ICCR, ~at91cIntLvlMask);    }/********************************************************************************* at91cIntLvlVecChk - 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  at91cIntLvlVecChk    (    int* pLevel,  /* ptr to receive old interrupt level */    int* pVector  /* ptr to receive current interrupt vector */    )    {	UINT32 temp;/**(volatile UINT16 *)0x40000000 = 0;*(volatile UINT16 *)0x40000040 = 0x0105;*//*LED REG0*//*debug*/	myXXX++;		if((*(volatile UINT32*)AT91C_AIC_IPR&*(volatile UINT32*)AT91C_AIC_IMR) ==0) return ERROR;	*(volatile UINT32*)AT91C_AIC_EOICR=0;							temp=*(volatile UINT32*)AT91C_AIC_IVR;	*pVector=*(volatile UINT32*)AT91C_AIC_ISR;	*(volatile UINT32*)AT91C_AIC_EOICR=0;							*(volatile UINT32*)AT91C_AIC_ICCR=(1<<(*pVector));	        return OK;   }/********************************************************************************* at91cIntLvlEnable - 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  at91cIntLvlEnable    (    int level  /* level to be enabled */    )    {    int key;    if (level < 0 ||        level >= AT91C_INTNUMLEVELS)        return ERROR;    /* clear bit in mask register */    key = intLock ();		    at91cIntLvlMask |= ((1 << level));    AT91C_INT_REG_WRITE (AT91C_AIC_IECR, at91cIntLvlMask);    intUnlock (key);			    return OK;    }/********************************************************************************* at91cIntLvlDisable - 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  at91cIntLvlDisable    (    int level  /* level to be disabled */    )    {    int key;    if (level < 0 ||        level >= AT91C_INTNUMLEVELS)        return ERROR;    /* set bit in disable register */    key = intLock ();    at91cIntLvlMask &= ~(1 << level);    AT91C_INT_REG_WRITE (AT91C_AIC_IDCR, 1<<level);    intUnlock (key);    return OK;    }STATUS at91cIntAck(int level){	return;}#if 0void myDelay(){	int i;		*(volatile UINT32 *)0xfffff800 = 0x35;	*(volatile UINT32 *)0xfffff810 = 0x35;		while(1)	{	*(volatile UINT32 *)0xfffff834 = 0x35;/*lit*/		for(i=0;i<1000000;i++);		*(volatile UINT32 *)0xfffff830 = 0x35;		for(i=0;i<1000000;i++);		}}	#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色偷偷久久人人79超碰人人澡 | 99久久99久久精品免费看蜜桃| 成人av集中营| 欧美一级片免费看| 亚洲一区二区三区免费视频| 国产麻豆一精品一av一免费 | 亚洲大片免费看| 成人免费视频播放| 精品国产一区二区三区四区四| 亚洲一区二区成人在线观看| 成人污视频在线观看| 久久综合狠狠综合久久激情| 日韩av一级片| 678五月天丁香亚洲综合网| 一区二区三区在线播放| 91视频免费观看| 中文字幕一区二区日韩精品绯色| 国产精品中文字幕日韩精品 | 欧美激情中文不卡| 精品一区二区国语对白| 日韩欧美一区二区视频| 日韩精品亚洲一区| 8x福利精品第一导航| 丝袜亚洲另类丝袜在线| 欧美日韩成人综合在线一区二区| 亚洲高清免费视频| 欧美在线观看你懂的| 亚洲午夜激情av| 欧美日韩精品欧美日韩精品一| 亚洲在线观看免费| 欧美精品免费视频| 免费看精品久久片| 久久久久久久久久美女| 国产精品白丝jk白祙喷水网站| 久久精品夜夜夜夜久久| 成人av在线一区二区| 亚洲欧美日韩在线不卡| 欧美三级三级三级| 日本不卡一二三区黄网| 精品免费99久久| 国产成人亚洲综合a∨婷婷图片 | 久久久噜噜噜久久人人看| 激情丁香综合五月| 国产午夜精品美女毛片视频| 成人av网站在线观看免费| 1024亚洲合集| 欧美精品 国产精品| 激情综合色综合久久| 欧美国产一区视频在线观看| 一本在线高清不卡dvd| 亚洲6080在线| 久久青草欧美一区二区三区| gogogo免费视频观看亚洲一| 日韩福利电影在线观看| 精品国产免费人成在线观看| 风间由美中文字幕在线看视频国产欧美| 欧美国产丝袜视频| 精品视频在线视频| 国产一区二区福利视频| 一区二区三区四区激情| 精品国产免费视频| 色哟哟一区二区| 久久99国产精品久久99| ●精品国产综合乱码久久久久| 91精选在线观看| 成人免费黄色大片| 蜜臀91精品一区二区三区| 国产精品免费免费| 91麻豆精品国产91久久久久久| 成人蜜臀av电影| 日本aⅴ精品一区二区三区| 最新国产成人在线观看| 欧美xingq一区二区| 91久久精品一区二区| 国产乱一区二区| 日韩精品成人一区二区在线| 1区2区3区国产精品| 久久蜜桃av一区二区天堂| 欧美日韩色综合| www.久久久久久久久| 看电影不卡的网站| 一级特黄大欧美久久久| 中文成人综合网| 精品国产乱码久久久久久老虎| 欧美亚男人的天堂| 91在线观看一区二区| 国产精品99久久久久久久vr| 日韩福利电影在线观看| 亚洲国产精品久久艾草纯爱| 国产精品进线69影院| 久久新电视剧免费观看| 欧美一卡二卡在线| 欧美色视频在线观看| 91麻豆6部合集magnet| 丰满亚洲少妇av| 精品一区二区精品| 精品一区二区在线看| 蜜桃av一区二区三区| 亚洲成人av一区二区三区| 一区二区三区高清在线| 国产精品免费久久| 国产欧美精品区一区二区三区| 精品国产免费一区二区三区四区| 日韩一区二区三区免费观看| 欧美男人的天堂一二区| 欧美剧情电影在线观看完整版免费励志电影 | 911精品国产一区二区在线| 色婷婷激情久久| 91视频观看免费| 色综合久久久久久久久| 日本乱码高清不卡字幕| 91福利在线观看| 日本丶国产丶欧美色综合| 色香蕉久久蜜桃| 欧美视频在线一区| 精品视频123区在线观看| 欧美日韩三级视频| 欧美一区二区三区四区视频| 日韩欧美一区电影| 久久久久久久综合狠狠综合| 国产日本一区二区| 中文字幕一区av| 欧美日韩一区二区三区在线看 | 六月婷婷色综合| 五月婷婷另类国产| 日本女优在线视频一区二区 | 精品国产青草久久久久福利| 欧美精品一区二区高清在线观看 | 日韩欧美国产小视频| 精品国产91乱码一区二区三区| 欧美精品一区二区三| 亚洲国产激情av| 有码一区二区三区| 日韩国产欧美一区二区三区| 久久精工是国产品牌吗| 不卡av在线免费观看| 欧美综合天天夜夜久久| 欧美成人性福生活免费看| 久久综合九色综合欧美98 | 日韩精品一二三区| 国产美女主播视频一区| 99精品视频在线观看免费| 欧美网站大全在线观看| 亚洲精品在线免费观看视频| 最新热久久免费视频| 三级在线观看一区二区 | 老色鬼精品视频在线观看播放| 高清国产一区二区三区| 91成人免费电影| 亚洲精品一区二区三区影院| 亚洲人成人一区二区在线观看| 日日欢夜夜爽一区| 成人自拍视频在线| 制服丝袜亚洲色图| 国产精品美女一区二区在线观看| 亚洲成人av福利| 不卡在线观看av| 欧美电视剧在线看免费| 一区二区久久久久久| 经典三级在线一区| 欧美午夜精品电影| 欧美国产精品一区| 麻豆传媒一区二区三区| 在线这里只有精品| 国产色婷婷亚洲99精品小说| 无码av中文一区二区三区桃花岛| 北条麻妃一区二区三区| 91精品国产综合久久蜜臀| 国产精品乱码人人做人人爱| 久99久精品视频免费观看| 色噜噜久久综合| 国产精品久久久久影院| 国产中文字幕一区| 欧美肥胖老妇做爰| 亚洲一区二区三区美女| 99久久777色| 国产精品久久久久久久久快鸭| 久久爱www久久做| 欧美老肥妇做.爰bbww| 一区二区三区中文字幕电影| 成人精品亚洲人成在线| 久久久不卡网国产精品一区| 蜜桃视频在线一区| 欧美精品18+| 日韩经典一区二区| 欧美久久一二三四区| 亚洲成人一区二区在线观看| 色婷婷国产精品久久包臀| 国产精品传媒视频| 成av人片一区二区| **欧美大码日韩| 91麻豆.com| 亚洲精品乱码久久久久久黑人| 91一区二区三区在线观看| 国产精品久久一卡二卡| 99国内精品久久| 亚洲精品成人精品456| 欧美亚洲一区三区| 日韩综合一区二区| 91精品欧美久久久久久动漫|