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

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

?? sngks32ctimer.c

?? Vxworks下BSP源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* sngks32cTimer.c - Samsung KS32C timer library *//* Copyright 1984-2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01e,19apr02,m_h  sysAuxClkConnect for THUMB01d,27sep01,m_h  sysClkRateSet() doesn't change the clock rate01c,18jul01,m_h  Fix timestamp timer01b,26apr01,m_h  convert tabs to spaces for readability01a,12apr01,m_h  created from snds100 template.*//*DESCRIPTIONThis is a timer driver for Samsung's KS32C50100 microprocessor which isan 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 32-bit timers can be programmed in interval mode or toggle mode.  Ininterval mode, an output pulse is generated when the countdown value inthe count register reaches  zero.  This will generate a frequency of(SYSCLK/count).  On the other hand, in the toggle mode, the output togglesits state for each time the countdown value reaches zero.  In this case, theoutput frequency will be (SYSCLK/(2*count)).The Timer Data register is used to load the countdown value.  When the timeris enabled using the Timer Mode register, the Timer Count register is loadedwith the count in Timer Data register.  The count value is decremented for everyinternal clock edge.  Once the count becomes zero, an interrupt is generated(if enabled in the interrupt controller) and the Timer Count register isreloaded automatically.The internal timer registers are accessed in a straight-forward fashion.They are accessible as 32-bit integers from the internal system registeroffsets, as given in sngks32cTimer.h file.  The macros SNGKS32C_TIMER_REG_WRITEand SNGKS32C_TIMER_REG_READ does nothing but reading and writing 32-bitintegers from and to the given addresses.This driver provides 3 main functions, system clock support, auxiliaryclock support, and timestamp timer support.  If necessary, each functionmay be conditioned by a separate INCLUDE_ macro.  The timestamp functionis always conditional upon the INCLUDE_TIMESTAMP macro.The SNGKS32C ARM7 timer register definitions are given in sngks32cTimer.h file.The macros SYS_CLK_RATE_MIN, SYS_CLK_RATE_MAX, AUX_CLK_RATE_MIN, andAUX_CLK_RATE_MAX must be defined in sngks32carm7.h to provide parameter checking for the sys[Aux]ClkRateSet() routines.INCLUDES:sngks32cTimer.htimestampDev.hSEE ALSO:<Samsung KS32C50100 User's Manual>*//* includes */#include "vxWorks.h"#include "config.h"#include "drv/timer/timerDev.h"#include "drv/timer/timestampDev.h"#include "sngks32cTimer.h"void myDelay();/* defines *//* The default is to assume memory mapped I/O */#ifndef AT91C_ST_REG_READ#define AT91C_ST_REG_READ(reg, result) \    ((result) = *(volatile UINT32 *)(reg))#endif #ifndef AT91C_ST_REG_WRITE#define AT91C_ST_REG_WRITE(reg, data) \    (*((volatile UINT32 *)(reg)) = (data))#endif #ifndef AT91C_ST_INT_ENABLE#define AT91C_ST_INT_ENABLE(level) intEnable(level)#endif#ifndef AT91C_ST_INT_DISABLE#define AT91C_ST_INT_DISABLE(level) intDisable(level)#endif/* locals */LOCAL FUNCPTR sysClkRoutine    = NULL; /* routine to call on clock tick */LOCAL int sysClkArg            = (int)NULL; /* its argument */LOCAL int sysClkRunning        = FALSE;LOCAL int sysClkConnected      = FALSE;LOCAL int sysClkTicksPerSecond = 60;LOCAL FUNCPTR sysAuxClkRoutine    = NULL;LOCAL int sysAuxClkArg            = (int)NULL;LOCAL int sysAuxClkRunning        = FALSE;LOCAL int sysAuxClkTicksPerSecond = 100;LOCAL int sysAuxClkTicks;#ifdef INCLUDE_TIMESTAMPLOCAL BOOL      sysTimestampRunning     = FALSE;         /* running flag */LOCAL FUNCPTR   sysTimestampRoutine     = NULL;          /* routine to call on intr */LOCAL int       sysTimestampArg         = 0;             /* arg for routine */      void      sysTimestampInt (void);                  /* forward declaration */#endif  /* INCLUDE_TIMESTAMP *//********************************************************************************* sysClkInt - interrupt level processing for system clock** This routine handles a system clock interrupt.  It acknowledges the* interrupt and calls the routine installed by sysClkConnect().*/void sysClkInt (void)    {/*	int status,mask;*/    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.  Normally, it is called from usrRoot() in usrConfig.c to * connect usrClock() to the system clock interrupt.** RETURN: 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)        {        AT91C_ST_REG_WRITE (AT91C_ST_IDR, 1);/*disable the PIT  interrupt */	         sysHwInit2 ();        sysClkConnected = TRUE;        }    sysClkRoutine   = NULL;    sysClkArg        = arg;#if ((CPU_FAMILY == ARM) && ARM_THUMB)    /* set b0 so that sysClkConnect() can be used from shell */    sysClkRoutine = (FUNCPTR)((UINT32)routine | 1);#else    sysClkRoutine = routine;#endif /* CPU_FAMILY == ARM */    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 pit interrupt in the st controller */	        AT91C_ST_REG_WRITE (AT91C_ST_IDR , 1);        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)        {        /*         * Load the match register with a new value calculated by         * adding the ticks per interrupt to the current value of the         * counter register.  Note that this may wraparound to a value         * less than the current counter value but thats OK.         */        AT91C_ST_REG_WRITE (AT91C_ST_PIMR, SYS_ST_CLK / sysClkTicksPerSecond);        /* enable pit  interrupt in st interrupt enable controller  sys interrupt in AIC */        AT91C_ST_REG_WRITE (AT91C_ST_IER, 1);	 AT91C_ST_REG_WRITE (AT91C_AIC_IECR,2);	                   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 (sysClkTicksPerSecond);    }/********************************************************************************* 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);    sysClkTicksPerSecond = ticksPerSecond;    if (sysClkRunning)        {        sysClkDisable ();        sysClkEnable ();        }    return (OK);    }/********************************************************************************* sysAuxClkInt - handle an auxiliary clock interrupt** This routine handles an auxiliary clock interrupt.  It acknowledges the* interrupt and calls the routine installed by sysAuxClkConnect().** RETURNS: N/A*/#if 0void sysAuxClkInt (void)    {    /* call auxiliary clock service routine */    if (sysAuxClkRoutine != NULL)        (*sysAuxClkRoutine) (sysAuxClkArg);    }/********************************************************************************* sysAuxClkConnect - connect a routine to the auxiliary clock interrupt** This routine specifies the interrupt service routine to be called at each* auxiliary clock interrupt.  It does not enable auxiliary clock interrupts.** RETURNS: OK, or ERROR if the routine cannot be connected to the interrupt.** SEE ALSO: intConnect(), sysAuxClkEnable()*/STATUS sysAuxClkConnect    (    FUNCPTR routine,    /* routine called at each aux clock interrupt */    int arg             /* argument to auxiliary clock interrupt routine */    )    {    sysAuxClkRoutine    = NULL;    sysAuxClkArg        = arg;#if ((CPU_FAMILY == ARM) && ARM_THUMB)    /* set b0 so that sysClkConnect() can be used from shell */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米777欧美一区二区| 懂色av中文字幕一区二区三区| 日韩三级在线免费观看| 国产精品一区二区久久精品爱涩| 亚洲欧洲中文日韩久久av乱码| 欧美大度的电影原声| www.色综合.com| 美女视频黄久久| 一区二区三区在线播放| 国产精品丝袜黑色高跟| 91精品国产欧美一区二区| 色综合网站在线| 国产精品18久久久久久久久| 亚洲一区二区三区四区在线免费观看| 精品久久人人做人人爱| 欧美视频一区二| www.久久久久久久久| 国产麻豆9l精品三级站| 日韩制服丝袜av| 亚洲主播在线播放| 国产精品久久影院| 国产免费观看久久| 日韩欧美一区二区视频| 欧美人妖巨大在线| 欧美日韩国产一级二级| 一本久道久久综合中文字幕| 国产精品18久久久久久久网站| 麻豆91在线观看| 美腿丝袜亚洲综合| 美女视频网站黄色亚洲| 美女高潮久久久| 热久久国产精品| 免费视频一区二区| 秋霞国产午夜精品免费视频| 视频在线观看91| 热久久一区二区| 激情五月激情综合网| 国产资源在线一区| 国产一区二区成人久久免费影院| 麻豆精品精品国产自在97香蕉| 蜜芽一区二区三区| 久久精品久久精品| 国产一区二区三区在线观看免费视频| 久久91精品国产91久久小草| 国产在线日韩欧美| 国产成人综合在线| 99精品偷自拍| 色综合中文综合网| av在线不卡观看免费观看| 大桥未久av一区二区三区中文| 国产高清一区日本| 成人一区在线看| 色综合天天性综合| 欧美三片在线视频观看| 欧美高清dvd| 欧美电影免费观看完整版| 久久影院午夜片一区| 欧美国产禁国产网站cc| 一区二区三区日韩精品视频| 亚洲国产精品久久艾草纯爱| 免费在线观看日韩欧美| 国产在线国偷精品产拍免费yy| 国产乱码精品1区2区3区| 丁香另类激情小说| 91国在线观看| 欧美不卡一区二区三区四区| 日本一二三四高清不卡| 亚洲激情av在线| 日本少妇一区二区| 粉嫩av一区二区三区粉嫩| 色婷婷久久久久swag精品 | 天天综合天天做天天综合| 视频一区二区欧美| 国产成人av电影免费在线观看| 色综合亚洲欧洲| 日韩精品中文字幕一区| 中文字幕亚洲视频| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产成人精品一区二区三区四区| 91成人在线免费观看| 欧美mv和日韩mv国产网站| 亚洲国产高清不卡| 婷婷丁香久久五月婷婷| 夫妻av一区二区| 欧美美女一区二区三区| 国产欧美日本一区二区三区| 亚洲一区二区精品3399| 国产精品99久久久久久有的能看| 欧美亚男人的天堂| 中文字幕精品一区二区三区精品| 亚洲成在人线在线播放| 成人午夜又粗又硬又大| 欧美一区二区免费视频| 亚洲裸体在线观看| 国产精品1区2区3区在线观看| 欧美中文字幕一区二区三区| 久久久久久久久久久久久女国产乱| 一区二区三区四区在线免费观看 | 亚洲三级在线免费观看| 美女视频第一区二区三区免费观看网站| 成人av在线电影| 日韩一区二区在线免费观看| 一区二区三区四区激情| 国产黄色精品网站| 精品国产一区二区三区久久久蜜月| 亚洲三级在线播放| 懂色av噜噜一区二区三区av| 日韩手机在线导航| 亚洲国产成人av| aaa亚洲精品| 欧美激情中文字幕一区二区| 久久99热99| 欧美精品tushy高清| 亚洲乱码国产乱码精品精小说 | 国产美女视频一区| 日韩一区二区三区免费看 | 国产成人在线免费观看| 日韩欧美一区二区三区在线| 亚洲一二三四区| 欧美亚洲综合色| 亚洲三级免费观看| 99精品1区2区| 亚洲日本在线天堂| 91论坛在线播放| 成人欧美一区二区三区视频网页| 国产成人精品免费在线| 久久婷婷久久一区二区三区| 麻豆精品视频在线观看视频| 日韩网站在线看片你懂的| 蜜桃av一区二区三区| 欧美电影免费观看高清完整版在| 日本亚洲三级在线| 日韩免费看网站| 国内一区二区在线| 久久久久久久综合狠狠综合| 国产精品一级在线| 久久精品一二三| 大白屁股一区二区视频| 国产偷v国产偷v亚洲高清| 国产另类ts人妖一区二区| 久久综合九色综合欧美98| 国产精品66部| 亚洲欧美在线高清| 在线一区二区三区做爰视频网站| 一区二区在线观看不卡| 色婷婷激情综合| 国模少妇一区二区三区| 久久久久久久久久久99999| 国模无码大尺度一区二区三区| 国产偷v国产偷v亚洲高清| 成人在线视频一区| 成人欧美一区二区三区白人| 欧洲生活片亚洲生活在线观看| 亚洲va韩国va欧美va| 欧美一区二区三区免费| 国产精品88888| 亚洲人成亚洲人成在线观看图片| 欧美视频中文一区二区三区在线观看| 丝袜国产日韩另类美女| 久久伊人中文字幕| 91在线码无精品| 亚洲va在线va天堂| 日韩欧美一卡二卡| 91在线国产观看| 日韩高清国产一区在线| 欧美经典一区二区| 欧美自拍偷拍一区| 精品一区二区三区在线观看国产 | 久久电影网站中文字幕| 国产日韩视频一区二区三区| 91美女片黄在线观看91美女| 五月激情六月综合| 欧美国产乱子伦| 欧美亚洲一区二区在线观看| 久久精品72免费观看| 亚洲视频每日更新| 日韩欧美一二区| 色综合一个色综合亚洲| 久久精品国产免费| 亚洲激情一二三区| 2017欧美狠狠色| 在线观看91视频| 国产精品99久久久久久宅男| 亚洲一区二区中文在线| 国产欧美中文在线| 欧美久久久一区| av影院午夜一区| 狠狠色丁香婷综合久久| 亚洲一区影音先锋| 国产精品色眯眯| 欧美一区二区视频在线观看| 99久久免费国产| 久久成人麻豆午夜电影| 曰韩精品一区二区| 国产日本欧洲亚洲| 日韩欧美在线123| 欧美日韩免费在线视频| 成人一区二区三区视频| 久久精品免费看| 日韩黄色在线观看|