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

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

?? qei.c

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? C
?? 第 1 頁 / 共 2 頁
字號:
//*****************************************************************************
#if defined(GROUP_velocitydisable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIVelocityDisable(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Disable the velocity capture.
    //
    HWREG(ulBase + QEI_O_CTL) &= ~(QEI_CTL_VELEN);
}
#endif

//*****************************************************************************
//
//! Configures the velocity capture.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//! \param ulPreDiv specifies the predivider applied to the input quadrature
//! signal before it is counted; can be one of QEI_VELDIV_1, QEI_VELDIV_2,
//! QEI_VELDIV_4, QEI_VELDIV_8, QEI_VELDIV_16, QEI_VELDIV_32, QEI_VELDIV_64, or
//! QEI_VELDIV_128.
//! \param ulPeriod specifies the number of clock ticks over which to measure
//! the velocity; must be non-zero.
//!
//! This will configure the operation of the velocity capture portion of the
//! quadrature encoder.  The position increment signal is predivided as
//! specified by \e ulPreDiv before being accumulated by the velocity capture.
//! The divided signal is accumulated over \e ulPeriod system clock before
//! being saved and resetting the accumulator.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_velocityconfigure) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIVelocityConfigure(unsigned long ulBase, unsigned long ulPreDiv,
                     unsigned long ulPeriod)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);
    ASSERT(!(ulPreDiv & ~(QEI_CTL_VELDIV_M)));
    ASSERT(ulPeriod != 0);

    //
    // Set the velocity predivider.
    //
    HWREG(ulBase + QEI_O_CTL) = ((HWREG(ulBase + QEI_O_CTL) &
                                  ~(QEI_CTL_VELDIV_M)) | ulPreDiv);

    //
    // Set the timer period.
    //
    HWREG(ulBase + QEI_O_LOAD) = ulPeriod - 1;
}
#endif

//*****************************************************************************
//
//! Gets the current encoder speed.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//!
//! This returns the current speed of the encoder.  The value returned is the
//! number of pulses detected in the specified time period; this number can be
//! multiplied by the number of time periods per second and divided by the
//! number of pulses per revolution to obtain the number of revolutions per
//! second.
//!
//! \return The number of pulses captured in the given time period.
//
//*****************************************************************************
#if defined(GROUP_velocityget) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
QEIVelocityGet(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Return the speed capture value.
    //
    return(HWREG(ulBase + QEI_O_SPEED));
}
#endif

//*****************************************************************************
//
//! Registers an interrupt handler for the quadrature encoder interrupt.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//! \param pfnHandler is a pointer to the function to be called when the
//! quadrature encoder interrupt occurs.
//!
//! This sets the handler to be called when a quadrature encoder interrupt
//! occurs.  This will enable the global interrupt in the interrupt controller;
//! specific quadrature encoder interrupts must be enabled via QEIIntEnable().
//! It is the interrupt handler's responsibility to clear the interrupt source
//! via QEIIntClear().
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intregister) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIIntRegister(unsigned long ulBase, void (*pfnHandler)(void))
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Register the interrupt handler, returning an error if an error occurs.
    //
    IntRegister(INT_QEI, pfnHandler);

    //
    // Enable the quadrature encoder interrupt.
    //
    IntEnable(INT_QEI);
}
#endif

//*****************************************************************************
//
//! Unregisters an interrupt handler for the quadrature encoder interrupt.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//!
//! This function will clear the handler to be called when a quadrature encoder
//! 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
QEIIntUnregister(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Disable the interrupt.
    //
    IntDisable(INT_QEI);

    //
    // Unregister the interrupt handler.
    //
    IntUnregister(INT_QEI);
}
#endif

//*****************************************************************************
//
//! Enables individual quadrature encoder interrupt sources.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//! \param ulIntFlags is a bit mask of the interrupt sources to be enabled.
//! Can be any of the QEI_INTERROR, QEI_INTDIR, QEI_INTTIMER, or QEI_INTINDEX
//! values.
//!
//! Enables the indicated quadrature encoder interrupt sources.  Only the
//! sources that are enabled can be reflected to the processor interrupt;
//! disabled sources have no effect on the processor.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intenable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIIntEnable(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

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

