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

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

?? sngks32ctimer.c

?? 440bx vxworks bsp
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*******************************************************************************
*
* 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 */
    sysAuxClkRoutine = (FUNCPTR)((UINT32)routine | 1);
#else
    sysAuxClkRoutine = routine;
#endif /* CPU_FAMILY == ARM */

    return (OK);
    }

/*******************************************************************************
*
* sysAuxClkDisable - turn off auxiliary clock interrupts
*
* This routine disables auxiliary clock interrupts.
*
* RETURNS: N/A
*
* SEE ALSO: sysAuxClkEnable()
*/

void sysAuxClkDisable (void)
    {
    /*UINT32 oier;*/		/*  : deleted */
    
    if (sysAuxClkRunning)
        {
        /* disable timer interrupt in the timer */
		/*  : deleted */
        /*SNGKS32C_TIMER_REG_READ (SNGKS32C_TIMER_TMOD, oier);*/
        /*SNGKS32C_TIMER_REG_WRITE (SNGKS32C_TIMER_TMOD, oier & ~(1 << 3));*/

        /* disable timer interrupt in the interrupt controller */

        SNGKS32C_TIMER_INT_DISABLE (AUX_TIMER_INT_LVL);

        sysAuxClkRunning = FALSE;
        }
    }

/*******************************************************************************
*
* sysAuxClkEnable - turn on auxiliary clock interrupts
*
* This routine enables auxiliary clock interrupts.
*
* RETURNS: N/A
*
* SEE ALSO: sysAuxClkConnect(), sysAuxClkDisable(), sysAuxClkRateSet()
*/

void sysAuxClkEnable (void)
    {
    /*UINT32 oier;*/	/*  : deleted */
    static BOOL connected = FALSE;

    if (!connected)
        {
        intConnect (INUM_TO_IVEC (INT_LVL_TIMER1), sysAuxClkInt, 0);
        connected = TRUE;
        }

    if (!sysAuxClkRunning)
        {
        /*
         * Calculate the number of ticks of the timer clock that this
         * period requires.  Do this once, here, so that the timer interrupt
         * routine does not need to perform a division.
         */

        sysAuxClkTicks = (AUX_TIMER_CLK / sysAuxClkTicksPerSecond);

        /*
         * 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 that's OK.
         */
		/*  : deleted */
        /*SNGKS32C_TIMER_REG_WRITE (SNGKS32C_TIMER_TDATA_1, sysAuxClkTicks);*/

        /* enable timer 1 */
		/*  : deleted */
        /*SNGKS32C_TIMER_REG_READ (SNGKS32C_TIMER_TMOD, oier);*/
        /*SNGKS32C_TIMER_REG_WRITE (SNGKS32C_TIMER_TMOD, oier | 8);*/

        /* enable clock interrupt in interrupt controller */
        SNGKS32C_TIMER_INT_ENABLE (AUX_TIMER_INT_LVL);

        sysAuxClkRunning = TRUE;
        }
    }

/*******************************************************************************
*
* sysAuxClkRateGet - get the auxiliary clock rate
*
* 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 */
    )
    {
    if (ticksPerSecond < AUX_CLK_RATE_MIN || ticksPerSecond > AUX_CLK_RATE_MAX)
        return (ERROR);

    sysAuxClkTicksPerSecond = ticksPerSecond;

    if (sysAuxClkRunning)
        {
        sysAuxClkDisable ();
        sysAuxClkEnable ();
        }

    return (OK);
    }

#ifdef  INCLUDE_TIMESTAMP

/*******************************************************************************
*
* sysTimestampInt - timestamp timer interrupt handler
*
* This routine handles the timestamp timer interrupt.  A user routine is
* called, if one was connected by sysTimestampConnect().
*
* RETURNS: N/A
*
* SEE ALSO: sysTimestampConnect()
*/

void sysTimestampInt (void)
    {
    if (sysTimestampRunning && sysTimestampRoutine != NULL)
        (*sysTimestampRoutine)(sysTimestampArg);
    }

/*******************************************************************************
*
* sysTimestampConnect - connect a user routine to the timestamp timer interrupt
*
* This routine specifies the user interrupt routine to be called at each
* timestamp timer interrupt.  It does not enable the timestamp timer itself.
*
* 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;    /* System clock tick specifies a rollover event */
    }

/*******************************************************************************
*
* sysTimestampEnable - initialize and enable the timestamp timer
*
* This routine connects the timestamp timer interrupt and initializes the
* counter registers.  If the timestamp timer is already running, this routine
* merely resets the timer counter.
*
* The rate of the timestamp timer should be set explicitly within the BSP,
* in the sysHwInit() routine.  This routine does not initialize the timer
* rate.
*
* RETURNS: OK, or ERROR if hardware cannot be enabled.
*/

