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

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

?? timer.c

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? C
?? 第 1 頁 / 共 3 頁
字號:
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));
    ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B));

    //
    // Return the appropriate match value.
    //
    return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAMATCHR) :
           HWREG(ulBase + TIMER_O_TBMATCHR));
}
#endif

//*****************************************************************************
//
//! Registers an interrupt handler for the timer interrupt.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer(s); must be one of \b TIMER_A,
//! \b TIMER_B, or \b TIMER_BOTH.
//! \param pfnHandler is a pointer to the function to be called when the timer
//! interrupt occurs.
//!
//! This sets the handler to be called when a timer interrupt occurs.  This
//! will enable the global interrupt in the interrupt controller; specific
//! timer interrupts must be enabled via TimerIntEnable().  It is the interrupt
//! handler's responsibility to clear the interrupt source via TimerIntClear().
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intregister) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerIntRegister(unsigned long ulBase, unsigned long ulTimer,
                 void (*pfnHandler)(void))
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));
    ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) ||
           (ulTimer == TIMER_BOTH));

    //
    // Get the interrupt number for this timer module.
    //
    ulBase = ((ulBase == TIMER0_BASE) ? INT_TIMER0A :
              ((ulBase == TIMER1_BASE) ? INT_TIMER1A : INT_TIMER2A));

    //
    // Register an interrupt handler for timer A if requested.
    //
    if(ulTimer & TIMER_A)
    {
        //
        // Register the interrupt handler.
        //
        IntRegister(ulBase, pfnHandler);

        //
        // Enable the interrupt.
        //
        IntEnable(ulBase);
    }

    //
    // Register an interrupt handler for timer B if requested.
    //
    if(ulTimer & TIMER_B)
    {
        //
        // Register the interrupt handler.
        //
        IntRegister(ulBase + 1, pfnHandler);

        //
        // Enable the interrupt.
        //
        IntEnable(ulBase + 1);
    }
}
#endif

//*****************************************************************************
//
//! Unregisters an interrupt handler for the timer interrupt.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer(s); must be one of \b TIMER_A,
//! \b TIMER_B, or \b TIMER_BOTH.
//!
//! This function will clear the handler to be called when a timer interrupt
//! occurs.  This will also mask off the interrupt in the interrupt controller
//! so that the interrupt handler no longer is called.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intunregister) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerIntUnregister(unsigned long ulBase, unsigned long ulTimer)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));
    ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) ||
           (ulTimer == TIMER_BOTH));

    //
    // Get the interrupt number for this timer module.
    //
    ulBase = ((ulBase == TIMER0_BASE) ? INT_TIMER0A :
              ((ulBase == TIMER1_BASE) ? INT_TIMER1A : INT_TIMER2A));

    //
    // Unregister the interrupt handler for timer A if requested.
    //
    if(ulTimer & TIMER_A)
    {
        //
        // Disable the interrupt.
        //
        IntDisable(ulBase);

        //
        // Unregister the interrupt handler.
        //
        IntUnregister(ulBase);
    }

    //
    // Unregister the interrupt handler for timer B if requested.
    //
    if(ulTimer & TIMER_B)
    {
        //
        // Disable the interrupt.
        //
        IntDisable(ulBase + 1);

        //
        // Unregister the interrupt handler.
        //
        IntUnregister(ulBase + 1);
    }
}
#endif

//*****************************************************************************
//
//! Enables individual timer interrupt sources.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulIntFlags is the bit mask of the interrupt sources to be enabled.
//!
//! Enables the indicated timer interrupt sources.  Only the sources that are
//! enabled can be reflected to the processor interrupt; disabled sources have
//! no effect on the processor.
//!
//! The parameter \e ulIntFlags must be the logical OR of any combination of
//! the following:
//!
//! - TIMER_CAPB_EVENT  - Capture B event interrupt
//! - TIMER_CAPB_MATCH  - Capture B match interrupt
//! - TIMER_TIMB_TIMEOUT  - Timer B timeout interrupt
//! - TIMER_RTC_MATCH  - RTC interrupt mask
//! - TIMER_CAPA_EVENT  - Capture A event interrupt
//! - TIMER_CAPA_MATCH  - Capture A match interrupt
//! - TIMER_TIMA_TIMEOUT  - Timer A timeout interrupt
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intenable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerIntEnable(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));

    //
    // Enable the specified interrupts.
    //
    HWREG(ulBase + TIMER_O_IMR) |= ulIntFlags;
}
#endif

