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

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

?? ppc405timer.c

?? WINDRIVER SBC405 BSP
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* ppc405Timer.c - PowerPC 405 timer library *//*******************************************************************************   This source and object code has been made available to you by IBM on an   AS-IS basis.   IT IS PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING THE WARRANTIES OF   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR OF NONINFRINGEMENT   OF THIRD PARTY RIGHTS.  IN NO EVENT SHALL IBM OR ITS LICENSORS BE LIABLE   FOR INCIDENTAL, CONSEQUENTIAL OR PUNITIVE DAMAGES.  IBMS OR ITS LICENSORS   DAMAGES FOR ANY CAUSE OF ACTION, WHETHER IN CONTRACT OR IN TORT, AT LAW OR   AT EQUITY, SHALL BE LIMITED TO A MAXIMUM OF $1,000 PER LICENSE.  No license   under IBM patents or patent applications is to be implied by the copyright   license.   Any user of this software should understand that neither IBM nor its   licensors will be responsible for any consequences resulting from the use   of this software.   Any person who transfers this source code or any derivative work must   include the IBM copyright notice, this paragraph, and the preceding two   paragraphs in the transferred software.   Any person who transfers this object code or any derivative work must   include the IBM copyright notice in the transferred software.   COPYRIGHT   I B M   CORPORATION 2000   LICENSED MATERIAL  -  PROGRAM PROPERTY OF  I B M"*******************************************************************************//* Copyright 1984-2002 Wind River Systems, Inc. *//*modification history--------------------01h,12jul02,pch  SPR 77082: fix compiler warning re unused fitTable[] and		 fitPeriodMask[]01g,19apr02,gjc  Fixing sysAuxClkSetRate algorithm.01f,19nov01,g_h  Add #ifdef INCLUDE_AUX_CLK to isolate the AUX clock01e,06dec01,kab  Update for T2.2; fix compiler warnings01d,19sep01,pch  SPR 20698, 69142, 69143:  TSR is write-to-clear,		 not read/modify/writeback01c,29nov00,s_m  changes from ibm01b,23mar00,mcg  removed manual PIT reload in sysClkInt01a,20sep99,mcg  created from ppc403Timer.c version 01n*//*DESCRIPTIONThis library provides PowerPC 405 Timer routines.  This library handlesthe system clock, the auxiliary clock and timestamp functions. Toinclude the timestamp timer facility, the macro INCLUDE_TIMESTAMP mustbe defined.The macro SYS_CLK_FREQ should be defined before usingthis module.  This macro is the rate at which clock ticks occur.  Fordouble clocked busses, this value should be half the actual clock speed.The macros SYS_CLK_RATE_MIN, SYS_CLK_RATE_MAX, AUX_CLK_RATE_MIN,and AUX_CLK_RATE_MAX must be defined to provideparameter checking for sysClkRateSet().The BSP is responsible for connecting the interrupt handlers, sysClkInt(),and sysAuxClkInt(), to the appropriate vectors.INCLUDE FILES: ppc403Timer.hSEE ALSO:.pG "Configuration"*//* includes */#include "vxWorks.h"#include "vxLib.h"#include "intLib.h"#include "drv/timer/ppc403Timer.h"#include "drv/timer/timestampDev.h"/* local defines *//* Auxiliary clock default rate */#ifndef AUX_CLK_RATE_DEFAULT#   define AUX_CLK_RATE_DEFAULT 10#endif/* extern declarations *//* Locals */#ifdef INCLUDE_AUX_CLKLOCAL FIT_PERIOD fitTable[] =                   /* available FIT periods */    {    {   (1 << 9),  0x00000000},    {   (1 << 13), 0x01000000},    {   (1 << 17), 0x02000000},    {   (1 << 21), 0x03000000},    };#endif /* INCLUDE_AUX_CLK */LOCAL WDT_PERIOD wdtTable[] =                   /* available WDT periods */    {    {   (1 << 17), 0x00000000},    {   (1 << 21), 0x40000000},    {   (1 << 25), 0x80000000},    {   (1 << 29), 0xC0000000},    };LOCAL int       sysClkTicksPerSecond    = 60;   /* default 60 ticks/second */LOCAL FUNCPTR   sysClkRoutine           = NULL;LOCAL int       sysClkArg               = 0;LOCAL BOOL      sysClkConnectFirstTime  = TRUE;LOCAL BOOL      sysClkRunning           = FALSE;#ifdef INCLUDE_AUX_CLKLOCAL int       sysAuxClkTicksPerSecond = AUX_CLK_RATE_DEFAULT;LOCAL FUNCPTR   sysAuxClkRoutine        = NULL;LOCAL int       sysAuxClkArg            = 0;LOCAL BOOL      sysAuxClkRunning        = FALSE;#endif /* INCLUDE_AUX_CLK */LOCAL int       sysWdtTicksPerSecond    = 1;LOCAL FUNCPTR   sysWdtRoutine           = NULL;LOCAL int       sysWdtArg               = 0;LOCAL BOOL      sysWdtRunning           = FALSE;LOCAL UINT32    pitCountVal;                    /* PIT counter value */#ifdef INCLUDE_AUX_CLKLOCAL UINT32    fitPeriodMask = 0x01000000;     /* default FIT period: 2^21 */#endif /* INCLUDE_AUX_CLK */LOCAL UINT32    wdtPeriodMask = 0xC0000000;     /* default WDT period: 2^29 */#ifdef  INCLUDE_TIMESTAMPLOCAL BOOL      sysTimestampRunning     = FALSE;   /* timestamp running flag */#endif  /* INCLUDE_TIMESTAMP *//************************************************************************* sysClkInt - clock interrupt handler** This routine handles the clock interrupt on the PowerPC 405 architecture. It* is attached to the Programmable Interval Timer vector by the routine* sysClkConnect().** RETURNS : N/A*/LOCAL void sysClkInt (void)    {    /* Acknowledge PIT interrupt */    vxPitIntAck ();    /* The PIT reloads itself automatically */    /* Execute the system clock routine */    if (sysClkRoutine != NULL)        (*(FUNCPTR) 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.  It also connects the* clock error interrupt service routine.** RETURNS: OK, or ERROR if the routine cannot be connected to the interrupt.** SEE ALSO: usrClock(), sysClkEnable()*/STATUS sysClkConnect    (    FUNCPTR     routine,        /* routine to connect */    int         arg             /* argument with which to call the routine */    )    {    if (sysClkConnectFirstTime)        {        sysHwInit2();        sysClkConnectFirstTime = FALSE;        }    sysClkRoutine       = routine;    sysClkArg           = arg;    return (OK);    }/************************************************************************* 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)        {        /* clear the pending PIT interrupt */        vxTsrSet (_PPC403_TSR_PIS);        /* load the PIT counter and the hidden register with interval value */        vxPitSet (pitCountVal);        /* Enable the PIT interrupt & enable autoreload */        vxTcrSet (vxTcrGet() | _PPC403_TCR_PIE | _PPC403_TCR_ARE);        /* set the running flag */        sysClkRunning = TRUE;        }    }/************************************************************************* sysClkDisable - turn off system clock interrupts** This routine disables system clock interrupts.** RETURNS: N/A** SEE ALSO: sysClkEnable()*/void sysClkDisable (void)    {    if (sysClkRunning)        {        /* disable the PIT interrupt and auto-reload capability */        vxTcrSet (vxTcrGet() & ~ (_PPC403_TCR_PIE | _PPC403_TCR_ARE));        /* clear the PIT counter */        vxPitSet (0);        /* clear the pending PIT interrupt */        vxTsrSet (_PPC403_TSR_PIS);        /* reset the running flag */        sysClkRunning = FALSE;        }    }/************************************************************************* 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 does not* enable system clock interrupts.  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);    /* save the clock speed */    sysClkTicksPerSecond = ticksPerSecond;    /*     * compute the value to load in the decrementor. The new value will be     * load in the decrementor after the end of the current period     */    pitCountVal = sysTimerClkFreq / ticksPerSecond;    /* Update the PIT interval  FIX 11/27/00 */     vxPitSet (pitCountVal);    return (OK);    }#ifdef INCLUDE_AUX_CLK/************************************************************************* sysAuxClkInt - auxilary clock interrupt handler** This routine handles the auxilary clock interrupt on the PowerPC 405* architecture. It is attached to the Fix Interval Timer vector by the routine* sysAuxClkConnect().** RETURNS : N/A*/LOCAL void sysAuxClkInt (void)    {    vxFitIntAck ();             /* acknowledge FIT interrupt */    /* program TCR with the FIT period */    vxTcrSet ((vxTcrGet() & ~_PPC403_TCR_FP) | fitPeriodMask);    /* execute the system clock routine */    if (sysAuxClkRoutine != NULL)        (*(FUNCPTR) 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: excIntConnectTimer(), sysAuxClkEnable()*/STATUS sysAuxClkConnect    (    FUNCPTR routine,    /* routine called at each aux. clock interrupt */    int     arg         /* argument to auxiliary clock interrupt */    )    {    sysAuxClkRoutine    = routine;    sysAuxClkArg        = arg;    return (OK);    }/************************************************************************* sysAuxClkEnable - turn on auxiliary clock interrupts** This routine enables auxiliary clock interrupts.** RETURNS: N/A** SEE ALSO: sysAuxClkConnect(), sysAuxClkDisable(), sysAuxClkRateSet()*/void sysAuxClkEnable (void)    {    if (!sysAuxClkRunning)        {        /* clear the pending FIT interrupt */        vxTsrSet (_PPC403_TSR_FIS);        /* program TCR with the FIT period */        vxTcrSet ((vxTcrGet() & ~_PPC403_TCR_FP) | fitPeriodMask);        /* Enable the FIT interrupt */        vxTcrSet (vxTcrGet() | _PPC403_TCR_FIE);        /* set the running flag */        sysAuxClkRunning = TRUE;        }    }/************************************************************************* sysAuxClkDisable - turn off auxiliary clock interrupts** This routine disables auxiliary clock interrupts.*** RETURNS: N/A** SEE ALSO: sysAuxClkEnable()*/void sysAuxClkDisable (void)    {    if (sysAuxClkRunning)        {        /* disable the FIT interrupt */        vxTcrSet (vxTcrGet() & ~ (_PPC403_TCR_FIE));        /* clear the pending FIT interrupt */        vxTsrSet (_PPC403_TSR_FIS);        /* reset the running flag */        sysAuxClkRunning = FALSE;        }    }/************************************************************************* sysAuxClkRateGet - get the auxiliary clock rate

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲在线中文字幕| 欧美成人a视频| 激情久久五月天| 最新不卡av在线| 精品第一国产综合精品aⅴ| 色婷婷久久久久swag精品| 秋霞电影网一区二区| 最新日韩av在线| 久久影视一区二区| 欧美另类久久久品| 色婷婷久久久综合中文字幕 | 亚洲日本在线天堂| 337p粉嫩大胆色噜噜噜噜亚洲| 色婷婷久久综合| 成人性生交大片免费看视频在线 | 久久99久久久久| 一区二区高清在线| **欧美大码日韩| 国产欧美日韩不卡免费| 久久亚洲精华国产精华液 | 欧美视频一区在线观看| 91亚洲大成网污www| 国产成人亚洲综合a∨婷婷图片| 蜜桃视频在线观看一区二区| 午夜精品一区二区三区免费视频| 亚洲人吸女人奶水| 成人免费视频在线观看| 中文字幕精品—区二区四季| 国产亚洲美州欧州综合国| 欧美电影免费观看高清完整版| 欧美日韩一二三| 欧美日韩久久不卡| 欧美日韩在线观看一区二区| 欧美视频在线观看一区| 欧美日韩亚洲丝袜制服| 欧美日韩情趣电影| 精品视频一区二区三区免费| 欧美日韩中文字幕一区二区| 欧美理论电影在线| 欧美绝品在线观看成人午夜影视| 在线观看亚洲精品| 在线观看视频一区| 欧美日韩精品是欧美日韩精品| 欧美日韩一区二区三区高清| 欧美系列亚洲系列| 欧美日韩亚洲国产综合| 3d成人动漫网站| 日韩欧美国产综合在线一区二区三区| 欧美一区二区三区在线观看视频| 蜜桃av一区二区三区电影| 国产日本一区二区| 中文字幕第一区二区| 亚洲品质自拍视频| 亚洲成人自拍一区| 久久99这里只有精品| 国产精品乡下勾搭老头1| 北条麻妃国产九九精品视频| 91在线观看免费视频| 欧美性色欧美a在线播放| 欧美肥妇free| 日韩免费观看高清完整版| 久久久三级国产网站| 一区免费观看视频| 亚洲成人手机在线| 久久er99精品| 99精品国产99久久久久久白柏 | 欧洲精品在线观看| 在线成人av网站| 国产欧美日韩久久| 一区二区三区不卡视频| 男女激情视频一区| av资源网一区| 3d动漫精品啪啪1区2区免费| 国产欧美一区二区精品忘忧草| 亚洲欧美日韩国产一区二区三区 | 三级精品在线观看| 国内成人自拍视频| 色国产精品一区在线观看| 欧美精品在线观看播放| 中文文精品字幕一区二区| 亚洲一区二区三区自拍| 麻豆一区二区在线| 色一情一伦一子一伦一区| 日韩欧美中文字幕制服| 国产日产欧美一区二区视频| 亚洲福中文字幕伊人影院| 国产成人免费高清| 欧美日韩精品一区二区三区四区| 久久久精品国产99久久精品芒果| 亚洲综合另类小说| 风间由美一区二区三区在线观看 | 天天做天天摸天天爽国产一区 | 欧美高清性hdvideosex| 国产精品久久久久久久久图文区| 亚洲电影激情视频网站| 国产成人免费av在线| 欧美精品丝袜久久久中文字幕| 国产日韩精品一区二区浪潮av | 色综合一个色综合| 国产精品护士白丝一区av| 天天影视涩香欲综合网| 北条麻妃一区二区三区| 精品国产免费久久| 亚洲在线成人精品| 成人永久免费视频| 日韩欧美在线1卡| 亚洲福中文字幕伊人影院| 成人sese在线| 久久久久国产精品麻豆ai换脸 | 亚洲天堂福利av| 国产高清亚洲一区| 欧美一区二区三区四区在线观看 | 在线亚洲一区观看| 国产精品三级电影| 国产一区二区三区四区五区入口| 欧美乱熟臀69xxxxxx| 亚洲主播在线观看| 91麻豆123| 国产精品家庭影院| 成人av网址在线| 国产精品色在线| 国产在线国偷精品免费看| 日韩午夜在线观看| 日韩在线卡一卡二| 欧美三级乱人伦电影| 一区二区三区高清| 在线亚洲欧美专区二区| 一区二区三区四区亚洲| 色综合久久综合网| 亚洲日本韩国一区| 色综合天天综合网天天狠天天| 国产女人18水真多18精品一级做| 国产寡妇亲子伦一区二区| 国产夜色精品一区二区av| 国产一区二区三区四| 国产日韩欧美a| www.日韩在线| 亚洲免费观看高清在线观看| 99国产精品一区| 亚洲色大成网站www久久九九| 日本韩国欧美一区| 亚洲福利视频导航| 欧美一区二区在线观看| 久草这里只有精品视频| 久久人人超碰精品| 成人午夜免费视频| 最新日韩av在线| 欧美日韩一区在线| 日韩黄色免费电影| 精品不卡在线视频| 国产成a人亚洲| 尤物在线观看一区| 欧美精品日韩一区| 韩国三级中文字幕hd久久精品| 国产视频一区二区三区在线观看| 国产成都精品91一区二区三| 亚洲婷婷综合色高清在线| 91久久人澡人人添人人爽欧美 | 波多野结衣在线一区| 亚洲女同一区二区| 欧美日本不卡视频| 国产真实乱偷精品视频免| 中文子幕无线码一区tr| 欧美在线视频全部完| 久久精工是国产品牌吗| 国产精品丝袜91| 欧美丝袜丝交足nylons| 精品一区二区精品| 亚洲另类在线制服丝袜| 欧美一二三区在线观看| 高清不卡在线观看av| 亚洲精品国产品国语在线app| 欧美一级xxx| 99久久精品免费| 免费成人在线视频观看| 国产精品入口麻豆九色| 欧美午夜片在线看| 国产资源精品在线观看| 一区二区在线免费观看| 精品国产一区二区三区av性色| jiyouzz国产精品久久| 日韩国产在线观看| 国产精品乱码人人做人人爱| 7777精品伊人久久久大香线蕉完整版 | thepron国产精品| 丝瓜av网站精品一区二区| 中文在线免费一区三区高中清不卡| 欧美三级一区二区| 成人国产一区二区三区精品| 日本va欧美va瓶| 亚洲精品视频在线观看网站| 久久嫩草精品久久久久| 欧美在线三级电影| 成人激情小说乱人伦| 日韩电影在线一区二区| 亚洲欧美精品午睡沙发| 国产网站一区二区| 欧美精品色一区二区三区| av电影一区二区| 国产精品一级片|