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

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

?? ppc405timer.c

?? WINDRIVER SBC405 BSP
?? C
?? 第 1 頁 / 共 2 頁
字號:
** This routine returns the interrupt rate of the auxiliary clock.** RETURNS: The number of ticks per second of the auxiliary clock.** SEE ALSO: sysAuxClkEnable(), sysAuxClkRateSet()*/int sysAuxClkRateGet (void)    {    return (sysAuxClkTicksPerSecond);    }/************************************************************************* sysAuxClkRateSet - set the auxiliary clock rate** This routine sets the interrupt rate of the auxiliary clock.  It does not* enable auxiliary clock interrupts.** RETURNS: OK, or ERROR if the tick rate is invalid or the timer cannot be set.** SEE ALSO: sysAuxClkEnable(), sysAuxClkRateGet()*/STATUS sysAuxClkRateSet    (    int ticksPerSecond      /* number of clock interrupts per second */    )    {    int ix;    int jx = 0;    UINT32 fitPeriod;    /*     * compute the FIT period.     * only 4 values are possible (cf fitTable[]). The closest value to     * <ticksPerSecond> is being used.     */    if (ticksPerSecond < AUX_CLK_RATE_MIN || ticksPerSecond > AUX_CLK_RATE_MAX)        return (ERROR);    fitPeriod = sysTimerClkFreq / ticksPerSecond;    /* get the closest value to ticksPerSecond supported by the FIT */    for (ix = 0; ix < NELEMENTS (fitTable); ix++)        {        if (fitPeriod <= fitTable [ix].fitPeriod)            {            if (ix == 0)                jx = 0;            else                {                if ( (fitPeriod/fitTable [ix-1].fitPeriod ) < ( fitTable [ix].fitPeriod/fitPeriod) )                    jx=ix-1;                else                    jx=ix;                }            break;            }        if (ix == NELEMENTS (fitTable) - 1)            jx = ix;        }    fitPeriod = fitTable [jx].fitPeriod;        /* actual period of the FIT */    fitPeriodMask = fitTable [jx].fpMask;       /* Mask to program TCR with */    /* save the clock speed */    sysAuxClkTicksPerSecond = sysTimerClkFreq / fitPeriod;    return (OK);    }#endif /* INCLUDE_AUX_CLK *//************************************************************************* sysWdtInt - watchdog interrupt handler.** This routine handles the watchdog interrupt on the PowerPC 405* architecture. It is attached to the watchdog timer vector by the routine* sysWdtConnect().** RETURNS : N/A*/LOCAL void sysWdtInt (void)    {    /* acknowledge WDT interrupt */    vxTsrSet (_PPC403_TSR_WIS);    /* execute the watchdog  clock routine */    if (sysWdtRoutine != NULL)        (*(FUNCPTR) sysWdtRoutine) (sysWdtArg);    }/************************************************************************* sysWdtConnect - connect a routine to the watchdog interrupt** This routine specifies the interrupt service routine to be called at each* watchdog interrupt.  It does not enable watchdog interrupts.** RETURNS: OK, or ERROR if the routine cannot be connected to the watchdog* interrupt.** SEE ALSO: excIntCrtConnect(), sysWdtEnable()*/STATUS sysWdtConnect    (    FUNCPTR routine,    /* routine called at each watchdog interrupt */    int     arg         /* argument with which to call routine         */    )    {    /* connect the routine to the WDT vector */    excIntCrtConnect ((VOIDFUNCPTR *) _EXC_OFF_WD, (VOIDFUNCPTR) sysWdtInt);    sysWdtRoutine    = routine;    sysWdtArg        = arg;    return (OK);    }/************************************************************************* sysWdtEnable - turn on watchdog interrupts** This routine enables watchdog interrupts.** RETURNS: N/A** SEE ALSO: sysWdtConnect(), sysWdtDisable(), sysWdtRateSet()*/void sysWdtEnable (void)    {    if (!sysWdtRunning)        {        /* clear the pending WDT interrupt */        vxTsrSet (_PPC403_TSR_WIS);        /* program TCR with the WDT period */        vxTcrSet ((vxTcrGet() & ~_PPC403_TCR_WP) | wdtPeriodMask);        /* Enable the WDT interrupt */        vxTcrSet (vxTcrGet() | _PPC403_TCR_WIE);        /* Enable critical interrupt */        vxMsrSet (vxMsrGet() | _PPC_MSR_CE);        /* set the running flag */        sysWdtRunning = TRUE;        }    }/************************************************************************* sysWdtDisable - turn off watchdog interrupts** This routine disables watchdog interrupts.* This routine does not disable critical interrupts.** RETURNS: N/A** SEE ALSO: sysWdtEnable()*/void sysWdtDisable (void)    {    if (sysWdtRunning)        {        /* disable the WDT interrupt */        vxTcrSet (vxTcrGet() & ~ (_PPC403_TCR_WIE));        /* clear the pending WDT interrupt */        vxTsrSet (_PPC403_TSR_WIS);        /* reset the running flag */        sysWdtRunning = FALSE;        }    }/************************************************************************* sysWdtRateGet - get the watchdog timer rate** This routine returns the interrupt rate of the watchdog timer.** RETURNS: The number of watchdog interrupts per second.** SEE ALSO: sysWdtEnable(), sysWdtRateSet()*/int sysWdtRateGet (void)    {    return (sysWdtTicksPerSecond);    }/************************************************************************* sysWdtRateSet - set the watchdog timer rate** This routine sets the interrupt rate of the watchdog timer.  It does not* enable watchdog interrupts.** RETURNS: OK, or ERROR if the tick rate is invalid or the timer cannot be set.** SEE ALSO: sysWdtEnable(), sysWdtRateGet()*/STATUS sysWdtRateSet    (    int ticksPerSecond      /* number of clock interrupts per second */    )    {    int ix;    int jx = 0;    UINT32 wdtPeriod;    /*     * compute the WDT period.     * only 4 values are possible (cf wdtTable[]). The closest value to     * <ticksPerSecond> is being used.     */    if (ticksPerSecond < WDT_RATE_MIN || ticksPerSecond > WDT_RATE_MAX)        return (ERROR);    wdtPeriod = sysTimerClkFreq / ticksPerSecond;    /* get the closest value to ticksPerSecond supported by the WDT */    for (ix = 0; ix < NELEMENTS (wdtTable); ix++)        {        if (wdtPeriod <= wdtTable [ix].wdtPeriod)            {            if (ix != 0)                if ( wdtPeriod <                     ((wdtTable [ix].wdtPeriod + wdtTable [ix-1].wdtPeriod)/2))                    jx = ix-1;                else                    jx = ix;            else                jx = ix;            break;            }        if (ix == NELEMENTS (wdtTable) - 1)            jx = ix;        }    wdtPeriod = wdtTable [jx].wdtPeriod;        /* actual period of the WDT */    wdtPeriodMask = wdtTable [jx].fpMask;       /* Mask to program TCR with */    /* save the clock speed */    sysWdtTicksPerSecond = sysTimerClkFreq / wdtPeriod;    return (OK);    }#ifdef  INCLUDE_TIMESTAMP/************************************************************************* sysTimestampConnect - connect a user routine to a timestamp timer interrupt** This routine specifies the user interrupt routine to be called at each* timestamp timer interrupt. In this case, however, the timestamp timer* interrupt is not used since the on-chip timer is also used by the system* clock.** RETURNS: OK, or ERROR if sysTimestampInt() interrupt handler is not used.*/STATUS sysTimestampConnect    (    FUNCPTR routine,    /* routine called at each timestamp timer interrupt */    int arg             /* argument with which to call routine */    )    {    return (ERROR);    }/************************************************************************* sysTimestampEnable - initialize and enable a timestamp timer** This routine disables the timestamp timer interrupt and initializes the* counter registers.  If the timestamp timer is already running, this routine* merely resets the timer counter.** This routine does not intialize the timer rate.  The rate of the timestamp* timer should be set explicitly in the BSP by sysHwInit().** RETURNS: OK, or ERROR if the timestamp timer cannot be enabled.*/STATUS sysTimestampEnable (void)   {   if (sysTimestampRunning)      {      return (OK);      }   if (!sysClkRunning)      return (ERROR);   sysTimestampRunning = TRUE;   return (OK);   }/************************************************************************* sysTimestampDisable - disable a timestamp timer** This routine disables the timestamp timer.  Interrupts are not disabled;* however, because the tick counter does not increment after the timestamp* timer is disabled, interrupts no longer are generated.** RETURNS: OK, or ERROR if the timestamp timer cannot be disabled.*/STATUS sysTimestampDisable (void)    {    if (sysTimestampRunning)        sysTimestampRunning = FALSE;    return (OK);    }/************************************************************************* sysTimestampPeriod - get a timestamp timer period** This routine specifies the period of the timestamp timer, in ticks.* The period, or terminal count, is the number of ticks to which the timestamp* timer counts before rolling over and restarting the counting process.** RETURNS: The period of the timestamp timer in counter ticks.*/UINT32 sysTimestampPeriod (void)    {    /*     * The period of the timestamp depends on the clock rate of the on-chip     * timer (ie the Decrementer reload value).     */    return (pitCountVal);    }/************************************************************************* sysTimestampFreq - get a timestamp timer clock frequency** This routine specifies the frequency of the timer clock, in ticks per second.* The rate of the timestamp timer should be set explicitly in the BSP* by sysHwInit().** RETURNS: The timestamp timer clock frequency, in ticks per second.*/UINT32 sysTimestampFreq (void)    {    return (sysTimerClkFreq);    }/************************************************************************* sysTimestamp - get a timestamp timer tick count** This routine returns the current value of the timestamp timer tick counter.* The tick count can be converted to seconds by dividing by the return of* sysTimestampFreq().** This routine should be called with interrupts locked.  If interrupts are* not locked, sysTimestampLock() should be used instead.** RETURNS: The current timestamp timer tick count.** SEE ALSO: sysTimestampFreq(), sysTimestampLock()*/UINT32 sysTimestamp (void)    {    return (pitCountVal - (UINT32) vxPitGet());    }/************************************************************************* sysTimestampLock - lock an interrupt and get a timestamp timer tick count** This routine locks interrupts when stop the tick counter must be stopped* in order to read it or when two independent counters must be read.* It then returns the current value of the timestamp timer tick counter.** The tick count can be converted to seconds by dividing by the return of* sysTimestampFreq().** If interrupts are already locked, sysTimestamp() should be* used instead.** RETURNS: The current timestamp timer tick count.** SEE ALSO: sysTimestamp()*/UINT32 sysTimestampLock (void)    {    UINT32 currentPitValue;    int oldLevel;    oldLevel = intLock ();                              /* LOCK INTERRUPT */    currentPitValue = vxPitGet();    intUnlock (oldLevel);                               /* UNLOCK INTERRUPT */    return (pitCountVal - currentPitValue);    }#endif  /* INCLUDE_TIMESTAMP */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕+乱码+中文字幕一区| 亚洲国产wwwccc36天堂| 国v精品久久久网| 亚洲国产一区二区视频| 日韩欧美的一区| 91丨porny丨国产入口| 蜜桃视频在线一区| 亚洲精品中文字幕在线观看| 精品久久久久久久久久久院品网| 91日韩在线专区| 久久国产三级精品| 亚洲国产综合人成综合网站| 欧美国产欧美综合| 日韩一级二级三级| 欧美色老头old∨ideo| av不卡一区二区三区| 久久9热精品视频| 天堂午夜影视日韩欧美一区二区| 国产精品短视频| 国产农村妇女精品| 欧美成人一区二区| 欧美日韩黄色影视| 色婷婷综合中文久久一本| 国产麻豆一精品一av一免费 | 午夜伦欧美伦电影理论片| 国产精品理论在线观看| 久久网站最新地址| 日韩欧美国产精品一区| 欧美日韩国产高清一区二区三区| 成人一级视频在线观看| 精品无码三级在线观看视频| 视频一区二区欧美| 日本精品免费观看高清观看| 91福利资源站| 亚洲宅男天堂在线观看无病毒| 欧美国产一区二区在线观看| 2023国产精品自拍| 精品美女一区二区| 日韩午夜小视频| 538在线一区二区精品国产| 欧美色综合网站| 欧洲激情一区二区| 在线国产电影不卡| 在线观看三级视频欧美| 在线观看亚洲一区| 91精品在线观看入口| 日本韩国一区二区三区视频| 日本久久电影网| 欧美亚洲一区二区三区四区| 欧美日本一道本| 7777精品伊人久久久大香线蕉经典版下载| 91精品91久久久中77777| 色婷婷综合视频在线观看| 色呦呦日韩精品| 欧美日韩中文字幕一区| 在线91免费看| 日韩欧美国产电影| 国产人成一区二区三区影院| 国产精品女人毛片| 一区二区三区电影在线播| 亚洲一二三区视频在线观看| 亚洲高清久久久| 久久机这里只有精品| 国产精品自拍网站| 99国产精品久久久久久久久久久| 91麻豆免费看片| 666欧美在线视频| 久久久久久久久久久久久女国产乱| 久久免费国产精品| 亚洲男女毛片无遮挡| 亚洲国产精品自拍| 久久se精品一区精品二区| 成人午夜精品在线| 欧美视频中文字幕| 日韩欧美激情在线| 中文字幕一区二区三中文字幕| 亚洲资源中文字幕| 激情小说亚洲一区| 91亚洲精华国产精华精华液| 欧美日韩三级在线| 国产亚洲精品福利| 一区二区高清在线| 国精产品一区一区三区mba桃花| 国产·精品毛片| 制服.丝袜.亚洲.另类.中文| 久久久99精品久久| 亚洲综合av网| 国产成人在线免费| 欧美精品xxxxbbbb| 国产精品成人网| 日韩电影免费在线看| 大桥未久av一区二区三区中文| 色婷婷综合久久久中文字幕| 精品奇米国产一区二区三区| 一区二区三区在线免费播放| 精品一区二区三区影院在线午夜 | 91精品蜜臀在线一区尤物| 国产视频一区二区三区在线观看| 亚洲精品视频一区二区| 国产一区999| 欧美日韩精品一区二区三区| 中文字幕av不卡| 精品一区二区在线视频| 亚洲精品一区二区三区99| 亚洲免费观看高清完整版在线观看| 免费成人av资源网| 在线亚洲免费视频| 国产精品伦理一区二区| 蜜臀av性久久久久蜜臀aⅴ流畅| av电影在线观看不卡| 26uuu色噜噜精品一区二区| 亚洲小说欧美激情另类| 91免费视频观看| 久久精品欧美日韩精品 | 国产精品亚洲专一区二区三区| 在线中文字幕一区| 国产精品久久福利| 国产高清不卡一区二区| 日韩一级欧美一级| 亚洲国产精品久久不卡毛片| av激情成人网| 国产欧美中文在线| 久久丁香综合五月国产三级网站| 91豆麻精品91久久久久久| 国产精品看片你懂得| 国产综合色精品一区二区三区| 欧美乱熟臀69xxxxxx| 亚洲图片欧美综合| 色综合天天天天做夜夜夜夜做| 国产欧美日韩在线观看| 国精产品一区一区三区mba桃花| 欧美一级日韩免费不卡| 午夜欧美视频在线观看| 欧美性感一类影片在线播放| 亚洲欧美经典视频| 91麻豆6部合集magnet| 国产精品国产三级国产专播品爱网| 国产乱子伦视频一区二区三区| 精品国产乱码久久久久久闺蜜| 日韩成人精品在线| 在线综合+亚洲+欧美中文字幕| 性做久久久久久免费观看| 欧美丝袜丝交足nylons| 亚洲一级电影视频| 欧美视频一区在线观看| 亚洲一区二三区| 911精品国产一区二区在线| 日韩电影在线一区| 欧美一级在线视频| 久久成人免费网站| 久久青草欧美一区二区三区| 国产成人在线电影| 国产精品理伦片| 欧美亚日韩国产aⅴ精品中极品| 亚洲综合成人网| 91精品国产综合久久福利软件| 久久er精品视频| 国产精品天美传媒| 色天使色偷偷av一区二区| 亚洲一区免费在线观看| 91精品国产日韩91久久久久久| 免费亚洲电影在线| 国产亚洲欧美激情| 一本一本大道香蕉久在线精品| 一个色妞综合视频在线观看| 欧美日韩国产区一| 久久er99热精品一区二区| 日本一区二区动态图| 欧美在线观看视频一区二区| 日韩av一级片| 日本一区二区动态图| 欧美综合久久久| 久久91精品久久久久久秒播| 国产亚洲制服色| zzijzzij亚洲日本少妇熟睡| 亚洲一二三四区不卡| 日韩精品影音先锋| 99久久久久免费精品国产| 五月天欧美精品| 国产午夜亚洲精品午夜鲁丝片| 色综合久久六月婷婷中文字幕| 日韩制服丝袜av| 国产精品久久久久影院| 欧美精品tushy高清| 国产成人精品亚洲777人妖| 亚洲视频一二三区| 精品国产三级a在线观看| 91网址在线看| 久久不见久久见免费视频7| 亚洲欧美激情在线| 精品国产伦一区二区三区免费| 成人av电影观看| 婷婷亚洲久悠悠色悠在线播放| 国产免费久久精品| 欧美精品丝袜久久久中文字幕| 国产不卡免费视频| 日本欧美加勒比视频| 亚洲人成伊人成综合网小说| 欧美一级黄色录像| 欧美午夜影院一区|