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

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

?? timer.c

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? C
?? 第 1 頁 / 共 3 頁
字號:
//! Disable RTC counting.
//!
//! \param ulBase is the base address of the timer module.
//!
//! This function causes the timer to stop counting when in RTC mode.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_rtcdisable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerRTCDisable(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));

    //
    // Disable RTC counting.
    //
    HWREG(ulBase + TIMER_O_CTL) &= ~(TIMER_CTL_RTCEN);
}
#endif

//*****************************************************************************
//
//! Set the timer prescale value.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A,
//! \b TIMER_B, or \b TIMER_BOTH.
//! \param ulValue is the timer prescale value; must be between 0 and 255,
//! inclusive.
//!
//! This function sets the value of the input clock prescaler.  The prescaler
//! is only operational when in 16-bit mode and is used to extend the range of
//! the 16-bit timer modes.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_prescaleset) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerPrescaleSet(unsigned long ulBase, unsigned long ulTimer,
                 unsigned long ulValue)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));
    ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) ||
           (ulTimer == TIMER_BOTH));
    ASSERT(ulValue < 256);

    //
    // Set the timer A prescaler if requested.
    //
    if(ulTimer & TIMER_A)
    {
        HWREG(ulBase + TIMER_O_TAPR) = ulValue;
    }

    //
    // Set the timer B prescaler if requested.
    //
    if(ulTimer & TIMER_B)
    {
        HWREG(ulBase + TIMER_O_TBPR) = ulValue;
    }
}
#endif

//*****************************************************************************
//
//! Get the timer prescale value.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer; must be one of \b TIMER_A or
//! \b TIMER_B.
//!
//! This function gets the value of the input clock prescaler.  The prescaler
//! is only operational when in 16-bit mode and is used to extend the range of
//! the 16-bit timer modes.
//!
//! \return The value of the timer prescaler.
//
//*****************************************************************************
#if defined(GROUP_prescaleget) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
TimerPrescaleGet(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));

    //
    // Return the appropriate prescale value.
    //
    return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAPR) :
           HWREG(ulBase + TIMER_O_TBPR));
}
#endif

//*****************************************************************************
//
//! Set the timer prescale match value.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A,
//! \b TIMER_B, or \b TIMER_BOTH.
//! \param ulValue is the timer prescale match value; must be between 0 and
//! 255, inclusive.
//!
//! This function sets the value of the input clock prescaler match value.
//! When in a 16-bit mode that uses the counter match (edge count or PWM), the
//! prescale match effectively extends the range of the counter to 24-bits.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_prescalematchset) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerPrescaleMatchSet(unsigned long ulBase, unsigned long ulTimer,
                      unsigned long ulValue)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));
    ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) ||
           (ulTimer == TIMER_BOTH));
    ASSERT(ulValue < 256);

    //
    // Set the timer A prescale match if requested.
    //
    if(ulTimer & TIMER_A)
    {
        HWREG(ulBase + TIMER_O_TAPMR) = ulValue;
    }

    //
    // Set the timer B prescale match if requested.
    //
    if(ulTimer & TIMER_B)
    {
        HWREG(ulBase + TIMER_O_TBPMR) = ulValue;
    }
}
#endif

//*****************************************************************************
//
//! Get the timer prescale match value.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer; must be one of \b TIMER_A or
//! \b TIMER_B.
//!
//! This function gets the value of the input clock prescaler match value.
//! When in a 16-bit mode that uses the counter match (edge count or PWM), the
//! prescale match effectively extends the range of the counter to 24-bits.
//!
//! \return The value of the timer prescale match.
//
//*****************************************************************************
#if defined(GROUP_prescalematchget) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
TimerPrescaleMatchGet(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));

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

//*****************************************************************************
//
//! Sets the timer load value.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A,
//! \b TIMER_B, or \b TIMER_BOTH.  Only \b TIMER_A should be used when the
//! timer is configured for 32-bit operation.
//! \param ulValue is the load value.
//!
//! This function sets the timer load value; if the timer is running then the
//! value will be immediately loaded into the timer.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_loadset) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerLoadSet(unsigned long ulBase, unsigned long ulTimer,
             unsigned long ulValue)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));
    ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) ||
           (ulTimer == TIMER_BOTH));

    //
    // Set the timer A load value if requested.
    //
    if(ulTimer & TIMER_A)
    {
        HWREG(ulBase + TIMER_O_TAILR) = ulValue;
    }

    //
    // Set the timer B load value if requested.
    //
    if(ulTimer & TIMER_B)
    {
        HWREG(ulBase + TIMER_O_TBILR) = ulValue;
    }
}
#endif