STATUS sysTimestampEnable (void)
    {

    if (!sysTimestampRunning)
        {
        sysTimestampRunning = TRUE;
        }

    sysClkEnable();    /* make sure that system clock is running */

    return (OK);
    }

/*******************************************************************************
*
* sysTimestampDisable - disable the timestamp timer
*
* This routine disables the timestamp timer.  Interrupts are not disabled,
* although the tick counter will not increment after the timestamp timer
* is disabled, thus interrupts will no longer be generated.
*
* RETURNS: OK, or ERROR if timer cannot be disabled.
*/

STATUS sysTimestampDisable (void)
    {
    if (sysTimestampRunning)
        sysTimestampRunning = FALSE;

    return (OK);
    }

/*******************************************************************************
*
* sysTimestampPeriod - get the timestamp timer period
*
* This routine returns the period of the timestamp timer in ticks.
* The period, or terminal count, is the number of ticks to which the timestamp
* timer will count before rolling over and restarting the counting process.
*
* RETURNS: The period of the timestamp timer in counter ticks.
*/

UINT32 sysTimestampPeriod (void)
    {
    return (SYS_TIMER_CLK / sysClkTicksPerSecond);
    }

/*******************************************************************************
*
* sysTimestampFreq - get the timestamp timer clock frequency
*
* This routine returns the frequency of the timer clock, in ticks per second.
*
* RETURNS: The timestamp timer clock frequency, in ticks per second.
*/

UINT32 sysTimestampFreq (void)
    {
    return (SYS_TIMER_CLK);
    }

/*******************************************************************************
*
* sysTimestamp - get the 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 already locked, sysTimestampLock() should be used instead.
*
* RETURNS: The current timestamp timer tick count.
*
* SEE ALSO: sysTimestampLock()
*/

UINT32 sysTimestamp (void)
    {
    UINT32 count;

    /*SNGKS32C_TIMER_REG_READ (SNGKS32C_TIMER_TCNT_0, count);*/
	/*  : deleted and added */
	SNGKS32C_TIMER_REG_READ (S3C44B0X_TCNTO0, count);
	
    /* timer counts down to 0 from sysClkTicks load value */
    return (sysTimestampPeriod() - count);
    }

/*******************************************************************************
*
* sysTimestampLock - get the 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 locks interrupts for cases where it is necessary to stop the
* tick counter in order to read it, or when two independent counters must
* be read.  If interrupts are already locked, sysTimestamp() should be
* used instead.
*
* RETURNS: The current timestamp timer tick count.
*
* SEE ALSO: sysTimestamp()
*/

UINT32 sysTimestampLock (void)
    {
    UINT32 result;

    result = sysTimestamp ();

    return (result);
    }

