亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
91在线看国产| 一区二区三区日韩精品视频| 日韩精品一区二| 中文字幕日本乱码精品影院| 精品日产卡一卡二卡麻豆| 91精品国产综合久久婷婷香蕉| 欧美伦理视频网站| 欧美日韩亚洲另类| 91精品久久久久久久99蜜桃| 555夜色666亚洲国产免| 制服丝袜日韩国产| 日韩精品一区二区三区四区视频| 日韩美一区二区三区| 亚洲精品一区二区精华| 国产欧美视频一区二区| 中文字幕一区二区三| 亚洲一区二区三区在线| 亚洲成人tv网| 激情综合网激情| 成人黄色综合网站| 色欧美日韩亚洲| 91精品国产免费久久综合| 欧美不卡视频一区| 中文一区二区完整视频在线观看| 亚洲视频网在线直播| 午夜精品爽啪视频| 韩国在线一区二区| 99国产精品国产精品久久| 欧美日韩激情在线| 久久人人97超碰com| 亚洲日本丝袜连裤袜办公室| 亚洲成人免费在线观看| 国产一区二区三区美女| 91在线观看视频| 欧美区视频在线观看| 久久一夜天堂av一区二区三区 | 一区二区三区电影在线播| 亚洲精品国产一区二区精华液 | 国产欧美精品一区二区色综合 | 国产精品一区二区不卡| 91亚洲国产成人精品一区二区三 | 成人欧美一区二区三区1314| 性久久久久久久久久久久| 国产精品一区二区久久精品爱涩 | 日韩一卡二卡三卡| 中文字幕欧美日韩一区| 亚洲国产精品欧美一二99| 国产一区二区在线观看视频| 91麻豆123| 日韩午夜激情视频| 亚洲天堂精品视频| 美女视频第一区二区三区免费观看网站| 国产精品影视网| 欧美色网一区二区| 精品国产乱码久久久久久免费| 蜜臀精品一区二区三区在线观看| 成人美女在线视频| 91精品一区二区三区久久久久久 | 欧美日韩国产美女| 国产精品久久免费看| 免费久久99精品国产| 91麻豆福利精品推荐| 精品1区2区在线观看| 亚洲一区二区三区在线| 成人一级黄色片| 日韩色视频在线观看| 亚洲精品美腿丝袜| 国产99久久久久久免费看农村| 欧美日韩亚洲综合| 亚洲免费电影在线| 国产91对白在线观看九色| 日韩一区二区三区精品视频| 一区二区三区高清在线| k8久久久一区二区三区| 欧美精品一区二区不卡| 日韩av电影天堂| 欧美日韩综合色| 亚洲免费观看在线视频| 成人福利视频在线看| 欧美精品一区二区三区在线| 午夜国产精品一区| 91精品办公室少妇高潮对白| 国产精品嫩草久久久久| 国产999精品久久久久久绿帽| 日韩三级伦理片妻子的秘密按摩| 亚洲va国产va欧美va观看| 91九色最新地址| 亚洲人精品午夜| 成人sese在线| 国产偷国产偷亚洲高清人白洁| 久久超碰97中文字幕| 在线播放/欧美激情| 婷婷丁香激情综合| 欧美色涩在线第一页| 亚洲一区二区在线免费看| 在线精品国精品国产尤物884a| 一区二区三区蜜桃网| 色综合天天视频在线观看| 中文字幕制服丝袜一区二区三区| 国产 欧美在线| 欧美激情一区二区三区蜜桃视频| 国产麻豆视频一区二区| 国产日韩欧美不卡在线| 成人午夜免费视频| 国产精品成人免费在线| 99久久国产免费看| 亚洲免费在线视频| 色综合天天综合色综合av| 亚洲欧洲综合另类在线| 色综合天天在线| 国产成人午夜视频| 国产欧美一区二区在线观看| 国产91对白在线观看九色| 国产精品乱码妇女bbbb| 成人黄色a**站在线观看| 成人免费在线播放视频| 91久久精品日日躁夜夜躁欧美| 亚洲国产成人91porn| 欧美一个色资源| 国产黄色精品网站| 亚洲丝袜自拍清纯另类| 欧美网站大全在线观看| 日韩经典中文字幕一区| 精品国产自在久精品国产| 国产精品夜夜嗨| 亚洲精品欧美在线| 欧美一区二区视频在线观看| 久久精品国产亚洲a| 久久久国产一区二区三区四区小说| 福利电影一区二区三区| 亚洲女同ⅹxx女同tv| 欧美一区在线视频| 国产一区二区剧情av在线| 国产精品系列在线| 欧美日韩精品是欧美日韩精品| 麻豆国产一区二区| 国产精品入口麻豆九色| 欧美午夜影院一区| 六月婷婷色综合| 日韩美女视频一区| 91精品综合久久久久久| 成人免费视频视频| 视频一区视频二区中文| 国产视频视频一区| 欧美日韩在线一区二区| 精品一区二区三区视频在线观看| 国产精品对白交换视频| 7777精品伊人久久久大香线蕉超级流畅| 久久精品国产秦先生| 亚洲人成影院在线观看| 日韩三级免费观看| 91免费观看国产| 蜜桃久久久久久| 亚洲激情欧美激情| 久久久国产综合精品女国产盗摄| 欧美手机在线视频| 国产99久久久国产精品| 日韩高清欧美激情| 亚洲视频在线一区二区| 精品欧美一区二区在线观看| 91蝌蚪porny成人天涯| 精品一区二区三区在线观看| 亚洲综合区在线| 国产精品日韩成人| 欧美一区二区三区爱爱| 91美女在线观看| 国产精品综合一区二区| 日本午夜精品一区二区三区电影| 1024成人网| 欧美韩日一区二区三区| 免费高清成人在线| 日韩中文字幕av电影| 91视频精品在这里| 狠狠色丁香婷婷综合| 亚洲成人av电影在线| 国产精品久久一级| 久久久噜噜噜久噜久久综合| 欧美三级资源在线| 91在线无精精品入口| 高清在线观看日韩| 激情丁香综合五月| 手机精品视频在线观看| 亚洲美女淫视频| 亚洲欧洲日产国产综合网| 精品久久久网站| 国产精品福利电影一区二区三区四区| 日韩三级在线免费观看| 欧美精品久久天天躁| 欧美日韩综合在线| 在线亚洲一区观看| 99精品视频一区| 成人美女在线观看| 成人午夜电影久久影院| 国产一区二区在线看| 精品一二三四在线| 精品一区二区国语对白| 九色综合狠狠综合久久| 免费看欧美女人艹b| 午夜国产精品影院在线观看| 亚洲高清视频中文字幕|