//*****************************************************************************
//
//! Gets the timer load value.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer; must be one of \b TIMER_A or
//! \b TIMER_B.  Only \b TIMER_A should be used when the timer is configured
//! for 32-bit operation.
//!
//! This function gets the currently programmed interval load value for the
//! specified timer.
//!
//! \return Returns the load value for the timer.
//
//*****************************************************************************
#if defined(GROUP_loadget) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
TimerLoadGet(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));

    //
    // Return the appropriate load value.
    //
    return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAILR) :
           HWREG(ulBase + TIMER_O_TBILR));
}
#endif

//*****************************************************************************
//
//! Gets the current timer value.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer; must be one of \b TIMER_A or
//! \b TIMER_B.  Only \b TIMER_A should be used when the timer is configured
//! for 32-bit operation.
//!
//! This function reads the current value of the specified timer.
//!
//! \return Returns the current value of the timer.
//
//*****************************************************************************
#if defined(GROUP_valueget) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
TimerValueGet(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));

    //
    // Return the appropriate timer value.
    //
    return((ulTimer == TIMER_A) ? HWREG(ulBase + TIMER_O_TAR) :
           HWREG(ulBase + TIMER_O_TBR));
}
#endif

//*****************************************************************************
//
//! Sets the timer match value.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer(s) to adjust; must be one of \b TIMER_A,
//! \b TIMER_B, or \b TIMER_BOTH.  Only \b TIMER_A should be used when the
//! timer is configured for 32-bit operation.
//! \param ulValue is the match value.
//!
//! This function sets the match value for a timer.  This is used in capture
//! count mode to determine when to interrupt the processor and in PWM mode to
//! determine the duty cycle of the output signal.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_matchset) || defined(BUILD_ALL) || defined(DOXYGEN)
void
TimerMatchSet(unsigned long ulBase, unsigned long ulTimer,
              unsigned long ulValue)
{
    //
    // Check the arguments.
    //
    ASSERT((ulBase == TIMER0_BASE) || (ulBase == TIMER1_BASE) ||
           (ulBase == TIMER2_BASE));
    ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) ||
           (ulTimer == TIMER_BOTH));

    //
    // Set the timer A match value if requested.
    //
    if(ulTimer & TIMER_A)
    {
        HWREG(ulBase + TIMER_O_TAMATCHR) = ulValue;
    }

    //
    // Set the timer B match value if requested.
    //
    if(ulTimer & TIMER_B)
    {
        HWREG(ulBase + TIMER_O_TBMATCHR) = ulValue;
    }
}
#endif

