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

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

?? ixp425timer.c

?? INTEL IXP425的VXWORKS BSP
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* ixp425Timer.c - ixp425 processor timer library *//* Copyright 2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01b,05dec02,jb  Fixed timestamp and aux clock01a,05jun02,jb  initial version...*//*DESCRIPTIONThis library contains routines to manipulate the timer functions.			_______hardware		TIMER 0clock			_______			   |interface -----------------------------------------------------		|		  |		     |		|		  |		     |software     _______		______		_____________clock(s)     sysClk		auxClk		timeStampClk	     _______		______		_____________interface functions:clkInt() - clock interrupt handlerclkConnect() - connect a routine to the clock interruptclkDisable() - turn off system clock interruptsclkEnable() - turn on system clock interruptsclkRateGet() - get the system clock rate oscillations per secondclkPeriod() - get the period of the timer (tick counter rollover)clkFreq() - get a timer clock frequencyclkTimestamp() - get a tick counter countNote: There are two different types of ticks referred to.  The frequencytick and the counter tick.  A frequency tick refers to the timer clockoscillations per second and the counter ticks refer to the number of times(ticks) a register decreases until roll over.The macros SYS_CLK_RATE_MIN, SYS_CLK_RATE_MAX must be defined toprovide parameter checking for the sysClkRateSet() routine.*/#include "ixp425.h"#include "ixp425Timer.h"#include "drv/timer/timerDev.h"#ifdef INCLUDE_TIMESTAMP#include "drv/timer/timestampDev.h"#endif/*  * The APB timer block is not based on the CPU speed, but on * the APB core clock of 66Mhz. */#define TIMER_APB_CLOCK_MHZ ( IXP425_PERIPHERAL_BUS_CLOCK )/* hardware access methods */#ifndef IXP425_REG_TIMER_READ#define IXP425_REG_TIMER_READ(reg,result) \	((result) = *(volatile UINT32 *)(reg))#endif /*IXP425_REG_TIMER_READ*/#ifndef IXP425_REG_TIMER_WRITE#define IXP425_REG_TIMER_WRITE(reg,data) \	(*((volatile UINT32 *)(reg)) = (data))#endif /*IXP425_REG_TIMER_WRITE*//* Locals */LOCAL int     clockTicksPerSecond   = IXP425_OSST_TICKS_PER_SECOND;LOCAL UINT32  clockTimerRollOver    = IXP425_OSST_ROLLOVER;LOCAL BOOL    clockConnected	    = FALSE;LOCAL BOOL    sysClkRunning	    = FALSE;LOCAL void    sysClkDummyRoutine(int arg) {}LOCAL FUNCPTR sysClkRoutine	    = (FUNCPTR) sysClkDummyRoutine;LOCAL int     sysClkArg		    = (int) NULL;LOCAL BOOL    sysClkConnected	    = FALSE;LOCAL BOOL    sysAuxClkRunning	    = FALSE;LOCAL void    sysAuxClkDummyRoutine(int arg) {}LOCAL FUNCPTR sysAuxClkRoutine	    = (FUNCPTR)sysAuxClkDummyRoutine;LOCAL int     sysAuxClkArg	    = (int) NULL;LOCAL BOOL    sysAuxClkConnected    = FALSE;LOCAL int     sysAuxClkTicksPerSecond = 100;LOCAL int     sysAuxClkRollOver     = ((TIMER_APB_CLOCK_MHZ * 0x100000) / 100);#ifdef INCLUDE_TIMESTAMPLOCAL BOOL    sysTimestampRunning   = FALSE;LOCAL FUNCPTR sysTimestampRoutine   = (FUNCPTR) NULL;LOCAL int     sysTimestampArg       = (int) NULL;#endifLOCAL void clkInt (void){     /* Clear Pending Interrupt by writing '1' to it */     IXP425_REG_TIMER_WRITE(IXP425_OSST, IXP425_OSST_TIMER_1_PEND);     if (sysClkRunning)	 (*(FUNCPTR) sysClkRoutine) (sysClkArg);     /* The timer is free running and as such it has already reloaded      * and is counting down       */}/***************************************************************************** clkConnect - connect a routine to the clock interrupt** This routine specifies the interrupt service routine to be called at each* clock interrupt.** RETURN: OK** SEE ALSO: intConnect(), usrClock(), clkEnable()*/LOCAL STATUS clkConnect (void)    {    if(!clockConnected)	{	 sysHwInit2 ();	 (void)intConnect ((void *)INT_VEC_TIMER1, clkInt, 0);	 clockConnected = TRUE;	}    return (OK);    }/***************************************************************************** clkDisable - turn off system clock interrupts** This routine disables clock interrupts.  In order for the hardware clock* to be disables all the software clocks must be disabled.** RETURNS: N/A** SEE ALSO: clkEnable()*/LOCAL void clkDisable (void)    {		intDisable(INT_VEC_TIMER1);	/* Clear the OST register for this timer, This disabled the	   timer */	IXP425_REG_TIMER_WRITE( IXP425_OSRT1 , IXP425_OST_DISABLED );        }/***************************************************************************** clkEnable - turn on system clock interrupts** This routine enables system clock interrupts.	 Any software clock can* enable the hardware clock** RETURNS: N/A** SEE ALSO: sysClkDisable(), sysClkRateSet()*/LOCAL void clkEnable (void)    {		IXP425_REG_TIMER_WRITE( IXP425_OSRT1 , ((clockTimerRollOver & ~IXP425_OST_RELOAD_MASK) |  IXP425_OST_ENABLE )  );	intEnable(INT_VEC_TIMER1);    }/***************************************************************************** clkRateGet - get the system clock rate** This routine returns the oscillations clock rate.** RETURNS: The number of oscillations per second of the clock.** SEE ALSO: sysClkEnable(), sysClkRateSet()*/LOCAL int clkRateGet (void)    {    return (clockTicksPerSecond);    }/**************************************************************************** clkPeriod - get the period of the tick counter** This routine gets the period of the timer, in ticks.	The* period, or terminal count, is the number of ticks to which the tick* counter counts before rolling over and restarting the counting process.** RETURNS: The period of the timer in counter ticks.*/LOCAL UINT32 clkPeriod (void)    {    return (clockTimerRollOver);    }/**************************************************************************** clkFreq - get a timer clock frequency** This routine gets the frequency of the timer clock, in ticks per* second.  The rate of the timer is set explicitly by the* hardware and typically cannot be altered.** RETURNS: The timer clock frequency, in counter ticks per second.*/LOCAL UINT32 clkFreq (void)    {    return ( TIMER_APB_CLOCK_MHZ * 0x100000);    }/**************************************************************************** clkTimestamp - get a time stamp count** This routine returns the current value of the timer tick counter.* The tick count can be converted to seconds by dividing it by the return of* clkFreq().*** RETURNS: The current time stamp count.** SEE ALSO: clkFreq()*/LOCAL UINT32 clkTimestamp (void)    {	UINT32 count;	/* Read the free running up-timer from peripherial block */	IXP425_REG_TIMER_READ(IXP425_OSTS,count);	return(count);    }   /***************************************************************************** sysClkConnect - connect a routine to the system clock interrupt** This routine specifies the interrupt service routine to be called at each* clock interrupt.  Normally it is called from usrRoot() in usrConfig.c to* connect usrClock() to the system clock interrupt.** RETURN: OK** SEE ALSO: intConnect(), usrClock(), sysClkEnable()*/STATUS sysClkConnect    (    FUNCPTR routine,	/* routine called at each system clock interrupt */    int	    arg		/* argument with which to call routine		 */    )    {    sysClkConnected   = TRUE;    sysClkRoutine     = routine;    sysClkArg	      = arg;    clkConnect();    return (OK);    }/***************************************************************************** sysClkDisable - turn off system clock interrupts** This routine disables system clock interrupts.** RETURNS: N/A** SEE ALSO: sysClkEnable()*/void sysClkDisable (void)    {    if (sysClkRunning)	{	clkDisable();	sysClkRunning	 = FALSE;	}    }/***************************************************************************** sysClkEnable - turn on system clock interrupts** This routine enables system clock interrupts.** RETURNS: N/A** SEE ALSO: sysClkDisable(), sysClkRateSet()*/void sysClkEnable (void)    {    if (!sysClkRunning)	{	clkEnable();	sysClkRunning	 = TRUE;	}    }/***************************************************************************** sysClkRateGet - get the system clock rate** This routine returns the system clock rate.** RETURNS: The number of ticks per second of the system clock.** SEE ALSO: sysClkEnable(), sysClkRateSet()*/int sysClkRateGet (void)    {    return(clkRateGet());    }/***************************************************************************** sysClkRateSet - set the system clock rate** This routine sets the interrupt rate of the system clock.  It is called by* usrRoot() in usrConfig.c.** RETURNS: OK, or ERROR if the tick rate is invalid or the timer cannot be set.** SEE ALSO: sysClkEnable(), sysClkRateGet()*/STATUS sysClkRateSet    (    int ticksPerSecond	    /* number of clock interrupts per second */    )    {    if (ticksPerSecond < SYS_CLK_RATE_MIN || ticksPerSecond > SYS_CLK_RATE_MAX)        return (ERROR);    clockTicksPerSecond = ticksPerSecond;    clockTimerRollOver = ((TIMER_APB_CLOCK_MHZ * 0x100000)                          / clockTicksPerSecond);    if (sysClkRunning)	{	sysClkDisable ();	sysClkEnable ();	}    return (OK);    }/********************************************************************************* sysAuxClkInt - handle an auxiliary clock interrupt

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产自产高清不卡| 欧美精品一区二区久久婷婷| 91啪亚洲精品| 成人精品鲁一区一区二区| 精品一区二区免费| 久久精品国产精品亚洲综合| 另类小说一区二区三区| 蜜臂av日日欢夜夜爽一区| 免费一级欧美片在线观看| 蜜臀av亚洲一区中文字幕| 日本不卡中文字幕| 麻豆freexxxx性91精品| 久久er精品视频| 老司机免费视频一区二区| 麻豆一区二区99久久久久| 免费欧美在线视频| 韩国一区二区在线观看| 日韩免费福利电影在线观看| 日韩欧美视频在线| 国产婷婷一区二区| 中文字幕一区三区| 一区二区三区四区激情 | 激情综合色播激情啊| 国产综合色精品一区二区三区| 久久精品国产精品亚洲红杏| 国产精品自在在线| av亚洲精华国产精华精| 在线看国产一区二区| 欧美精品亚洲二区| 久久亚洲一级片| 成人欧美一区二区三区小说| 亚洲福中文字幕伊人影院| 蜜臀av一区二区三区| 国产aⅴ综合色| 色综合久久久久久久久| 欧美猛男男办公室激情| 精品嫩草影院久久| 国产精品免费人成网站| 一区二区三区成人| 美美哒免费高清在线观看视频一区二区 | 亚洲图片一区二区| 奇米色一区二区| 国产999精品久久| 在线观看一区不卡| 欧美成va人片在线观看| 中文字幕一区二区三区在线不卡 | 99精品欧美一区二区三区小说 | 中文字幕乱码一区二区免费| 亚洲一级二级三级在线免费观看| 六月丁香婷婷久久| 色综合激情久久| 精品国产电影一区二区| 综合精品久久久| 另类小说综合欧美亚洲| 一本色道a无线码一区v| 欧美成人精品福利| 一区二区日韩av| 国产精品自产自拍| 欧美自拍偷拍一区| 中文字幕精品在线不卡| 日韩av一区二区在线影视| 成人黄色片在线观看| 日韩午夜中文字幕| 亚洲柠檬福利资源导航| 国产伦精品一区二区三区免费迷 | 欧美色图片你懂的| 欧美国产精品一区二区| 日韩黄色在线观看| 色综合天天综合狠狠| 免费看欧美美女黄的网站| caoporen国产精品视频| 精品久久国产字幕高潮| 亚洲夂夂婷婷色拍ww47| 国产99精品视频| 精品久久久久av影院| 亚洲五码中文字幕| 97久久精品人人做人人爽| 精品国产在天天线2019| 亚洲国产裸拍裸体视频在线观看乱了| 成人激情免费视频| 欧美精品一区二区三| 天堂一区二区在线| 在线观看日韩电影| 亚洲女同女同女同女同女同69| 国产91精品在线观看| 精品国产网站在线观看| 日本成人超碰在线观看| 欧美精品123区| 亚洲成av人片一区二区三区| 91欧美激情一区二区三区成人| 日本一区二区电影| 国产精品自在欧美一区| 久久久久久久精| 国产一区美女在线| 久久综合色综合88| 国产综合色在线| 久久―日本道色综合久久| 日本欧美韩国一区三区| 欧美日高清视频| ㊣最新国产の精品bt伙计久久| 成人激情综合网站| 精品99一区二区| 日本v片在线高清不卡在线观看| 色欧美乱欧美15图片| 国产精品麻豆一区二区| 日本欧美一区二区三区乱码 | 久久久久99精品国产片| 免费成人在线观看视频| 欧美日韩国产综合久久| 一区二区三区精品久久久| 丁香婷婷深情五月亚洲| 久久你懂得1024| 亚洲国产视频a| 欧美三级韩国三级日本三斤| 亚洲免费三区一区二区| jlzzjlzz欧美大全| 国产精品国产a级| 久久99精品视频| 欧美精品视频www在线观看| 一区二区高清免费观看影视大全| 97se亚洲国产综合在线| 中文字幕一区在线观看| av毛片久久久久**hd| 亚洲视频综合在线| 国产一区999| 中文字幕av在线一区二区三区| 岛国精品在线观看| 国产精品美女久久久久高潮| 本田岬高潮一区二区三区| 国产精品不卡一区| youjizz久久| 亚洲女性喷水在线观看一区| 在线免费观看日本欧美| 亚洲成人一区在线| 亚洲午夜一区二区| 97久久超碰国产精品| 亚洲黄色小说网站| 在线视频观看一区| 同产精品九九九| 欧美v亚洲v综合ⅴ国产v| 狠狠色狠狠色综合系列| 中文字幕精品三区| 91免费国产视频网站| 一区二区在线电影| 欧美乱妇20p| 久久99最新地址| 国产精品久99| 欧美中文字幕一区| 日本不卡视频一二三区| 久久蜜臀精品av| 国产一区二区三区久久悠悠色av | 1区2区3区精品视频| 欧美日韩色综合| 精品在线一区二区三区| 国产精品色眯眯| 91麻豆国产精品久久| 午夜精品一区二区三区电影天堂| 色菇凉天天综合网| 美女久久久精品| 国产精品狼人久久影院观看方式| 成人一区二区三区视频 | 秋霞午夜鲁丝一区二区老狼| 欧美草草影院在线视频| bt7086福利一区国产| 婷婷成人激情在线网| 久久久久久亚洲综合影院红桃| av不卡在线播放| 麻豆国产精品视频| 亚洲图片激情小说| 欧美大片免费久久精品三p| 国产在线一区二区| 亚洲乱码国产乱码精品精的特点| 日韩欧美专区在线| 99精品一区二区三区| 久久99蜜桃精品| 国产欧美精品一区| 91在线精品一区二区三区| 日本成人在线视频网站| 欧美sm极限捆绑bd| 色视频欧美一区二区三区| 国内外成人在线| 一区二区三区高清不卡| 国产三级一区二区| 欧美精品少妇一区二区三区| 94色蜜桃网一区二区三区| 麻豆中文一区二区| 亚洲综合精品自拍| 欧美一区二区三区免费视频| 99久久精品国产一区二区三区| 蜜桃一区二区三区在线| 夜夜亚洲天天久久| 2欧美一区二区三区在线观看视频| 日本久久一区二区三区| 成人一区二区视频| 亚洲第一在线综合网站| 日韩毛片视频在线看| 日韩精品自拍偷拍| 欧美精品aⅴ在线视频| 国产美女在线观看一区| 麻豆成人91精品二区三区|