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

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

?? sngks32cintrctl.c

?? at91rm9200 bsp at91rm9200 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;  /*所有改為邊沿觸發(fā)*/		*(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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美久久婷婷综合色| 欧美激情资源网| 成人性生交大片免费看在线播放 | 喷水一区二区三区| 国产清纯白嫩初高生在线观看91| 91视频.com| 国产激情一区二区三区四区 | 国内精品久久久久影院薰衣草| 亚洲欧美日韩国产另类专区| 久久众筹精品私拍模特| 欧美电影在线免费观看| 91麻豆精东视频| 福利电影一区二区| 九九热在线视频观看这里只有精品| 亚洲免费视频中文字幕| 国产精品不卡在线| 国产欧美一区二区在线| 久久午夜国产精品| 欧美一卡二卡在线| 欧美日韩黄色影视| 在线亚洲免费视频| 91国偷自产一区二区开放时间| 国产不卡高清在线观看视频| 麻豆精品国产91久久久久久| 香港成人在线视频| 亚洲成av人片一区二区| 夜夜精品浪潮av一区二区三区| 亚洲婷婷综合久久一本伊一区| 国产欧美日韩不卡免费| 久久精品一级爱片| 久久精品人人做人人综合| 久久综合网色—综合色88| 欧美www视频| 日韩欧美一区二区在线视频| 宅男在线国产精品| 欧美麻豆精品久久久久久| 9191成人精品久久| 欧美一级艳片视频免费观看| 欧美精品aⅴ在线视频| 欧美美女一区二区在线观看| 欧美日韩国产首页| 欧美一区二区高清| 精品免费国产一区二区三区四区| 日韩精品一区二区三区视频 | 久久黄色级2电影| 精彩视频一区二区三区| 国产精品一区免费在线观看| 国产成人在线免费观看| 成人av在线观| 欧美性受xxxx| 91精品国模一区二区三区| 欧美一区二区三区视频免费| 日韩精品一区二区三区在线播放| 久久亚洲欧美国产精品乐播 | 日韩av高清在线观看| 精东粉嫩av免费一区二区三区| 国产九九视频一区二区三区| 成人黄色在线网站| 欧洲一区二区三区免费视频| 欧美人体做爰大胆视频| 亚洲精品在线网站| 国产精品盗摄一区二区三区| 亚洲高清免费视频| 精彩视频一区二区| 色综合婷婷久久| 欧美电影在哪看比较好| 久久日韩粉嫩一区二区三区| 中文字幕欧美一区| 午夜久久久影院| 国产成人在线视频网址| 色婷婷激情久久| 欧美xxxx在线观看| 亚洲精品亚洲人成人网| 免费观看在线色综合| 粉嫩av一区二区三区在线播放| 色悠悠亚洲一区二区| 日韩免费看的电影| 亚洲天堂av一区| 狠狠色综合播放一区二区| 91猫先生在线| 欧美成人精品1314www| ●精品国产综合乱码久久久久| 午夜精品一区在线观看| 国产精品自拍毛片| 欧美吻胸吃奶大尺度电影| 亚洲精品一区二区三区99 | 国产自产2019最新不卡| 91官网在线免费观看| xnxx国产精品| 午夜免费久久看| av成人免费在线观看| 精品三级在线看| 亚洲高清在线视频| 91在线免费播放| 久久精品视频免费| 日韩精品每日更新| 91福利视频久久久久| 国产精品三级视频| 美女免费视频一区二区| 欧洲视频一区二区| 国产精品久久三| 国产呦萝稀缺另类资源| 91超碰这里只有精品国产| 亚洲女人的天堂| 不卡av在线免费观看| 亚洲精品一区二区三区福利| 午夜av一区二区三区| 一本大道久久精品懂色aⅴ | 亚洲电影视频在线| 99精品黄色片免费大全| 亚洲国产成人午夜在线一区| 精品一区二区三区免费观看| 欧美精品丝袜久久久中文字幕| 亚洲乱码日产精品bd| 波多野结衣中文一区| 国产性色一区二区| 国产中文字幕精品| 精品国产一区二区国模嫣然| 日韩综合一区二区| 欧美视频在线播放| 亚洲一区二区欧美日韩| 日本乱人伦aⅴ精品| 亚洲欧洲性图库| 成年人网站91| 国产精品第四页| 91天堂素人约啪| 亚洲欧美电影一区二区| 色偷偷成人一区二区三区91| 中文字幕在线观看不卡| 99精品在线免费| 亚洲天天做日日做天天谢日日欢| 波多野结衣中文字幕一区二区三区| 中文字幕av一区二区三区高 | 日韩三区在线观看| 日韩中文欧美在线| 日韩欧美一级二级| 久久电影国产免费久久电影 | 亚洲一级二级三级在线免费观看| 色婷婷av一区二区三区软件| 亚洲一区二区三区在线看| 欧美午夜不卡视频| 青青草精品视频| 精品国产乱码久久久久久久久| 久久精品国内一区二区三区| 久久亚洲免费视频| 成人免费毛片嘿嘿连载视频| 综合电影一区二区三区| 欧洲一区二区av| 免费久久99精品国产| 久久综合999| 99re成人精品视频| 亚洲国产wwwccc36天堂| 日韩你懂的在线播放| 国产99久久久国产精品免费看| ●精品国产综合乱码久久久久| 欧美午夜精品一区二区蜜桃| 日本v片在线高清不卡在线观看| 精品久久久影院| 99国产一区二区三精品乱码| 亚洲综合视频网| 精品国产区一区| 成人av在线播放网站| 午夜影院在线观看欧美| 2021国产精品久久精品| 91麻豆精品在线观看| 日本不卡一二三区黄网| 欧美激情在线一区二区| 欧美三级视频在线| 国产成人亚洲综合a∨婷婷图片| 亚洲乱码精品一二三四区日韩在线| 91精品国产高清一区二区三区蜜臀 | 免费成人av资源网| 国产欧美精品国产国产专区| 欧美写真视频网站| 国产麻豆视频一区二区| 亚洲精品乱码久久久久久| 欧美xfplay| 欧美日韩中文字幕一区二区| 经典三级在线一区| 一区二区三区产品免费精品久久75| 欧美一级电影网站| 91麻豆国产福利精品| 韩国v欧美v日本v亚洲v| 亚洲五月六月丁香激情| 国产日韩欧美激情| 欧美一二三在线| 色www精品视频在线观看| 国产综合久久久久久久久久久久| 依依成人综合视频| 久久久影院官网| 欧美日韩激情一区二区| 99精品视频免费在线观看| 久久精品免费观看| 亚洲国产精品精华液网站| 国产精品网站在线播放| 精品蜜桃在线看| 91精品免费观看| 91豆麻精品91久久久久久| 成人动漫中文字幕| 韩国精品主播一区二区在线观看 |