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

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

?? sysintrctl.c

?? 嵌入式操作系統(tǒng)VxWorks中板級(jí)支持包文件
?? C
字號(hào):
/* sysIntrCtl.c - template for interrupt controller driver *//* Copyright 2002, Wind River Systems, Inc. *//*TODO -  Remove the template modification history and begin a new history        starting with version 01a and growing the history upward with        each revision.modification history--------------------01a,21may02,scm  written.*//*   TODO - Fill in this file with I/O addresses and related constants for the          template BSP. Anything with "template" as a prefix needs to examined           and re-named to id the BSP (i.e. iq80321, iq80310, etc.) *//*This module implements the template interrupt controller driver.The template does not have a true interrupt controller, so the interruptprocessing must be in non-preemptive mode. Effectively there is only oneinterrupt level, but there are 32 interrupt vectors. These are managedby the intArchLib.The number of interrupts supported by the software is template_INT_NUM_LEVELS.The actual registers referenced are:  template_INTCTL_REG           template_IINTSRC_REGWe assume that config.h or template.h has defined the above addresses.This driver assumes that the chip is memory-mapped and does directmemory accesses to the registers which are assumed to be 32 bits wide.If a different access method is needed, the BSP can redefine the macros.The BSP will initialize this driver in sysHwInit2(), after initializingthe main interrupt library, usually intLibInit().  The initializationroutine, templateIntDevInit() will setup the interrupt service.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.*/#include "vxWorks.h"#include "config.h"#include "intLib.h"/* TODO - for inclusion, define in config.h *//* show we're alive... */#ifdef INCLUDE_HEX_LED #define templateINT_HEART_BEAT#endif#ifdef templateINT_HEART_BEAT /* Watch Interrupts */LOCAL UINT32 IntMsb = L7SEG_Dot;LOCAL UINT32 IntLsb = L7SEG_ALL_OFF;LOCAL UINT32 IntCount = 0;#endif/* * This module implements the template interrupt controller driver.*//* * TODO -  * flush out template defines in template.h, also  * flush out low level routines in sysIntrCtl.s  */IMPORT int ffsLsb (UINT32);IMPORT void sysINTCTL_MaskAll (void);IMPORT void sysINTSTR_SteerAll_Irq (void);IMPORT UINT32 sysIINTSRC_Read (void);IMPORT UINT32 sysINTCTL_Read (void);IMPORT void sysINTCTL_Write (UINT32 reg);/* hardware access methods *//* Convert level number to vector number */#ifndef template_INT_LVL_VEC_MAP#define template_INT_LVL_VEC_MAP(level, vector) \    ((vector) = ((level) + template_INT_VEC_BASE))#endif /* template_INT_LVL_VEC_MAP *//* Convert pending register value, to a level number */#ifndef template_INT_PEND_LVL_MAP#define template_INT_PEND_LVL_MAP(pendReg, level) \	((level) = (pendReg))#endif /* template_INT_PEND_LVL_MAP *//* Local data *//* Current interrupt level setting (templateIntLvlChg). */LOCAL UINT32 templateIntLvlCurrent = 0; /* effectively have one level *//* forward declarations */STATUS  templateIntLvlVecChk (int*, int*);STATUS  templateIntLvlVecAck (int, int);int     templateIntLvlChg (int);STATUS  templateIntLvlEnable (int);STATUS  templateIntLvlDisable (int);/********************************************************************************* templateIntDevInit - 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: OK or ERROR if templateIntLvlPriMap invalid.*/int templateIntDevInit (void)    {    int key;    /* install the driver routines in the architecture hooks */    sysIntLvlVecChkRtn  = templateIntLvlVecChk;    sysIntLvlVecAckRtn  = templateIntLvlVecAck;    sysIntLvlChgRtn = templateIntLvlChg;    sysIntLvlEnableRtn  = templateIntLvlEnable;    sysIntLvlDisableRtn = templateIntLvlDisable;    /* Mask all the interrupts */    key = intLock ();    sysINTCTL_MaskAll ();    /* feed interrupts to template interrupt controller */    *((volatile UINT32 *)(template_PIRSR_REG)) = 0x0F;    /* use IRQ lines only */    sysINTSTR_SteerAll_Irq ();    intUnlock (key);    return OK;    }/********************************************************************************* templateIntLvlVecChk - 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 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  templateIntLvlVecChk    (    int* pLevel,  /* ptr to receive old interrupt level */    int* pVector  /* ptr to receive current interrupt vector */    )    {    UINT32 templateIntLvlEnabled;    int newLevel;    UINT32 isr;    int key;    /* Read pending interrupt register and mask undefined bits */    key = intLock ();     isr = sysIINTSRC_Read ();    templateIntLvlEnabled = sysINTCTL_Read ();    intUnlock (key);    isr = isr & template_RESERVED_INT_MSK; /* mask out reserved values */    isr &= templateIntLvlEnabled;  /* exclude masked out interrupts */    /* If no interrupt is pending, return ERROR */    if (isr == 0) return ERROR;#ifdef templateINT_HEART_BEAT     key = intLock ();    *((volatile UINT8 *)(template_7SEG_LED_LSB_REG)) = IntLsb;    *((volatile UINT8 *)(template_7SEG_LED_MSB_REG)) = IntMsb;    intUnlock (key);    if (IntMsb == L7SEG_ALL_OFF)      {        IntCount++;        if(IntCount > 10)          {           IntMsb = L7SEG_Dot;           IntLsb = L7SEG_ALL_OFF;           IntCount = 0;          }       }     else       {        IntCount++;        if(IntCount > 10)          {           IntMsb = L7SEG_ALL_OFF;           IntLsb = L7SEG_Dot;           IntCount = 0;          }       }#endif    /* find first bit set in ISR, starting from lowest-numbered bit */    if (newLevel = ffsLsb (isr), newLevel == 0)	return ERROR;    /* map the interrupting device to an interrupt level number */    --newLevel;		/* ffsLsb returns numbers from 1, not 0 */    /* change to new interrupt level, effectively have one level */    *pLevel = templateIntLvlCurrent;    /* fetch, or compute the interrupt vector number */    *pVector = newLevel;    return OK;    }/********************************************************************************* templateIntLvlVecAck - acknowledge the current interrupt** This is a no-op** Since templateIntLvlVecChk doesn't change the state of the system,* there is nothing here that needs to be undone.** It is assumed that the interrupt service routine has cleared the* interrupt source itself.** RETURNS: OK or ERROR if a hardware fault is detected.* ARGSUSED*/STATUS  templateIntLvlVecAck    (    int level,	/* old interrupt level to be restored */    int vector	/* current interrupt vector, if needed */    )    {    return OK;    }/********************************************************************************* templateIntLvlChg - change the interrupt level value** This is a no-op since we effectively have one level.** RETURNS: Previous interrupt level.*/int  templateIntLvlChg    (    int level	/* new interrupt level */    )    {    return templateIntLvlCurrent;    }/********************************************************************************* templateIntLvlEnable - 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 to* enable interrupts of this priority (as configured by templateIntLvlPriMap,* if appropriate).  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  templateIntLvlEnable    (    int level  /* level to be enabled */    )    {    UINT32 templateIntLvlEnabled;    int key;    if (level < 0 ||    level >= template_INT_NUM_LEVELS)	return ERROR;    key = intLock ();    /* Retrieve the unmasked interrupts */    templateIntLvlEnabled = sysINTCTL_Read ();    /* set bit in enable mask */    templateIntLvlEnabled |= (1 << level);    /* Activate the enabled interrupts */    sysINTCTL_Write (templateIntLvlEnabled);    intUnlock (key);    return OK;    }/********************************************************************************* templateIntLvlDisable - 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 to enable interrupts of this priority (as configured by* templateIntLvlPriMap, if appropriate).** RETURNS: OK or ERROR, if the specified interrupt level cannot be disabled.*/STATUS  templateIntLvlDisable    (    int level  /* level to be disabled */    )    {    UINT32 templateIntLvlEnabled;    int key;    if (level < 0 ||    level >= template_INT_NUM_LEVELS)	return ERROR;    key = intLock ();    /* Retrieve the unmasked interrupts */    templateIntLvlEnabled = sysINTCTL_Read ();    /* clear bit in enable mask */    templateIntLvlEnabled &= ~(1 << level);    /* Activate the enabled interrupts */    sysINTCTL_Write (templateIntLvlEnabled);    intUnlock (key);    return OK;    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线免费一区三区| 国产精品丝袜在线| 国产女主播一区| 亚洲免费观看视频| 狠狠色伊人亚洲综合成人| 国产婷婷一区二区| 欧美一级xxx| 色婷婷狠狠综合| 91九色最新地址| 欧美日韩精品一区二区天天拍小说| 国产伦精品一区二区三区在线观看| 经典三级视频一区| 久久新电视剧免费观看| 国产精品私人影院| 6080yy午夜一二三区久久| 偷偷要91色婷婷| 在线不卡的av| 九九精品一区二区| 亚洲国产综合人成综合网站| 欧美日韩国产精品自在自线| 91在线观看视频| 亚洲成a人片在线不卡一二三区| 日韩网站在线看片你懂的| 在线看日本不卡| 91一区二区三区在线观看| 国产精品伊人色| 怡红院av一区二区三区| 91精品国产91久久久久久一区二区 | 久久国产精品72免费观看| 日韩精品一区二区三区在线| 国产精品一线二线三线精华| 美女网站视频久久| 久久久久国产精品厨房| 在线中文字幕一区二区| 91亚洲精华国产精华精华液| 成人禁用看黄a在线| 亚洲精品亚洲人成人网在线播放| 国产精品美女久久久久高潮| 国产欧美1区2区3区| 中文字幕电影一区| 欧美一区二区三区喷汁尤物| 欧美日韩国产综合一区二区| 在线观看视频一区二区欧美日韩| 一本色道久久加勒比精品 | 在线播放中文一区| 欧美日韩三级一区二区| 国产乱码精品一品二品| 激情都市一区二区| 国产剧情在线观看一区二区| 国产综合一区二区| 国产精品一区二区在线看| 一本色道久久加勒比精品 | 五月激情六月综合| 日韩不卡一区二区| 国产精品福利一区二区| 欧美精品在线观看一区二区| 91麻豆精品国产91久久久久久久久| 欧美日韩不卡一区| 制服丝袜亚洲播放| 日韩精品一区二区三区在线| 国产日韩欧美不卡| 亚洲欧洲中文日韩久久av乱码| 亚洲一区二区三区中文字幕| 欧美国产精品专区| 亚洲婷婷综合色高清在线| 久久久久久久久伊人| 国产精品久久久一区麻豆最新章节| 亚洲欧美aⅴ...| 日韩成人免费在线| 韩国v欧美v亚洲v日本v| 97se亚洲国产综合自在线观| 精品一区二区三区欧美| 中文字幕av在线一区二区三区| 欧美一级日韩免费不卡| 中文字幕乱码一区二区免费| 亚洲欧美日韩国产手机在线| 欧美色欧美亚洲另类二区| 91在线看国产| 91捆绑美女网站| 欧美日韩免费电影| 欧美成人欧美edvon| 国产精品一卡二| 蜜臀久久99精品久久久画质超高清| 欧美成人午夜电影| 国产女人18毛片水真多成人如厕| 日本一区二区三区四区在线视频| 精品成人一区二区三区四区| 日韩成人av影视| 亚洲美女免费视频| 久久理论电影网| 欧美日韩一卡二卡| 国产精品中文字幕日韩精品| 国产原创一区二区| 精品在线亚洲视频| 色综合天天性综合| 一区在线观看免费| 欧美一区二区播放| 国产精品成人一区二区三区夜夜夜| 亚洲黄色免费电影| 丰满亚洲少妇av| 国内精品国产成人| 99re热视频这里只精品| 精品三级在线观看| 91精品国产综合久久久久久久久久| 日韩欧美中文字幕精品| 亚洲欧美日韩国产成人精品影院| 精品在线观看视频| 欧洲视频一区二区| 亚洲国产精品国自产拍av| 免费成人在线视频观看| 亚洲高清在线精品| 成人av在线播放网址| 日韩精品最新网址| 亚洲成人先锋电影| 色狠狠一区二区| 中文字幕中文在线不卡住| 精品一区中文字幕| 欧美精品三级在线观看| 日韩美女视频一区二区 | 国产喷白浆一区二区三区| 男女男精品网站| 欧美美女喷水视频| 亚洲一本大道在线| 色哟哟一区二区| 亚洲欧美另类小说| 99久久99久久精品免费观看| 欧美高清在线一区二区| 国产精品99久| 国产三级精品三级在线专区| 国产精品一区二区不卡| 久久久久久久综合日本| 国产在线视频一区二区三区| 日韩免费一区二区三区在线播放| 成人一区在线观看| 91蝌蚪porny九色| 综合久久综合久久| 91在线观看视频| 亚洲男同1069视频| 91一区在线观看| 一区在线播放视频| 日本精品一区二区三区四区的功能| 国产精品的网站| 91视频在线看| 亚洲综合久久久| 欧美日韩精品专区| 天堂午夜影视日韩欧美一区二区| 成人免费的视频| 136国产福利精品导航| 99久久婷婷国产综合精品| 中文字幕一区二区三区蜜月| 91色乱码一区二区三区| 一区二区三区在线高清| 国产一区二区三区日韩| 久久久精品日韩欧美| 成人黄色片在线观看| 自拍偷拍国产亚洲| 欧美色偷偷大香| 看片网站欧美日韩| 久久久不卡影院| 99精品久久久久久| 亚洲线精品一区二区三区八戒| 制服丝袜亚洲网站| 国产精品一区二区三区网站| 国产精品第五页| 欧美精品aⅴ在线视频| 久久99精品国产.久久久久久| 久久奇米777| 在线免费观看不卡av| 麻豆一区二区99久久久久| 欧美国产精品中文字幕| 色婷婷亚洲精品| 久久99久久久久| 亚洲国产精品成人综合| 欧美亚洲愉拍一区二区| 亚洲色图.com| 欧美日韩国产综合一区二区 | 午夜精品视频在线观看| 欧美变态口味重另类| youjizz久久| 国产精品美女一区二区| 欧美视频一区在线| 国产揄拍国内精品对白| 亚洲最大色网站| 精品处破学生在线二十三| 色综合一个色综合亚洲| 免费成人在线影院| 综合婷婷亚洲小说| 欧美电视剧在线看免费| 99精品一区二区三区| 青椒成人免费视频| 亚洲视频香蕉人妖| 欧美一区二区三区四区五区| 成人高清免费观看| 日韩中文字幕不卡| 国产精品私人影院| 日韩欧美国产电影| 欧洲一区在线电影| 风间由美中文字幕在线看视频国产欧美| 亚洲福利一区二区| 日韩理论在线观看|