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

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

?? timer.c

?? 飛利浦LM3S系列ARM的庫文件,在進行arm開發時所必須的庫文件,直接加到工程中,一般不必修改.
?? 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));
}

//*****************************************************************************
//
//! 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.
//
//*****************************************************************************
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);
    }
}

//*****************************************************************************
//
//! 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.
//
//*****************************************************************************
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);
    }
}

//*****************************************************************************
//
//! 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.
//
//*****************************************************************************
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;
}

//*****************************************************************************
//
//! 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.
//
//*****************************************************************************
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);
}

//*****************************************************************************
//
//! 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().
//
//*****************************************************************************
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));
}

//*****************************************************************************
//
//! 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.
//
//*****************************************************************************
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;
}

//*****************************************************************************
//
//! 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.
//
//*****************************************************************************
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;
}

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩免费电影| 精品亚洲免费视频| 国产亚洲一区字幕| 欧美一级精品大片| 欧美日韩国产综合一区二区三区| 韩国一区二区三区| 粉嫩13p一区二区三区| 久久国产免费看| 国产伦精品一区二区三区免费 | 国产日产欧美精品一区二区三区| 精品理论电影在线| 久久久久久夜精品精品免费| 国产亚洲一区二区三区四区| 中文字幕一区二区5566日韩| 日韩久久一区二区| 亚洲综合丁香婷婷六月香| 亚洲v日本v欧美v久久精品| 日本欧美在线观看| 国产曰批免费观看久久久| 成人午夜视频网站| 91免费在线看| 欧美一区二区高清| 国产精品亲子乱子伦xxxx裸| 亚洲精品v日韩精品| 奇米精品一区二区三区四区| 国产成人av电影| 欧美视频日韩视频| xf在线a精品一区二区视频网站| 国产精品免费视频观看| 一区二区在线电影| 另类中文字幕网| 国产宾馆实践打屁股91| 欧美在线制服丝袜| 欧美不卡激情三级在线观看| 国产精品美女久久久久久久久| 一区二区国产视频| 国产精品综合久久| 欧美日韩一区二区在线视频| 久久久亚洲精品石原莉奈| 亚洲私人黄色宅男| 国产九色精品成人porny | 337p粉嫩大胆色噜噜噜噜亚洲 | 奇米影视7777精品一区二区| 国产91高潮流白浆在线麻豆| 色女孩综合影院| 欧美日本一区二区| 国产精品久久99| 麻豆成人av在线| 色呦呦日韩精品| 欧美激情艳妇裸体舞| 日韩黄色一级片| 色综合久久久久久久久久久| 日韩精品一区二区在线观看| 洋洋成人永久网站入口| 国产99久久久久| 欧美xxxxxxxx| 婷婷中文字幕综合| 色久综合一二码| 中文字幕一区av| 国产福利精品一区二区| 在线观看91av| 一区二区在线观看av| www.亚洲精品| 久久久久国产精品麻豆| 久草这里只有精品视频| 欧美曰成人黄网| 亚洲欧美一区二区视频| 99riav久久精品riav| 国产人伦精品一区二区| 精品一区二区免费看| 精品日韩成人av| 秋霞电影网一区二区| 91蜜桃免费观看视频| 亚洲欧美视频在线观看视频| 精品一区二区三区久久久| 91麻豆精品国产无毒不卡在线观看| 亚洲柠檬福利资源导航| 国产精品资源在线看| 日韩丝袜情趣美女图片| 久久er99热精品一区二区| 日韩欧美一区在线| 久久99精品久久久| 国产日韩三级在线| 99久久精品免费精品国产| 成人欧美一区二区三区小说| 91一区一区三区| 一区二区成人在线观看| 欧美无乱码久久久免费午夜一区 | 欧美激情一区二区三区不卡 | 夜色激情一区二区| 欧美麻豆精品久久久久久| 日本不卡在线视频| 精品粉嫩超白一线天av| 国产一区二区精品久久| 国产精品成人免费精品自在线观看 | 亚洲同性同志一二三专区| 91色在线porny| 亚洲1区2区3区4区| 2020国产精品| 色综合久久中文字幕| 青青草国产精品亚洲专区无| 久久久一区二区| 91麻豆免费看| 久久精品国产免费| 中文字幕一区在线| 777欧美精品| 国产99久久久国产精品| 亚洲黄色免费网站| 久久综合九色综合欧美就去吻| 国产一区二区剧情av在线| 亚洲最大成人网4388xx| 日韩无一区二区| 91日韩在线专区| 韩国成人精品a∨在线观看| 国产精品国产自产拍高清av| 精品视频1区2区| 成人免费看黄yyy456| 婷婷丁香激情综合| 国产精品视频免费| 日韩精品一区二区三区在线观看| 成人亚洲一区二区一| 日本欧美韩国一区三区| 1区2区3区精品视频| 欧美成人猛片aaaaaaa| 91成人网在线| 成人免费视频视频| 麻豆精品在线观看| 亚洲国产美女搞黄色| 亚洲国产精品激情在线观看| 91麻豆精品国产91久久久更新时间| 99热在这里有精品免费| 国产中文字幕一区| 亚洲一卡二卡三卡四卡| 中文字幕中文字幕在线一区| 欧美成人一区二区三区| 欧美日韩不卡视频| 欧美亚洲愉拍一区二区| 9i在线看片成人免费| 国产一区二区三区视频在线播放| 亚洲线精品一区二区三区| 国产精品污www在线观看| 日韩精品一区二区三区四区视频| 欧美亚洲综合另类| 色婷婷久久久久swag精品| 丁香六月久久综合狠狠色| 国产综合成人久久大片91| 六月丁香综合在线视频| 爽好多水快深点欧美视频| 亚洲一区自拍偷拍| 一区二区三区中文在线| 亚洲日本一区二区| 亚洲乱码中文字幕综合| 亚洲精品大片www| 亚洲精品成人在线| 亚洲一区二区在线免费看| 亚洲私人黄色宅男| 亚洲制服欧美中文字幕中文字幕| 一区2区3区在线看| 亚洲午夜久久久| 婷婷综合另类小说色区| 国产精品99久久久久久似苏梦涵 | 午夜a成v人精品| 日韩av中文字幕一区二区三区 | 国产成人在线视频网站| 国产一区不卡在线| 国产福利一区二区三区视频| 成人h动漫精品一区二区| 成人免费毛片嘿嘿连载视频| 97精品国产97久久久久久久久久久久| 99re在线精品| 欧美少妇性性性| 日韩欧美国产一区二区在线播放| 日韩午夜在线影院| 久久先锋资源网| 亚洲国产精品av| 亚洲精品美国一| 日韩福利电影在线观看| 国产揄拍国内精品对白| 成人一区二区三区视频在线观看| 99在线热播精品免费| 色又黄又爽网站www久久| 欧美老年两性高潮| 国产亚洲欧美激情| 亚洲高清在线精品| 精品一区二区三区免费观看| 在线国产亚洲欧美| 欧美一卡2卡三卡4卡5免费| 久久久精品日韩欧美| 亚洲欧洲99久久| 美女www一区二区| 91亚洲资源网| 欧美成人精品二区三区99精品| 中文一区二区在线观看| 午夜欧美一区二区三区在线播放| 国产在线精品一区二区三区不卡| 99久久久久久| 精品盗摄一区二区三区| 亚洲最新在线观看| 丁香婷婷深情五月亚洲| 91高清视频免费看|