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

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

?? sngks32cintrctl.c

?? tornado開發 三星s3c44b0x開發板 bsp
?? C
字號:
/* sngks32cIntrCtl.c - Samsung KS32C interrupt controller driver *//* Copyright 2004-2005 Amine@263.net *//* Copyright 1984-2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01o,23jul04,a_m  BSP定制 for 思創S3C44B0X黃金開發板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 "s3c44b0x.h"	/* Amine: modified */#if !defined (S3C44B0X_INTPEND) || !defined (S3C44B0X_INTENB) || \    !defined (S3C44B0X_INTMASK_VAL) || !defined (S3C44B0X_INTNUMLEVELS) || \    !defined (S3C44B0X_INTDIS)#   error missing S3C44B0X interrupt definitions#endif#define SNGKS32C_INT_VEC_BASE    (0x0)/* hardware access methods */#ifndef SNGKS32C_INT_REG_READ#   define SNGKS32C_INT_REG_READ(x,result) \        ((result) = *(volatile UINT32 *)(x))#endif    /*SNGKS32C_INT_REG_READ*/#ifndef SNGKS32C_INT_REG_WRITE#   define SNGKS32C_INT_REG_WRITE(x,data) \        (*((volatile UINT32 *)(x)) = (data))#endif /*SNGKS32C_INT_REG_WRITE*//* Convert level number to vector number */#ifndef SNGKS32C_INT_LVL_VEC_MAP#   define SNGKS32C_INT_LVL_VEC_MAP(level, vector) \        ((vector) = ((level) + SNGKS32C_INT_VEC_BASE))#endif/* Convert pending register value, to a level number */#ifndef SNGKS32C_INT_PEND_LVL_MAP#   define SNGKS32C_INT_PEND_LVL_MAP(pendReg, level) \        ((level) = (pendReg))#endif/* driver constants */#define SNGKS32C_INT_ALL_ENABLED     (S3C44B0X_INTNUMLEVELS)#define SNGKS32C_INT_ALL_DISABLED    (S3C44B0X_INTNUMLEVELS-1)/* 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 sngks32cIntLvlEnabled;/* forward declarations */STATUS    sngks32cIntLvlVecChk  (int*, int*);STATUS    sngks32cIntLvlEnable  (int);STATUS    sngks32cIntLvlDisable (int);/* Amine: 中斷確認 */STATUS s3c44BIntLvlAck (int level, int vector){	SNGKS32C_INT_REG_WRITE(S3C44B0X_I_ISPC,(1 << vector));	return OK;}/********************************************************************************* sngks32cIntDevInit - 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 sngks32cIntDevInit (void)    {    /* install the driver routines in the architecture hooks */    sysIntLvlVecChkRtn     = sngks32cIntLvlVecChk;    sysIntLvlEnableRtn     = sngks32cIntLvlEnable;    sysIntLvlDisableRtn    = sngks32cIntLvlDisable;		sysIntLvlVecAckRtn     = s3c44BIntLvlAck;  			/* Amine: added */	    sngks32cIntLvlEnabled  = 0x0;     /* all sources disabled */    SNGKS32C_INT_REG_WRITE (S3C44B0X_INTCON, 5);		/* Amine: added */	/* Amine: modified */    SNGKS32C_INT_REG_WRITE (S3C44B0X_INTENB, ((~sngks32cIntLvlEnabled) & S3C44B0X_INTMASK_VAL));    /*SNGKS32C_INT_REG_WRITE (SNGKS32C_INTPEND, SNGKS32C_INTMASK_VAL);*/    /*SNGKS32C_INT_REG_WRITE (SNGKS32C_INTPEND, 0);*/	/* Amine: deleted */	SNGKS32C_INT_REG_WRITE (S3C44B0X_I_ISPC, S3C44B0X_INTMASK_VAL);	/* Amine: added */    SNGKS32C_INT_REG_WRITE (S3C44B0X_INTMODE,S3C44B0X_INTMODEIRQ);    }/********************************************************************************* sngks32cIntLvlVecChk - 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  sngks32cIntLvlVecChk    (    int* pLevel,  /* ptr to receive old interrupt level */    int* pVector  /* ptr to receive current interrupt vector */    )    {    int newLevel;    int intPendMask = 0x2000000;	/* Amine: 0x100000->0x2000000 */    int count;    UINT32 isr;	int intMask;					/* Amine: added */	    /* Read pending interrupt register and mask undefined bits */    SNGKS32C_INT_REG_READ (S3C44B0X_INTPEND, newLevel);    if ((newLevel & S3C44B0X_INTMASK_VAL) == 0)        return ERROR;	/* Amine: added */	SNGKS32C_INT_REG_READ (S3C44B0X_INTENB, intMask);	newLevel = newLevel&(~intMask);	if (newLevel == 0) return ERROR;	    /*     * Step through the bits looking for a 1. This *will* terminate.     * We could use ffsLsb() for this if we don't mind the function call     * overhead     */   	/* Amine: 20->25, SNGKS32C->S3C44B0X */    for (count = 0, isr = 25; count < S3C44B0X_INTNUMLEVELS; count++)        {        if (intPendMask & newLevel)            break;        isr--;        intPendMask >>= 1;        }    *pVector = isr;    /* Acknowledge the interrupt as given in SNGKS32C ARM7 sample code */    /*SNGKS32C_INT_REG_WRITE(SNGKS32C_INTPEND,(1 << isr));*/	/* Amine: deleted */    return OK;    }/********************************************************************************* sngks32cIntLvlEnable - 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  sngks32cIntLvlEnable    (    int level  /* level to be enabled */    )    {    int key;    if (level < 0 ||        level >= S3C44B0X_INTNUMLEVELS)        return ERROR;    /* clear bit in mask register */    key = intLock ();    sngks32cIntLvlEnabled |= ((1 << level));    SNGKS32C_INT_REG_WRITE (S3C44B0X_INTENB, ((~sngks32cIntLvlEnabled) & S3C44B0X_INTMASK_VAL));    intUnlock (key);    return OK;    }/********************************************************************************* sngks32cIntLvlDisable - 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  sngks32cIntLvlDisable    (    int level  /* level to be disabled */    )    {    int key;    if (level < 0 ||        level >= S3C44B0X_INTNUMLEVELS)        return ERROR;    /* set bit in mask register */    key = intLock ();    sngks32cIntLvlEnabled &= ~(1 << level);    SNGKS32C_INT_REG_WRITE (S3C44B0X_INTENB, ((~sngks32cIntLvlEnabled) & S3C44B0X_INTMASK_VAL));    intUnlock (key);    return OK;    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精彩视频一区二区三区| 国产精品女同一区二区三区| 欧美电影免费观看高清完整版在线观看| 欧美激情在线观看视频免费| 青青草国产成人av片免费| 欧美视频日韩视频在线观看| 国产精品伦一区二区三级视频| 欧美在线制服丝袜| 亚洲人成网站影音先锋播放| 色综合色综合色综合| **网站欧美大片在线观看| 91玉足脚交白嫩脚丫在线播放| 国产日韩高清在线| 丰满白嫩尤物一区二区| 中文字幕的久久| 欧美一级精品在线| 狠狠色伊人亚洲综合成人| 国产亚洲综合在线| 91蝌蚪porny| 东方aⅴ免费观看久久av| 久久精品久久久精品美女| 中文字幕欧美日本乱码一线二线| 精品国产一区二区亚洲人成毛片| 国产成人自拍网| 亚洲一区二区三区四区的| 欧美日韩日日摸| 久久91精品久久久久久秒播| 亚洲成年人影院| 精品少妇一区二区三区在线播放| 成人精品国产免费网站| 一区二区三区高清| 欧美精品一区二区三区视频| 欧美一区二区三区免费视频| 成熟亚洲日本毛茸茸凸凹| 亚洲一二三专区| 亚洲精品乱码久久久久久黑人| 日韩亚洲欧美在线观看| 69堂精品视频| 99久久er热在这里只有精品15 | 狠狠色丁香婷综合久久| 日本麻豆一区二区三区视频| 国产精品丝袜在线| 亚洲国产精品v| 欧美激情综合在线| 亚洲色大成网站www久久九九| 91精品国产综合久久精品性色| 欧美高清性hdvideosex| av一区二区三区四区| 蜜桃视频免费观看一区| 亚洲线精品一区二区三区八戒| 中文字幕av不卡| ●精品国产综合乱码久久久久| 亚洲麻豆国产自偷在线| 亚洲一区二区影院| 日本不卡免费在线视频| 精品一区二区在线观看| 成人国产精品免费网站| 色久综合一二码| 大胆欧美人体老妇| 91视频xxxx| 制服丝袜中文字幕一区| 精品国产伦一区二区三区观看方式 | 欧美日韩高清一区| 97精品超碰一区二区三区| 色婷婷久久久综合中文字幕| 欧美三区在线观看| 日韩精品中文字幕在线不卡尤物| 久久久久国产一区二区三区四区 | 欧美日本不卡视频| 欧美一级理论片| 欧美国产精品久久| 亚洲一二三区在线观看| 久久不见久久见免费视频1| 成人福利视频网站| 欧美精品亚洲二区| 国产三级久久久| 亚洲一区二区欧美日韩| 国产一区二区三区高清播放| 精品一区二区在线播放| 91网站黄www| 欧美r级在线观看| 亚洲精品国产视频| 91色视频在线| 欧美一级夜夜爽| 国产精品理伦片| 日本一区二区三区视频视频| 一区二区理论电影在线观看| 激情综合亚洲精品| 一本色道亚洲精品aⅴ| 欧美一区二区三区色| 成人免费在线视频| 精品亚洲国产成人av制服丝袜| 日本高清不卡在线观看| 久久众筹精品私拍模特| 国产网站一区二区| 男女男精品视频| 91视频免费看| 国产丝袜欧美中文另类| 日本一道高清亚洲日美韩| 成人精品gif动图一区| 欧美电影免费观看高清完整版在 | 在线亚洲精品福利网址导航| 国产日韩欧美a| 久久国产精品99精品国产| 91久久精品日日躁夜夜躁欧美| 久久综合五月天婷婷伊人| 亚洲成a人在线观看| 99国产精品国产精品毛片| 精品国产a毛片| 视频一区视频二区中文字幕| 老司机精品视频导航| 欧美午夜片在线看| 樱桃视频在线观看一区| 成人影视亚洲图片在线| 久久亚洲一区二区三区明星换脸 | 国产一区二区在线观看免费| 欧美日韩一级片在线观看| 亚洲色图丝袜美腿| 99精品1区2区| 国产精品的网站| 成人午夜电影久久影院| 久久女同互慰一区二区三区| 精品午夜久久福利影院| 亚洲精品一区二区三区在线观看 | 日本中文在线一区| 欧美日韩国产精品自在自线| 亚洲国产精品嫩草影院| 欧美性大战xxxxx久久久| 亚洲一区二区精品久久av| 在线观看日产精品| 亚洲无人区一区| 欧美精品丝袜久久久中文字幕| 午夜精品免费在线观看| 国产精品1区2区| 欧美日韩aaaaaa| 日韩和欧美的一区| 欧美一区二区三区色| 久久精品国产成人一区二区三区| 欧美一二区视频| 久久99精品久久久久久动态图| 欧美va日韩va| 国产精品正在播放| 国产精品久久久久四虎| 色综合天天综合网国产成人综合天 | 成人美女视频在线观看18| 久久精品视频一区二区三区| 成人免费高清在线| 日韩毛片一二三区| 欧亚一区二区三区| 天堂在线亚洲视频| 欧美电视剧在线看免费| 精品一二三四区| 日本一区二区在线不卡| 色综合久久中文字幕综合网| 亚洲一区二区美女| 日韩欧美区一区二| 成人中文字幕合集| 亚洲主播在线播放| 日韩你懂的电影在线观看| 国产精品综合视频| 日韩理论电影院| 91精品久久久久久久99蜜桃| 狠狠色丁香久久婷婷综| 国产精品电影一区二区三区| 欧美色偷偷大香| 国内久久精品视频| 亚洲欧美另类久久久精品2019| 欧美日本一区二区三区| 国产精品77777竹菊影视小说| 亚洲视频资源在线| 91精品国产综合久久精品图片 | 精品蜜桃在线看| jizzjizzjizz欧美| 日韩成人一级大片| 国产精品免费看片| 91精品国产91久久久久久一区二区| 狠狠色丁香久久婷婷综| 亚洲人xxxx| 欧美精品一区二区三区视频| 色综合久久久久网| 久久99热这里只有精品| 亚洲三级免费观看| 日韩免费观看2025年上映的电影| 成人动漫视频在线| 蜜臀av性久久久久av蜜臀妖精| 中文字幕一区av| 日韩丝袜美女视频| 色网站国产精品| 国产福利精品导航| 亚洲大型综合色站| 中文字幕精品一区 | 亚洲蜜臀av乱码久久精品蜜桃| 欧美一级高清片| 在线观看免费视频综合| 成人午夜激情影院| 国内精品免费在线观看| 亚洲不卡av一区二区三区| 亚洲三级免费观看| 欧美经典三级视频一区二区三区| 日韩一区二区三区在线观看|