#endif  /* INCLUDE_TIMESTAMP */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩免费一区二区| 国产精品久久久久三级| 欧美在线影院一区二区| av网站一区二区三区| 国产91露脸合集magnet| 国产激情一区二区三区四区| 国产乱色国产精品免费视频| 国产九九视频一区二区三区| 精品一区二区三区久久| 国精品**一区二区三区在线蜜桃| 石原莉奈在线亚洲三区| 亚洲综合激情另类小说区| 亚洲精品免费视频| 亚洲午夜三级在线| 一区二区三区波多野结衣在线观看| 亚洲女与黑人做爰| 亚洲一区二区精品视频| 一区二区三区欧美日| 一二三四社区欧美黄| 亚洲一区二区av电影| 中文字幕一区二区三区在线播放 | 日本三级亚洲精品| 午夜精品久久久久久久久久| 性做久久久久久免费观看欧美| 亚洲成人一二三| 天天操天天干天天综合网| 天天色天天操综合| 亚洲精品中文在线影院| 亚洲国产精品久久人人爱| 日韩精品1区2区3区| 日韩黄色一级片| 久久精品国产77777蜜臀| 国产精品99久久久久久久女警| 韩国成人精品a∨在线观看| 国产精品91一区二区| av在线播放不卡| 99久久伊人精品| 欧美综合视频在线观看| 精品国精品国产尤物美女| 欧美激情一区二区| 亚洲欧美日韩国产中文在线| 蜜乳av一区二区| 亚洲欧美一区二区三区国产精品| 国产欧美日韩精品一区| 亚洲综合男人的天堂| 中文字幕精品—区二区四季| 精品久久人人做人人爰| 中文天堂在线一区| 无码av免费一区二区三区试看| 麻豆国产91在线播放| 成人ar影院免费观看视频| 777奇米成人网| 中文字幕欧美三区| 亚洲国产美女搞黄色| 国产一区不卡在线| 91久久免费观看| 精品国产1区2区3区| 夜夜操天天操亚洲| 国产伦精品一区二区三区免费| 色综合欧美在线视频区| 91理论电影在线观看| 欧美一区二区免费观在线| 91精品国产高清一区二区三区蜜臀| 亚洲国产精品成人综合| 久久 天天综合| 欧美欧美欧美欧美首页| 国产精品区一区二区三| 美女久久久精品| 欧美中文一区二区三区| 国产精品五月天| 久久国产欧美日韩精品| 欧美综合色免费| 国产精品夫妻自拍| 国产九色精品成人porny| 欧美在线啊v一区| 亚洲国产精品成人综合 | 99精品一区二区| 欧美人动与zoxxxx乱| 亚洲欧美一区二区三区国产精品 | 处破女av一区二区| 欧美一级搡bbbb搡bbbb| 亚洲精品中文字幕乱码三区| 成人高清视频在线观看| 久久亚洲综合色| 日韩精品亚洲一区二区三区免费| 91免费观看在线| 亚洲婷婷国产精品电影人久久| 国产高清视频一区| 久久免费看少妇高潮| 精品一区精品二区高清| 这里只有精品99re| 亚洲第一福利视频在线| 在线观看不卡一区| 亚洲国产精华液网站w | 国产一区二区视频在线| 国产欧美一区视频| 欧美日韩国产区一| 91在线视频免费观看| 国产精品麻豆一区二区| 美腿丝袜在线亚洲一区| 欧美一区二区三区在线电影| 美女一区二区在线观看| 2024国产精品视频| 972aa.com艺术欧美| 午夜av一区二区| 久久这里都是精品| 91视频.com| 视频一区二区三区入口| 欧美性视频一区二区三区| 亚洲视频在线观看三级| 色爱区综合激月婷婷| 中文字幕日本乱码精品影院| 99久久久精品免费观看国产蜜| 亚洲视频你懂的| 欧美图片一区二区三区| 日本一区二区三区视频视频| 一区二区三区蜜桃网| 欧美日韩综合在线免费观看| 视频在线观看国产精品| 色欧美乱欧美15图片| 亚洲一区二区三区在线看| 欧美理论片在线| 老司机精品视频导航| 久久综合九色综合欧美98| 国产91丝袜在线播放九色| 亚洲欧洲99久久| 色综合久久66| 国产日产亚洲精品系列| 国产成人精品亚洲午夜麻豆| 亚洲另类一区二区| 欧美精品电影在线播放| 日韩精品一二三四| 337p日本欧洲亚洲大胆精品| 国产九色sp调教91| 亚洲美女区一区| 欧美人体做爰大胆视频| 国产主播一区二区| 日韩一区有码在线| 国产成人免费高清| 7777精品伊人久久久大香线蕉| 日韩精品亚洲专区| 久久久精品综合| 欧美中文一区二区三区| 国内精品久久久久影院一蜜桃| 国产精品情趣视频| 欧美日韩国产影片| 国产不卡在线一区| 午夜精品123| 日韩精品中文字幕在线不卡尤物 | 午夜欧美2019年伦理| 2024国产精品视频| 91蝌蚪porny成人天涯| 美国毛片一区二区三区| 中文字幕一区二区三区不卡在线| 欧美精品1区2区3区| 国产高清不卡二三区| 午夜成人在线视频| 中文字幕亚洲精品在线观看| 日韩欧美在线网站| 国产伦精品一区二区三区视频青涩 | 日韩国产欧美在线视频| 久久先锋资源网| 欧美三级电影精品| 黄色成人免费在线| 亚洲一区二区中文在线| 国产午夜精品一区二区| 欧美一区二区三区在线| 成人综合日日夜夜| 日韩午夜在线观看视频| 99久久久久免费精品国产| 蜜桃一区二区三区在线| 一区二区三区自拍| 国产日韩欧美不卡| 日韩欧美激情在线| 欧美日韩中文字幕一区二区| 成人小视频免费在线观看| 美日韩黄色大片| 亚洲免费毛片网站| 国产欧美一区二区三区鸳鸯浴 | 久久久久久久免费视频了| 欧美日韩精品一区二区天天拍小说| 精品中文字幕一区二区小辣椒| 亚洲国产裸拍裸体视频在线观看乱了 | 欧美一级欧美三级| 欧洲av在线精品| 成人av在线播放网址| 狠狠色丁香久久婷婷综| 日本亚洲免费观看| 亚洲国产精品自拍| 一区二区三区中文在线观看| 国产精品电影一区二区| 国产婷婷色一区二区三区| 日韩欧美国产电影| 欧美精品自拍偷拍| 欧美日韩色综合| 欧美亚男人的天堂| 色94色欧美sute亚洲线路一久 | 久久这里都是精品| 精品成人一区二区| 成人免费高清在线|