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

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

?? sngks32cintrctl.c

?? VXWorks for ARM 的 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"#if !defined (SNGKS32C_INTPEND) || !defined (SNGKS32C_INTENB) || \    !defined (SNGKS32C_INTMASK_VAL) || !defined (SNGKS32C_INTNUMLEVELS) || \    !defined (SNGKS32C_INTDIS)#   error missing SNGKS32C 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     (SNGKS32C_INTNUMLEVELS)#define SNGKS32C_INT_ALL_DISABLED    (SNGKS32C_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);/********************************************************************************* 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;    sngks32cIntLvlEnabled  = 0x0;     /* all sources disabled */    SNGKS32C_INT_REG_WRITE (SNGKS32C_INTENB, ((~sngks32cIntLvlEnabled) & SNGKS32C_INTMASK_VAL));    SNGKS32C_INT_REG_WRITE (SNGKS32C_INTPEND, SNGKS32C_INTMASK_VAL);    SNGKS32C_INT_REG_WRITE (SNGKS32C_INTMODE,SNGKS32C_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 = 0x100000;    int count;    UINT32 isr;    /* Read pending interrupt register and mask undefined bits */    SNGKS32C_INT_REG_READ (SNGKS32C_INTPEND, newLevel);    if ((newLevel & SNGKS32C_INTMASK_VAL) == 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     */    for (count = 0, isr = 20; count < SNGKS32C_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));    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 >= SNGKS32C_INTNUMLEVELS)        return ERROR;    /* clear bit in mask register */    key = intLock ();    sngks32cIntLvlEnabled |= ((1 << level));    SNGKS32C_INT_REG_WRITE (SNGKS32C_INTENB, ((~sngks32cIntLvlEnabled) & SNGKS32C_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 >= SNGKS32C_INTNUMLEVELS)        return ERROR;    /* set bit in mask register */    key = intLock ();    sngks32cIntLvlEnabled &= ~(1 << level);    SNGKS32C_INT_REG_WRITE (SNGKS32C_INTENB, ((~sngks32cIntLvlEnabled) & SNGKS32C_INTMASK_VAL));    intUnlock (key);    return OK;    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91免费视频观看| 免费高清不卡av| 久久久777精品电影网影网 | 国产在线精品免费av| 日本三级亚洲精品| 久久精品国产久精国产爱| 日日欢夜夜爽一区| 日韩电影在线一区二区| 久久精品72免费观看| 韩国三级在线一区| 国产91精品入口| 色综合 综合色| 欧美日韩一区二区三区在线| 欧美三级视频在线播放| 日韩一区二区三| 久久伊人蜜桃av一区二区| 国产亚洲一本大道中文在线| 中文字幕av一区二区三区免费看| 国产精品免费久久| 亚洲男人天堂av| 麻豆91小视频| youjizz国产精品| 欧美三区在线观看| 精品国产sm最大网站免费看| 国产精品欧美综合在线| 一区二区三区精品在线观看| 午夜精品福利在线| 国产一区二区在线免费观看| 一本大道久久精品懂色aⅴ| 9191国产精品| 亚洲欧美一区二区在线观看| 午夜久久久久久| 成人综合在线观看| 欧美日韩一级二级三级| 国产午夜精品一区二区三区视频| 中文字幕一区二区视频| 久久丁香综合五月国产三级网站| 99re在线视频这里只有精品| 欧美一级夜夜爽| 亚洲免费观看高清| 韩国毛片一区二区三区| 在线观看欧美日本| 国产亚洲精品超碰| 青青草成人在线观看| 成人精品高清在线| 久久免费偷拍视频| 无吗不卡中文字幕| 一本久久a久久精品亚洲| 欧美va亚洲va在线观看蝴蝶网| 一区二区三区四区乱视频| 精品一区二区三区免费毛片爱| 欧美视频一区二区| 亚洲女子a中天字幕| 懂色av一区二区三区免费看| 日韩精品一区二区三区中文不卡| 亚洲欧美日韩电影| 国产91精品入口| 精品国产123| 热久久久久久久| 欧美日韩免费一区二区三区 | 久久福利视频一区二区| 制服视频三区第一页精品| 亚洲综合在线视频| 91一区一区三区| 国产精品久久久久久亚洲伦| 国产揄拍国内精品对白| 精品剧情v国产在线观看在线| 亚洲国产精品久久久久婷婷884 | 国产成人精品影视| 久久亚洲春色中文字幕久久久| 视频一区二区三区在线| 欧美日韩欧美一区二区| 偷拍一区二区三区四区| 欧美精品久久久久久久多人混战| 亚洲午夜激情av| 欧美体内she精高潮| 亚洲第一二三四区| 717成人午夜免费福利电影| 爽爽淫人综合网网站| 日韩一区二区三区视频| 久久国产精品第一页| 欧美精品一区二区三区在线播放| 久久不见久久见免费视频7| 欧美成人精精品一区二区频| 国产一区二区三区在线观看免费 | 亚洲一区二区三区在线看| 欧美中文字幕亚洲一区二区va在线| 亚洲精品精品亚洲| 欧美性一二三区| 美女免费视频一区二区| 久久亚洲春色中文字幕久久久| 国产精品夜夜嗨| 亚洲精品免费看| 欧美一区二区三区日韩| 国产乱对白刺激视频不卡| 国产精品无遮挡| 欧美日韩中文国产| 久久99国产精品免费| 国产精品久久久久影院亚瑟| 欧美日韩综合在线| 国产精一品亚洲二区在线视频| 中文字幕一区在线观看| 91精品国产综合久久福利| 国产 欧美在线| 亚洲福中文字幕伊人影院| 亚洲精品一区在线观看| 99久久久久久| 免费观看91视频大全| 国产精品国产精品国产专区不片| 欧美视频第二页| 风间由美性色一区二区三区| 亚洲国产日韩精品| 亚洲精品一区二区三区四区高清| 99国产欧美另类久久久精品| 石原莉奈在线亚洲三区| 国产欧美日韩在线| 欧美日本乱大交xxxxx| 风间由美性色一区二区三区| 丝袜诱惑制服诱惑色一区在线观看 | 亚洲成人av中文| 国产精品天美传媒| 欧美一区二区视频在线观看2022 | 国产精品丝袜久久久久久app| 欧美日韩国产综合一区二区| 高清国产一区二区| 香蕉乱码成人久久天堂爱免费| 国产欧美综合色| 日韩一区二区三区视频| 欧美性受xxxx黑人xyx性爽| 成人小视频在线观看| 卡一卡二国产精品| 亚洲综合成人在线| 亚洲精品精品亚洲| 中文久久乱码一区二区| 久久久久99精品一区| 欧美电影免费观看高清完整版在线观看 | 国产一区二区三区不卡在线观看| 偷拍一区二区三区| 性欧美疯狂xxxxbbbb| 亚洲理论在线观看| 日韩美女精品在线| 亚洲欧洲精品一区二区三区| 中文字幕第一区二区| 国产网红主播福利一区二区| 日韩精品专区在线影院重磅| 欧美一区在线视频| 欧美精品粉嫩高潮一区二区| 91福利在线看| 欧美性淫爽ww久久久久无| 日本国产一区二区| 在线观看视频一区二区| 欧美在线免费视屏| 欧美久久久一区| 欧美一区二区视频观看视频| 日韩久久免费av| 久久一日本道色综合| 国产欧美视频在线观看| 国产精品国产三级国产普通话三级| 欧美国产乱子伦 | 亚洲国产精品99久久久久久久久| 久久久美女艺术照精彩视频福利播放| 欧美精品一区二区在线播放| 久久精品在线观看| 中文字幕一区二区三区乱码在线 | 国产91精品一区二区麻豆亚洲| 国产精品 欧美精品| 99久久免费精品高清特色大片| 色综合色狠狠综合色| 欧美日韩国产高清一区| 精品电影一区二区三区| 国产精品素人一区二区| 亚洲午夜激情av| 久久成人18免费观看| 成人18视频日本| 欧美日韩久久一区二区| 久久亚洲综合色| 亚洲欧美另类综合偷拍| 蜜桃视频一区二区三区| 国产成人日日夜夜| 欧美日韩在线播放| 久久久综合九色合综国产精品| 亚洲日本一区二区| 免费日本视频一区| 91啪九色porn原创视频在线观看| 欧美精品久久一区| 欧美国产丝袜视频| 视频一区二区三区在线| 国产成人超碰人人澡人人澡| 在线看日本不卡| 久久这里只精品最新地址| 一区2区3区在线看| 国产很黄免费观看久久| 91麻豆精品国产综合久久久久久 | 色呦呦日韩精品| 日韩美一区二区三区| 樱花草国产18久久久久| 国产精品资源网站| 欧美一区二区三区视频在线观看| 中文字幕不卡三区| 激情文学综合插|