//*****************************************************************************
//
//! Disables individual timer interrupt sources.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulIntFlags is the bit mask of the interrupt sources to be disabled.
//!
//! Disables the indicated timer interrupt sources.  Only the sources that are
//! enabled can be reflected to the processor interrupt; disabled sources have
//! no effect on the processor.
//!
//! The parameter \e ulIntFlags has the same definition as the \e ulIntFlags
//! parameter to TimerIntEnable().
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intdisable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerIntDisable(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));

    //
    // Disable the specified interrupts.
    //
    HWREG(ulBase + TIMER_O_IMR) &= ~(ulIntFlags);
}
#endif

//*****************************************************************************
//
//! Gets the current interrupt status.
//!
//! \param ulBase is the base address of the timer module.
//! \param bMasked is false if the raw interrupt status is required and true if
//! the masked interrupt status is required.
//!
//! This returns the interrupt status for the timer module.  Either the raw
//! interrupt status or the status of interrupts that are allowed to reflect to
//! the processor can be returned.
//!
//! \return The current interrupt status, enumerated as a bit field of
//! values described in TimerIntEnable().
//
//*****************************************************************************
#if defined(GROUP_intstatus) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
TimerIntStatus(unsigned long ulBase, tBoolean bMasked)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));

    //
    // Return either the interrupt status or the raw interrupt status as
    // requested.
    //
    return(bMasked ? HWREG(ulBase + TIMER_O_MIS) :
           HWREG(ulBase + TIMER_O_RIS));
}
#endif

//*****************************************************************************
//
//! Clears timer interrupt sources.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared.
//!
//! The specified timer interrupt sources are cleared, so that they no longer
//! assert.  This must be done in the interrupt handler to keep it from being
//! called again immediately upon exit.
//!
//! The parameter \e ulIntFlags has the same definition as the \e ulIntFlags
//! parameter to TimerIntEnable().
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intclear) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerIntClear(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));

    //
    // Clear the requested interrupt sources.
    //
    HWREG(ulBase + TIMER_O_ICR) = ulIntFlags;
}
#endif