//*****************************************************************************
//
//! Disables individual quadrature encoder interrupt sources.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//! \param ulIntFlags is a bit mask of the interrupt sources to be disabled.
//! Can be any of the QEI_INTERROR, QEI_INTDIR, QEI_INTTIMER, or QEI_INTINDEX
//! values.
//!
//! Disables the indicated quadrature encoder interrupt sources.  Only the
//! sources that are enabled can be reflected to the processor interrupt;
//! disabled sources have no effect on the processor.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intdisable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIIntDisable(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

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

//*****************************************************************************
//
//! Gets the current interrupt status.
//!
//! \param ulBase is the base address of the quadrature encoder 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 quadrature encoder 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
//! QEI_INTERROR, QEI_INTDIR, QEI_INTTIMER, and QEI_INTINDEX.
//
//*****************************************************************************
#if defined(GROUP_intstatus) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
QEIIntStatus(unsigned long ulBase, tBoolean bMasked)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Return either the interrupt status or the raw interrupt status as
    // requested.
    //
    if(bMasked)
    {
        return(HWREG(ulBase + QEI_O_ISC));
    }
    else
    {
        return(HWREG(ulBase + QEI_O_RIS));
    }
}
#endif

//*****************************************************************************
//
//! Clears quadrature encoder interrupt sources.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//! \param ulIntFlags is a bit mask of the interrupt sources to be cleared.
//! Can be any of the QEI_INTERROR, QEI_INTDIR, QEI_INTTIMER, or QEI_INTINDEX
//! values.
//!
//! The specified quadrature encoder 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.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intclear) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIIntClear(unsigned long ulBase, unsigned long ulIntFlags)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

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

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久四虎| 欧美丝袜丝nylons| 日韩成人一区二区三区在线观看| 亚洲视频在线一区二区| 中文字幕在线不卡国产视频| 久久久久久久电影| 久久午夜电影网| 中文字幕精品在线不卡| 国产精品人妖ts系列视频| 国产欧美日韩不卡| 国产精品久久久一本精品| 中文字幕亚洲成人| 一区二区三区资源| 日韩精品色哟哟| 美脚の诱脚舐め脚责91| 麻豆免费精品视频| 国产成人亚洲精品青草天美| www.色综合.com| 欧美四级电影网| 精品国产一区久久| 国产欧美日韩三级| 一区二区三区精品视频| 丝袜亚洲另类欧美| 狠狠色狠狠色综合| 色综合天天综合色综合av| 欧美日韩二区三区| 久久久综合激的五月天| 久久久久久久综合日本| 国产人成亚洲第一网站在线播放| 一区二区视频在线| 亚洲444eee在线观看| 国产盗摄女厕一区二区三区| 在线观看免费成人| 欧美mv日韩mv国产网站| 亚洲免费av在线| 麻豆视频观看网址久久| 91啦中文在线观看| 久久日韩精品一区二区五区| 最好看的中文字幕久久| 亚洲地区一二三色| 国产一区二区精品久久99| 色综合久久88色综合天天6| 欧美人牲a欧美精品| 欧美挠脚心视频网站| 久久亚洲影视婷婷| 性久久久久久久久| 粉嫩aⅴ一区二区三区四区五区| 欧美综合在线视频| 日韩欧美一区二区三区在线| 中文字幕av资源一区| 久久精品国产亚洲5555| 99视频精品全部免费在线| 日韩一区二区三区在线观看 | 精品一区二区免费视频| 色悠久久久久综合欧美99| 制服.丝袜.亚洲.另类.中文| 久久久久久久久久电影| 男人操女人的视频在线观看欧美| 99久久99久久精品免费看蜜桃| 久久久久国产精品厨房| 麻豆成人免费电影| 欧美久久一区二区| 亚洲久本草在线中文字幕| 高清不卡一二三区| 日韩免费电影网站| 日韩国产欧美在线视频| 欧美日韩小视频| 午夜久久福利影院| 在线观看一区日韩| 亚洲视频图片小说| 99精品欧美一区二区蜜桃免费| 国产精品―色哟哟| 国产99精品在线观看| 中文字幕精品一区二区三区精品 | 精品国产免费人成电影在线观看四季| 亚洲一区视频在线| 欧美日韩一级黄| 夜夜夜精品看看| 欧美亚洲综合另类| 亚洲成人av电影| 欧美日韩国产123区| 日本在线不卡视频| 精品国产一区二区精华| 国产精品一区二区在线观看不卡| 久久久久久夜精品精品免费| 国产成人欧美日韩在线电影| 国产人成亚洲第一网站在线播放| 国产91精品一区二区麻豆网站 | 久久综合色8888| 久久精品国产99国产| 久久亚洲精品小早川怜子| 国产伦精品一区二区三区视频青涩 | 久久精品欧美一区二区三区不卡| 国内欧美视频一区二区| 国产丝袜在线精品| 不卡在线视频中文字幕| 亚洲综合色噜噜狠狠| 91精品在线麻豆| 极品尤物av久久免费看| 一区在线观看视频| 欧美疯狂做受xxxx富婆| 国产一区二区中文字幕| 亚洲色图一区二区| 91精品国产乱码久久蜜臀| 激情成人综合网| 亚洲视频一二三| 欧美一区二区网站| 成人免费毛片嘿嘿连载视频| 亚洲一区影音先锋| 欧美经典三级视频一区二区三区| 国产成人精品www牛牛影视| 亚洲精品自拍动漫在线| 日韩欧美在线综合网| 波多野结衣欧美| 蜜桃传媒麻豆第一区在线观看| 久久久综合网站| 欧美久久久久中文字幕| 成人h动漫精品| 秋霞午夜鲁丝一区二区老狼| 亚洲日本韩国一区| 26uuu久久综合| 欧美精品一二三| 99久久国产综合精品色伊| 激情五月婷婷综合| 亚洲午夜影视影院在线观看| 欧美激情中文字幕一区二区| 日韩一区二区中文字幕| 色婷婷久久综合| 成人av免费在线| 国产一区二区美女| 日韩av一二三| 亚洲三级免费电影| 久久久久免费观看| 精品少妇一区二区三区免费观看 | 欧美精品一区二区三区在线 | 国产成人在线电影| 麻豆精品久久精品色综合| 一区二区三区91| 国产精品久久久久久久久久久免费看 | 国产精品乱子久久久久| 精品国产免费人成在线观看| 91精品国产丝袜白色高跟鞋| 91国产成人在线| 色偷偷成人一区二区三区91| 99久久国产综合精品色伊| 成人18精品视频| jlzzjlzz欧美大全| 99久久免费精品| 99国产精品视频免费观看| 成人app在线观看| 成人免费黄色在线| 岛国一区二区在线观看| 国产激情视频一区二区三区欧美| 国产麻豆精品在线| 九九国产精品视频| 精品亚洲欧美一区| 精品亚洲porn| 国产精品91一区二区| 国产福利91精品一区二区三区| 国产精品亚洲综合一区在线观看| 国产成人在线免费| 福利一区福利二区| 成人小视频免费在线观看| 成人免费视频网站在线观看| 国产一区不卡视频| 成人免费观看av| 日本伦理一区二区| 欧美午夜一区二区三区免费大片| 欧美日韩在线精品一区二区三区激情| 欧美日韩在线播放| 7777精品伊人久久久大香线蕉 | 精品1区2区3区| 欧美日韩夫妻久久| 精品国产制服丝袜高跟| 国产精品丝袜黑色高跟| 亚洲欧美日韩国产一区二区三区 | 国产日韩欧美一区二区三区乱码 | 精品午夜久久福利影院| 国产综合色在线视频区| 豆国产96在线|亚洲| 欧美专区在线观看一区| 日韩欧美国产成人一区二区| 久久人人爽爽爽人久久久| 中文字幕一区二区三| 午夜精品久久久久久久99水蜜桃| 毛片av中文字幕一区二区| 高清在线观看日韩| 欧美日韩在线一区二区| 国产三级一区二区| 亚洲不卡av一区二区三区| 国产一区二区福利| 欧美日韩视频在线一区二区| 国产三级三级三级精品8ⅰ区| 亚洲国产精品久久久久秋霞影院| 国产一区二区三区黄视频| 欧美吞精做爰啪啪高潮| 日本一区二区三区在线不卡| 日本最新不卡在线| 91香蕉视频在线| 欧美电视剧在线观看完整版|