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

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

?? s3c2410timer.c

?? ROM型的vxworksBSP包 編譯測(cè)試通過(guò)
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* ambaTimer.c - Advanced RISC Machines AMBA timer library *//* Copyright 1996-2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01l,18apr02,dat  null check in sysClkConnect, SPR 2672901k,31oct01,rec  integrator AP changes01j,04sep98,cdp  enable Thumb support for all ARM CPUs with ARM_THUMB==TRUE.01i.10mar98,jpd  comments/layout tidying.01h,23jan98,jpd  fixed bug in sysAuxClkConnect() (SPR #20349)01g,11dec97,kkk  fixed typo in AMBA_TIMER_READ macro.01f,02dec97,jpd  updated to latest coding standards.01e,28oct97,cdp  set b0 in sysClkConnect/sysAuxClkConnect for Thumb.01d,28oct97,tam  added TIMESTAMP support.01c,08oct97,kkk  fixed bug in sysClkConnect().01b,18aug97,jpd  Made more generic.01a,09jul96,jpd  Written, based on i8253Timer.c, version 01i.*//*DESCRIPTIONThis library contains routines to manipulate the timer functions on anAMBA timer with a mostly board-independent interface. This driverprovides 3 main functions, system clock support, auxiliary clocksupport, and timestamp timer support.  The timestamp function is alwaysconditional upon the INCLUDE_TIMESTAMP macro.The AMBA Timer is a generic design of timer used within a number ofsystems including the ARM PID7T development system and the DigitalSemiconductor 21285 chips as used in the EBSA-285 Evaluation Board.Different implementations of the design may vary slightly, such asproviding more timers.Two timers are defined as the minimum (21285 provides 4). Each timer isa down counter (16 bits wide in PID7T, 24 on 21285), with selectablepre-scale.Two modes of operation are available, free-running and periodic timer.In periodic timer mode, the counter will generate an interrupt at aconstant interval. In free-running mode, the timer will underflow afterreaching its zero value and continue to count down from the maximumvalue.The timer is loaded by writing to the Load register, and then, ifenabled, the timer will count down to zero. On reaching a count ofzero, an interrupt will be generated. The interrupt may be cleared bywriting to the Clear register.After reaching a zero count, if the timer is operating in free-runningmode, then the timer will continue to decrement from its maximum value.If periodic timer mode is selected, then the timer will reload from theLoad register and continue to decrement. In this mode, the timer willeffectively generate a periodic interrupt. The mode is selected by abit in the Control register and the timer is enabled by a bit in theControl register. At reset, the timer will be disabled, the interruptwill be cleared and the Load register will be undefined. The mode andpre-scale vale will also be undefined.At any time, the current timer value may be read from the Value register.The timer clock is generated by a pre-scale unit. The timer clock maybe fed by the system clock or an external clock, then divided by 1, 16,or 256, which is generated by 0, 4 or 8 bits of pre-scale.REGISTERS:LOAD: (read/write) The load register contains the initial value of the timerand is also used as the reload value in periodic timer mode. When writing tothis register, the unused high bits should be written as 0, and when reading,the unused bits will be undefined.VALUE: (read only) The Value location gives the current value of the timer.When reading this location, the unused bits are undefined.CLEAR: (write only) Writing to the Clear location clears an interrupt generatedby the counter/timer.CTRL: (read/write) The Control register provides enable/disable, mode,pre-scale and clock source configurations for the timer.bits0:1 unused2:3 prescale: 00 = system clock divded by 1              01 = system clock divded by 16              10 = system clock divded by 256              11 = fed by external clock source (21285)4:5 unused6   mode:     0 => free-running	      1 => periodic7   enable:   0 => disable	      1 => enableall unused bits must be written as zero and read as undefined.Only periodic mode is explicitly supported by this driver.Configuration of the control register is done via macros, so the BSPcan choose suitable configuration values.Note that the system clock timer provides for the timestamp facility aswell, therefore changing the system clock rate will affect thetimestamp timer period, which can be read by callingsysTimestampPeriod().The macros SYS_CLK_RATE_MIN, SYS_CLK_RATE_MAX, AUX_CLK_RATE_MIN, andAUX_CLK_RATE_MAX must be defined to provide parameter checking for thesys[Aux]ClkRateSet() routines.  The following macros must also be defined:SYS_TIMER_CLK			/@ frequency of clock feeding SYS_CLK timer @/AUX_TIMER_CLK			/@ frequency of clock feeding AUX_CLK @/AMBA_RELOAD_TICKS		/@ any overhead in ticks when timer reloads @/SYS_TIMER_CLEAR			/@ addresses of timer registers @/SYS_TIMER_CTRL			/@ "" @/SYS_TIMER_LOAD			/@ "" @/SYS_TIMER_VALUE			/@ "" @/AUX_TIMER_CLEAR			/@ "" @/AUX_TIMER_CTRL			/@ "" @/AUX_TIMER_LOAD			/@ "" @/AUX_TIMER_VALUE			/@ "" @/SYS_TIMER_INT_LVL		/@ interrupt level for sys Clk @/AUX_TIMER_INT_LVL		/@ interrupt level for aux Clk @/AMBA_TIMER_SYS_TC_DISABLE	/@ Control register values used when @/AMBA_TIMER_SYS_TC_ENABLE	/@ enabling and disabling the two timers @/AMBA_TIMER_AUX_TC_DISABLE	/@ "" @/AMBA_TIMER_AUX_TC_ENABLE	/@ "" @/The following may also be defined, if required:AMBA_TIMER_READ (reg, result)	/@ read an AMBA timer register @/AMBA_TIMER_WRITE (reg, data)	/@ write ... @/AMBA_TIMER_INT_ENABLE (level)	/@ enable an interrupt @/AMBA_TIMER_INT_DISABLE (level)	/@ disable an interrpt @/BSPApart from defining such macros described above as are needed, the BSPwill need to connect the interrupt handlers (typically in sysHwInit2()).e.g..CS    /@ connect sys clock interrupt and auxiliary clock interrupt @/    intConnect (INUM_TO_IVEC (INT_VEC...), sysClkInt, 0);    intConnect (INUM_TO_IVEC (INT_VEC...), sysAuxClkInt, 0);.CEINCLUDES:ambaTimer.htimestampDev.hSEE ALSO:.I "ARM Reference Peripheral Specification, ARM DDI 0062D,".I "AMBA Timer Data Sheet, ARM DDI 0049B,".I "ARM Target Development System User Guide, ARM DUI 0061A,".I "Digital Semiconductor 21285 Core Logic for SA-110 Microprocessor DataSheet."*//* includes *//*#include "drv/timer/ambaTimer.h"#include "drv/timer/timestampDev.h"*/#include "config.h"/* defines */#ifndef AMBA_TIMER_READ#define AMBA_TIMER_READ(reg, result) \	((result) = *((volatile UINT32 *)(reg)))#endif /* AMBA_TIMER_READ */#ifndef AMBA_TIMER_WRITE#define AMBA_TIMER_WRITE(reg, data) \	(*((volatile UINT32 *)(reg)) = (data))#endif /* AMBA_TIMER_WRITE */#ifndef AMBA_TIMER_INT_ENABLE#define AMBA_TIMER_INT_ENABLE(level) intEnable (level)#endif#ifndef AMBA_TIMER_INT_DISABLE#define AMBA_TIMER_INT_DISABLE(level) intDisable (level)#endif/* locals */ LOCAL FUNCPTR sysClkRoutine	= NULL; /* routine to call on clock interrupt */LOCAL int sysClkArg		= 0;    /* its argument */LOCAL int sysClkRunning		= FALSE;LOCAL int sysClkConnected	= FALSE;LOCAL int sysClkTicksPerSecond	= 60;LOCAL FUNCPTR sysAuxClkRoutine	= NULL;LOCAL int sysAuxClkArg		= 0;LOCAL int sysAuxClkRunning	= FALSE;LOCAL int sysAuxClkTicksPerSecond = 100;#ifdef	INCLUDE_TIMESTAMPLOCAL BOOL	sysTimestampRunning  	= FALSE;   /* timestamp running flag */#endif /* INCLUDE_TIMESTAMP */#if !defined (SYS_CLK_RATE_MIN) || !defined (SYS_CLK_RATE_MAX) || \    !defined (AUX_CLK_RATE_MIN) || !defined (AUX_CLK_RATE_MAX) || \    !defined (SYS_TIMER_CLK) || !defined (AUX_TIMER_CLK) || \    !defined (AMBA_RELOAD_TICKS) || !defined (SYS_TIMER_CLEAR) || \    !defined (SYS_TIMER_CTRL) || !defined (SYS_TIMER_LOAD) || \    !defined (SYS_TIMER_VALUE) || !defined (AUX_TIMER_CLEAR) || \    !defined (AUX_TIMER_CTRL) || !defined (AUX_TIMER_LOAD) || \    !defined (AUX_TIMER_VALUE) || !defined (SYS_TIMER_INT_LVL) || \    !defined (AUX_TIMER_INT_LVL) || !defined (AMBA_TIMER_SYS_TC_DISABLE) || \    !defined (AMBA_TIMER_SYS_TC_ENABLE) || \    !defined (AMBA_TIMER_AUX_TC_ENABLE) || !defined (AMBA_TIMER_AUX_TC_DISABLE)/*#error missing #defines in ambaTimer.c.*/#endif/********************************************************************************* sysClkInt - interrupt level processing for system clock** This routine handles the system clock interrupt.  It is attached to the* clock interrupt vector by the routine sysClkConnect().** RETURNS: N/A.*/LOCAL void sysClkInt (void){    /* acknowledge interrupt: any write to Clear Register clears interrupt */    /*AMBA_TIMER_WRITE (SYS_TIMER_CLEAR (AMBA_TIMER_BASE), 0);*/    /* If any routine attached via sysClkConnect(), call it */    /*ClearPending(BIT_TIMER4);*/    if (sysClkRoutine != NULL)	(* sysClkRoutine) (sysClkArg);}/********************************************************************************* sysClkConnect - connect a routine to the system clock interrupt** This routine specifies the interrupt service routine to be called at each* clock interrupt.  It does not enable system clock interrupts.* Normally it is called from usrRoot() in usrConfig.c to connect* usrClock() to the system clock interrupt.** RETURNS: OK, or ERROR if the routine cannot be connected to the interrupt.** SEE ALSO: intConnect(), usrClock(), sysClkEnable()*/STATUS sysClkConnect(FUNCPTR routine,	/* routine to be called at each clock interrupt */                     int arg		/* argument with which to call routine */){    if (sysClkConnected == FALSE)    {    	sysHwInit2 ();	/* XXX for now -- needs to be in usrConfig.c */    	sysClkConnected = TRUE;    }    sysClkRoutine = NULL; /* ensure routine not called with wrong arg */    sysClkArg	  = arg;    if (routine == NULL)	return OK;    sysClkRoutine = routine;    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)    {	/*	 * Disable timer itself. Might as well leave it configured for	 * Periodic mode, divided by 16.	 */	/*AMBA_TIMER_WRITE(		   SYS_TIMER_CTRL (AMBA_TIMER_BASE), AMBA_TIMER_SYS_TC_DISABLE);*/	/* Disable the timer interrupt in the Interrupt Controller */	/*AMBA_TIMER_INT_DISABLE (SYS_TIMER_INT_LVL);*/	rTCON   = ((rTCON&0xff0fffff)|0x600000);	rINTMSK |= BIT_TIMER4;		sysClkRunning = FALSE;     }}/********************************************************************************* sysClkEnable - turn on system clock interrupts** This routine enables system clock interrupts.** RETURNS: N/A** SEE ALSO: sysClkConnect(), sysClkDisable(), sysClkRateSet()*/void sysClkEnable (void){    if (!sysClkRunning)    {	rTCNTB4 = ( rTCNTB4 & ~(0xffff) ) | (PCLK/(TIMER_PRESCALER+1)/TIMER_DIVIDER/sysClkTicksPerSecond);	rTCON   = ((rTCON&0xff0fffff)|0x600000);        rTCON   = ((rTCON&0xff0fffff)|0X500000);	rINTMSK &= (~BIT_TIMER4);		sysClkRunning = TRUE;    }}/********************************************************************************* sysClkRateGet - get the system clock rate** This routine returns the interrupt rate of the system clock.** RETURNS: The number of ticks per second of the system clock.** SEE ALSO: sysClkRateSet(), sysClkEnable()*/int sysClkRateGet (void){    return sysClkTicksPerSecond;}/********************************************************************************* sysClkRateSet - set the system clock rate** This routine sets the interrupt rate of the system clock.  It does not* enable system clock interrupts unilaterally, but if the system clock is* currently enabled, the clock is disabled and then re-enabled with the new* rate.  Normally 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: sysClkRateGet(), sysClkEnable()

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美午夜精品久久久久久孕妇 | 亚洲欧洲av在线| 国产又黄又大久久| 亚洲欧美日韩在线播放| 日韩免费高清av| 欧洲精品在线观看| 国产一区二区三区观看| 亚洲影视在线播放| 中文字幕一区二区三区四区| 精品国产乱码久久久久久闺蜜 | 青青草97国产精品免费观看无弹窗版| 91精品免费在线观看| 菠萝蜜视频在线观看一区| 麻豆91在线播放| 香蕉影视欧美成人| 日韩午夜激情免费电影| 色天使色偷偷av一区二区| 国产盗摄一区二区| 久久99精品一区二区三区三区| 国产日韩欧美综合一区| 欧美在线免费视屏| 国产麻豆精品在线观看| 国产精品黄色在线观看 | 欧美变态口味重另类| 亚洲综合丝袜美腿| 欧美日韩不卡一区| 青青国产91久久久久久| 久久精品亚洲乱码伦伦中文| 欧美高清视频一二三区| 欧美成人a视频| 国产精品私房写真福利视频| 欧美一区二区三区播放老司机| 亚洲乱码国产乱码精品精可以看| 欧美日韩一二三区| 欧美在线小视频| 日本道免费精品一区二区三区| 日本欧美肥老太交大片| 天天av天天翘天天综合网色鬼国产| 久久美女艺术照精彩视频福利播放| 色综合婷婷久久| 日本一不卡视频| 国产精品成人午夜| 中文字幕中文在线不卡住| 国产欧美日本一区视频| 中文字幕不卡在线| 日韩理论片在线| 亚洲在线一区二区三区| 天堂久久一区二区三区| 免费不卡在线观看| 国产一区二区三区av电影 | 日韩福利电影在线| 亚洲欧美影音先锋| 夜夜夜精品看看| 亚洲一区二区三区在线看| 中文成人综合网| 自拍偷拍亚洲激情| 亚洲国产精品影院| 日本视频在线一区| 国产成人综合网| 色综合久久久久综合99| 欧美日韩在线一区二区| 日韩午夜小视频| 国产精品污污网站在线观看| 最新久久zyz资源站| 国产日韩精品久久久| 国产精品国产精品国产专区不片| 日韩一区二区三区视频在线| 久久九九久久九九| 亚洲免费毛片网站| 美国十次了思思久久精品导航| 亚洲成人中文在线| 国产永久精品大片wwwapp | 日本网站在线观看一区二区三区| 久久久久国产一区二区三区四区 | 成人激情校园春色| 色8久久人人97超碰香蕉987| 欧美日韩国产天堂| 26uuu欧美| 一区二区三区波多野结衣在线观看| 欧美激情在线免费观看| 亚洲欧美另类在线| 亚洲欧洲日韩av| 日韩精品福利网| 成人综合在线网站| 大胆欧美人体老妇| 在线亚洲高清视频| 6080亚洲精品一区二区| 久久欧美一区二区| 亚洲成人精品一区二区| 国产成人精品影院| 666欧美在线视频| 国产精品成人午夜| 国产一区二区三区免费播放| 色婷婷av一区二区三区大白胸| 成人午夜伦理影院| 欧美一区二区三区色| 亚洲视频小说图片| 亚洲免费av高清| 国产在线播放一区| 成年人国产精品| 日韩欧美国产一区二区在线播放 | 欧美亚洲综合另类| 欧美激情在线观看视频免费| 日本午夜一本久久久综合| 另类人妖一区二区av| 韩国女主播成人在线| 国产精品资源在线看| 成人精品在线视频观看| 一本一道波多野结衣一区二区| 欧美视频一区二| 国产精品欧美经典| 国产一区二区三区免费播放| 9久草视频在线视频精品| 91久久精品一区二区三区| 欧美日韩国产精品自在自线| 亚洲欧美中日韩| 国产成人av福利| 欧美不卡一区二区| 日本vs亚洲vs韩国一区三区二区 | 亚洲午夜在线电影| 99热99精品| 欧美日韩国产综合视频在线观看| 日韩欧美一级二级| 久久久久国产精品麻豆ai换脸| 亚洲少妇中出一区| 成人激情电影免费在线观看| 久久精品在线免费观看| 精品中文字幕一区二区小辣椒| av在线不卡观看免费观看| 久久男人中文字幕资源站| 老鸭窝一区二区久久精品| 日韩一区二区三区在线视频| 免费在线看成人av| 91精品国产综合久久香蕉麻豆| 欧美经典一区二区| 成人黄色综合网站| 国产精品久久久久久亚洲伦 | 国产91精品在线观看| 久久毛片高清国产| 粉嫩嫩av羞羞动漫久久久 | 亚洲国产你懂的| 欧美曰成人黄网| 亚洲444eee在线观看| 国产成人在线影院| 中文字幕av免费专区久久| 9色porny自拍视频一区二区| 亚洲婷婷国产精品电影人久久| 久久99久国产精品黄毛片色诱| 91精彩视频在线观看| 亚洲国产欧美在线| 欧美大片免费久久精品三p| 激情综合五月婷婷| 国产精品久99| 国产成人av在线影院| 亚洲视频你懂的| 欧美日韩国产区一| 久国产精品韩国三级视频| 国产欧美一区二区精品性| 美女久久久精品| 欧美绝品在线观看成人午夜影视| 亚洲欧洲性图库| 欧美日韩三级一区| 精品一区二区三区香蕉蜜桃| 欧美激情一二三区| 欧美三级韩国三级日本三斤| 免费人成网站在线观看欧美高清| 欧美日韩中文字幕精品| 久久精品久久99精品久久| 欧美日韩国产小视频| 一区二区高清免费观看影视大全| 成人av先锋影音| 亚洲国产精品久久久久婷婷884| 成人av在线看| 日韩国产在线观看一区| 欧美另类videos死尸| 国产一区二区精品久久| 亚洲色图在线看| 欧美一区二区三区精品| 成人福利视频在线| 日韩电影免费一区| 亚洲欧洲日韩女同| 日韩精品一区二区三区视频播放| 全部av―极品视觉盛宴亚洲| 国产精品三级电影| 成人黄色软件下载| 日韩av网站免费在线| 欧美一区二区三区在线观看 | 国产精品中文字幕日韩精品| 亚洲天堂福利av| 精品国产区一区| 国产精品综合一区二区三区| 亚洲精品免费一二三区| 久久久噜噜噜久噜久久综合| 国产一区二区三区最好精华液| 精品国产亚洲一区二区三区在线观看| 美女视频一区二区| 一个色在线综合| 综合色中文字幕| 久久久久久久久久久久久久久99 | 9191国产精品|