//*****************************************************************************
//
//! Gets the timer match value.
//!
//! \param ulBase is the base address of the timer module.
//! \param ulTimer specifies the timer; must be one of \b TIMER_A or
//! \b TIMER_B.  Only \b TIMER_A should be used when the timer is configured
//! for 32-bit operation.
//!
//! This function gets the match value for the specified timer.
//!
//! \return Returns the match value for the timer.
//
//*****************************************************************************
#if defined(GROUP_matchget) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
TimerMatchGet(unsigned long ulBase, unsigned long ulTimer)
{
    //
    // Check the arguments.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合久久鬼色中文字| 国产人成一区二区三区影院| 日韩欧美高清一区| |精品福利一区二区三区| 性感美女久久精品| 懂色av噜噜一区二区三区av| 欧美日韩一区二区电影| 国产日韩欧美不卡| 亚洲va韩国va欧美va| 成人久久18免费网站麻豆| 67194成人在线观看| 国产精品久久久久影院色老大 | 欧美午夜免费电影| 欧美国产精品中文字幕| 美女任你摸久久| 欧美亚洲禁片免费| 18欧美乱大交hd1984| 国产精品亚洲专一区二区三区| 欧美人牲a欧美精品| 亚洲日本丝袜连裤袜办公室| 国产99久久久精品| 精品国产乱码久久久久久久| 日韩在线a电影| 欧美性高清videossexo| 一区二区三区在线观看欧美 | 久久婷婷国产综合国色天香| 三级欧美在线一区| 51精品久久久久久久蜜臀| 伊人色综合久久天天人手人婷| 成人av在线资源网| 国产精品欧美综合在线| 成人精品免费视频| 国产精品久久久久久久久快鸭 | 欧美va日韩va| 蜜臀av性久久久久蜜臀aⅴ| 日韩亚洲欧美综合| 秋霞成人午夜伦在线观看| 欧美一区二区三级| 久久99久久99| 久久久久97国产精华液好用吗| 麻豆国产一区二区| 欧美zozozo| 国产老肥熟一区二区三区| 久久精品视频一区二区| 国产盗摄视频一区二区三区| 国产精品女人毛片| 91在线看国产| 亚洲国产日韩a在线播放| 在线播放日韩导航| 国产精品综合一区二区| 久久先锋影音av鲁色资源网| 成人国产精品视频| 亚洲三级电影网站| 欧美日韩精品一区二区| 极品销魂美女一区二区三区| 久久久精品国产99久久精品芒果| 国产 日韩 欧美大片| 亚洲另类春色校园小说| 91精品国产欧美日韩| 狠狠色丁香婷综合久久| 中文字幕电影一区| 欧洲人成人精品| 另类专区欧美蜜桃臀第一页| 国产欧美日韩在线| 欧美在线色视频| 日韩和的一区二区| 欧美国产综合一区二区| 日本电影亚洲天堂一区| 另类人妖一区二区av| 中文字幕一区二区三区在线不卡| 欧美日免费三级在线| 韩国女主播成人在线| 亚洲精品中文字幕在线观看| 欧美一区二区福利视频| 99热99精品| 久国产精品韩国三级视频| 国产精品成人网| 日韩欧美专区在线| 99久久精品国产网站| 麻豆国产一区二区| 亚洲自拍都市欧美小说| 久久久久久久久久美女| 8x8x8国产精品| 精品一区二区三区视频在线观看 | 午夜精品123| 中文字幕av一区二区三区高| 欧美一区二区在线免费播放 | 亚洲啪啪综合av一区二区三区| 欧美片在线播放| 99久久精品免费精品国产| 久久成人免费网站| 婷婷国产v国产偷v亚洲高清| 国产精品久久久久国产精品日日 | 国产日韩精品一区二区浪潮av| 欧美色图免费看| a美女胸又www黄视频久久| 国产综合色产在线精品| 日产精品久久久久久久性色| 亚洲人成7777| 亚洲欧美日韩电影| 国产精品无码永久免费888| 日韩精品一区在线| 欧美日韩亚洲国产综合| 欧美挠脚心视频网站| 欧美午夜寂寞影院| 在线观看不卡一区| 色综合天天综合色综合av| 国产激情视频一区二区在线观看| 蜜臀av一区二区| 无码av中文一区二区三区桃花岛| 亚洲男人的天堂av| 亚洲桃色在线一区| 亚洲欧洲日韩在线| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 精品国产免费人成电影在线观看四季| 欧美日韩一级黄| 欧美三级电影网站| 欧美猛男gaygay网站| 色欧美片视频在线观看| 色婷婷狠狠综合| 91久久精品网| 欧美体内she精高潮| 色综合欧美在线| 欧美在线一区二区| 欧美日韩一级二级| 欧美电影一区二区| 精品免费日韩av| 91精品国产品国语在线不卡| 欧美三级乱人伦电影| 日韩一区二区精品| 欧美一级二级三级蜜桃| 久久久久久久久久看片| 久久只精品国产| 久久精品网站免费观看| 国产精品毛片a∨一区二区三区| 国产精品久久毛片a| 玉足女爽爽91| 日韩精品国产精品| 极品美女销魂一区二区三区 | 中文字幕免费不卡在线| 国产精品久久久久久一区二区三区| 国产精品免费视频网站| 亚洲色图欧洲色图婷婷| 亚洲国产精品久久人人爱| 性感美女极品91精品| 蜜臀av性久久久久蜜臀av麻豆| 国产成人在线观看免费网站| av成人免费在线观看| 国产午夜精品一区二区| 欧美sm极限捆绑bd| 亚洲国产激情av| 亚洲一级二级三级在线免费观看| 激情综合色综合久久| 成人成人成人在线视频| 欧美精品成人一区二区三区四区| 久久久久久久综合日本| 亚洲综合成人在线视频| 国产麻豆精品一区二区| 在线免费一区三区| 久久亚洲精精品中文字幕早川悠里| 亚洲视频一区二区在线| 久久99精品久久只有精品| 一本到三区不卡视频| 欧美电影免费观看高清完整版在线观看| 国产精品午夜久久| 黄色小说综合网站| 欧美在线免费观看亚洲| 国产欧美精品一区| 免费成人在线观看视频| 在线欧美小视频| 国产精品情趣视频| 日本大胆欧美人术艺术动态| 日韩av一二三| 色婷婷国产精品综合在线观看| xnxx国产精品| 男男成人高潮片免费网站| 色av成人天堂桃色av| 中文字幕精品在线不卡| 另类小说一区二区三区| 欧美精品国产精品| 亚洲国产va精品久久久不卡综合| 成人av免费观看| 久久综合五月天婷婷伊人| 日韩av电影天堂| 欧美性猛交xxxxxx富婆| 亚洲精品国产第一综合99久久| 国产一区二区在线影院| 在线不卡中文字幕播放| 自拍偷在线精品自拍偷无码专区| 国产丶欧美丶日本不卡视频| 欧美日韩成人激情| 一区二区三区欧美日韩| 91一区一区三区| 中文字幕欧美日韩一区| 国产黄色精品视频| 国产调教视频一区| 国产久卡久卡久卡久卡视频精品| 精品国产人成亚洲区| 另类小说欧美激情| 久久综合一区二区|