//*****************************************************************************
//
//! Puts the timer into its reset state.
//!
//! \param ulBase is the base address of the timer module.
//!
//! The specified timer is disabled, and all its interrupts are disabled,
//! cleared, and unregistered. Then the timer registers are set to their reset
//! value.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_quiesce) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerQuiesce(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));

    //
    // Disable the timer.
    //
    HWREG(ulBase + TIMER_O_CTL) = TIMER_RV_CTL;

    //
    // Disable all the timer interrupts.
    //
    HWREG(ulBase + TIMER_O_IMR) = TIMER_RV_IMR;

    //
    // Clear all the timer interrupts.
    //
    HWREG(ulBase + TIMER_O_ICR) = 0xFFFFFFFF;

    //
    // Unregister the interrupt handler.  This also disables interrupts to the
    // core.
    //
    TimerIntUnregister(ulBase, TIMER_BOTH);

    //
    // Set all the registers to their reset value.
    //
    HWREG(ulBase + TIMER_O_CFG) = TIMER_RV_CFG;
    HWREG(ulBase + TIMER_O_TAMR) = TIMER_RV_TAMR;
    HWREG(ulBase + TIMER_O_TBMR) = TIMER_RV_TBMR;
    HWREG(ulBase + TIMER_O_RIS) = TIMER_RV_RIS;
    HWREG(ulBase + TIMER_O_MIS) = TIMER_RV_MIS;
    HWREG(ulBase + TIMER_O_TAILR) = TIMER_RV_TAILR;
    HWREG(ulBase + TIMER_O_TBILR) = TIMER_RV_TBILR;
    HWREG(ulBase + TIMER_O_TAMATCHR) = TIMER_RV_TAMATCHR;
    HWREG(ulBase + TIMER_O_TBMATCHR) = TIMER_RV_TBMATCHR;
    HWREG(ulBase + TIMER_O_TAPR) = TIMER_RV_TAPR;
    HWREG(ulBase + TIMER_O_TBPR) = TIMER_RV_TBPR;
    HWREG(ulBase + TIMER_O_TAPMR) = TIMER_RV_TAPMR;
    HWREG(ulBase + TIMER_O_TBPMR) = TIMER_RV_TBPMR;
    HWREG(ulBase + TIMER_O_TAR) = TIMER_RV_TAR;
    HWREG(ulBase + TIMER_O_TBR) = TIMER_RV_TBR;
}
#endif

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频狠狠干| 最新成人av在线| 久久国产精品免费| 欧美美女激情18p| 亚洲国产欧美一区二区三区丁香婷| 99精品视频一区二区| 中文字幕国产精品一区二区| 国产精品一级黄| 国产亚洲精品中文字幕| 国产成人精品免费一区二区| 久久久久久久电影| 成人晚上爱看视频| 国产精品免费人成网站| 不卡高清视频专区| 最新日韩在线视频| 日本精品一区二区三区高清 | 五月激情综合网| 欧美日韩一卡二卡三卡| 日韩专区一卡二卡| 日韩视频一区二区在线观看| 精品在线视频一区| 国产日韩欧美一区二区三区综合| 岛国一区二区在线观看| 中文字幕一区视频| 日本黄色一区二区| 香蕉成人啪国产精品视频综合网| 欧美人xxxx| 蜜桃视频第一区免费观看| 欧美精品一区二| 国产成人午夜视频| 国产精品久久久久桃色tv| 色狠狠桃花综合| 性欧美疯狂xxxxbbbb| 欧美mv日韩mv国产网站app| 国产精品一区在线观看你懂的| 国产欧美一区视频| 在线免费不卡电影| 日本在线不卡视频| 久久久久久亚洲综合影院红桃| 成人av先锋影音| 亚洲五码中文字幕| 日韩三级av在线播放| 国产suv一区二区三区88区| 亚洲欧美欧美一区二区三区| 在线播放欧美女士性生活| 看片网站欧美日韩| 日韩久久一区二区| 5月丁香婷婷综合| 国产精品一区久久久久| 亚洲精品国产视频| 日韩一区二区三区高清免费看看 | 精品一区二区三区蜜桃| 国产片一区二区| 欧美视频一二三区| 国产激情一区二区三区四区| 最新国产の精品合集bt伙计| 7878成人国产在线观看| 成人免费福利片| 性做久久久久久免费观看 | 久久久蜜桃精品| 日本高清成人免费播放| 久久精品国产在热久久| 亚洲丝袜另类动漫二区| 日韩一区二区免费视频| 99re这里只有精品首页| 男男成人高潮片免费网站| 中文字幕不卡一区| 91精品在线麻豆| 不卡的av电影| 老司机一区二区| 亚洲蜜臀av乱码久久精品蜜桃| 日韩一级大片在线| 色综合天天做天天爱| 国产真实乱子伦精品视频| 亚洲一区视频在线观看视频| 久久久久久久精| 884aa四虎影成人精品一区| 9l国产精品久久久久麻豆| 日韩电影在线一区| 亚洲青青青在线视频| 亚洲精品一区二区三区影院| 在线视频观看一区| 风间由美一区二区av101| 日产国产高清一区二区三区| 亚洲欧洲日韩综合一区二区| 精品捆绑美女sm三区| 欧美亚洲一区二区在线| 风间由美性色一区二区三区| 美日韩一区二区三区| 亚洲伊人伊色伊影伊综合网| 中文字幕av不卡| 欧美mv日韩mv国产网站app| 欧美日韩精品系列| 色88888久久久久久影院按摩| 国产精品1区2区| 美女视频免费一区| 香蕉成人伊视频在线观看| 亚洲欧美日韩一区二区三区在线观看| 26uuu久久综合| 91精品国产综合久久小美女| 欧美在线综合视频| youjizz久久| 国产成人av电影免费在线观看| 美女视频第一区二区三区免费观看网站| 怡红院av一区二区三区| 中文字幕一区三区| 国产精品国产精品国产专区不蜜| 久久久激情视频| 久久综合色8888| 日韩视频在线观看一区二区| 欧美精品色一区二区三区| 欧美在线观看视频在线| 91老师国产黑色丝袜在线| 福利视频网站一区二区三区| 国产精品99久久久| 国产一区二区精品在线观看| 国产在线视频一区二区三区| 麻豆国产欧美日韩综合精品二区| 日本不卡一区二区| 三级影片在线观看欧美日韩一区二区| 一区二区三区欧美激情| 亚洲欧美日韩国产综合| 亚洲天堂免费在线观看视频| 国产精品你懂的在线欣赏| 日本一区二区三区高清不卡| 国产日韩欧美综合一区| 亚洲国产精品ⅴa在线观看| 国产午夜精品一区二区| 欧美激情艳妇裸体舞| 欧美激情资源网| 国产精品欧美久久久久一区二区| 国产精品天干天干在线综合| 国产精品久久网站| 国产精品福利影院| 亚洲人被黑人高潮完整版| 亚洲综合在线视频| 亚洲丰满少妇videoshd| 日韩av一级片| 毛片一区二区三区| 国产一区 二区| 国产91在线|亚洲| 91在线小视频| 91国产免费观看| 欧美美女视频在线观看| 日韩视频一区二区三区| 久久综合色一综合色88| 国产精品美女www爽爽爽| 一区在线中文字幕| 一区二区三区欧美在线观看| 亚洲成人1区2区| 久久成人免费日本黄色| 国产精品原创巨作av| 成人av电影观看| 欧美主播一区二区三区| 欧美一区二区三区婷婷月色| 日韩欧美的一区| 国产女人aaa级久久久级| 最新不卡av在线| 日韩国产在线观看一区| 精品一区精品二区高清| 成人午夜短视频| 欧美亚洲尤物久久| 欧美电影免费观看高清完整版在线 | 国产成人日日夜夜| 91小视频免费观看| 欧美日韩1区2区| 欧美不卡视频一区| 国产精品美女一区二区在线观看| 一区二区三区在线观看国产| 五月天欧美精品| 国产精品亚洲综合一区在线观看| av综合在线播放| 91精品国产综合久久久蜜臀图片| www一区二区| 亚洲欧美日韩小说| 久久精品国产精品亚洲综合| 成人h动漫精品| 91精品在线一区二区| 国产精品视频yy9299一区| 亚洲国产乱码最新视频| 久久99国产精品久久99果冻传媒| av一区二区三区在线| 欧美精品v国产精品v日韩精品| 久久久久久久久99精品| 亚洲一区免费观看| 国产在线精品一区在线观看麻豆| 成人免费av资源| 欧美精品自拍偷拍| 欧美韩日一区二区三区四区| 午夜精彩视频在线观看不卡| 国产不卡视频在线观看| 欧美精选一区二区| 国产日韩欧美精品一区| 亚洲亚洲人成综合网络| 国产剧情一区二区| 91精品国产欧美一区二区成人| 中文欧美字幕免费| 男人的j进女人的j一区| 色综合久久久久网| 欧美精品一区二区三区蜜桃视频|