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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? qei.c

?? freertosV4.40 是一種small的嵌入式系統(tǒng)。利于嵌入式開(kāi)好者入門(mén)學(xué)習(xí)嵌入式操作系統(tǒng)。通過(guò)對(duì)于源碼的學(xué)習(xí)可以很好的掌握f(shuō)reertos的運(yùn)行機(jī)制。
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
//*****************************************************************************
//
// qei.c - Driver for the Quadrature Encoder with Index.
//
// Copyright (c) 2005,2006 Luminary Micro, Inc.  All rights reserved.
//
// Software License Agreement
//
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's Stellaris Family of microcontroller products.
//
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws.  All rights are reserved.  Any use in violation
// of the foregoing restrictions may subject the user to criminal sanctions
// under applicable laws, as well as to civil liability for the breach of the
// terms and conditions of this license.
//
// THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 991 of the Stellaris Driver Library.
//
//*****************************************************************************

//*****************************************************************************
//
//! \addtogroup qei_api
//! @{
//
//*****************************************************************************

#include "../hw_ints.h"
#include "../hw_memmap.h"
#include "../hw_qei.h"
#include "../hw_types.h"
#include "debug.h"
#include "interrupt.h"
#include "qei.h"

//*****************************************************************************
//
//! Enables the quadrature encoder.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//!
//! This will enable operation of the quadrature encoder module.  It must be
//! configured before it is enabled.
//!
//! \sa QEIConfigure()
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_enable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIEnable(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Enable the QEI module.
    //
    HWREG(ulBase + QEI_O_CTL) |= QEI_CTL_ENABLE;
}
#endif

//*****************************************************************************
//
//! Disables the quadrature encoder.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//!
//! This will disable operation of the quadrature encoder module.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_disable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIDisable(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Disable the QEI module.
    //
    HWREG(ulBase + QEI_O_CTL) &= ~(QEI_CTL_ENABLE);
}
#endif

//*****************************************************************************
//
//! Configures the quadrature encoder.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//! \param ulConfig is the configuration for the quadrature encoder.  See below
//! for a description of this parameter.
//! \param ulMaxPosition specifies the maximum position value.
//!
//! This will configure the operation of the quadrature encoder.  The
//! \e ulConfig parameter provides the configuration of the encoder and is the
//! logical OR of several values:
//!
//! - \b QEI_CONFIG_CAPTURE_A or \b QEI_CONFIG_CAPTURE_A_B to specify if edges
//!   on channel A or on both channels A and B should be counted by the
//!   position integrator and velocity accumulator.
//! - \b QEI_CONFIG_NO_RESET or \b QEI_CONFIG_RESET_IDX to specify if the
//!   position integrator should be reset when the index pulse is detected.
//! - \b QEI_CONFIG_QUADRATURE or \b QEI_CONFIG_CLOCK_DIR to specify if
//!   quadrature signals are being provided on ChA and ChB, or if a direction
//!   signal and a clock are being provided instead.
//! - \b QEI_CONFIG_NO_SWAP or \b QEI_CONFIG_SWAP to specify if the signals
//!   provided on ChA and ChB should be swapped before being processed.
//!
//! \e ulMaxPosition is the maximum value of the position integrator, and is
//! the value used to reset the position capture when in index reset mode and
//! moving in the reverse (negative) direction.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_configure) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIConfigure(unsigned long ulBase, unsigned long ulConfig,
             unsigned long ulMaxPosition)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Write the new configuration to the hardware.
    //
    HWREG(ulBase + QEI_O_CTL) = ((HWREG(ulBase + QEI_O_CTL) &
                                  ~(QEI_CTL_CAPMODE | QEI_CTL_RESMODE |
                                    QEI_CTL_SIGMODE | QEI_CTL_SWAP)) |
                                 ulConfig);

    //
    // Set the maximum position.
    //
    HWREG(ulBase + QEI_O_MAXPOS) = ulMaxPosition;
}
#endif

//*****************************************************************************
//
//! Gets the current encoder position.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//!
//! This returns the current position of the encoder.  Depending upon the
//! configuration of the encoder, and the incident of an index pulse, this
//! value may or may not contain the expected data (i.e. if in reset on index
//! mode, if an index pulse has not been encountered, the position counter will
//! not be aligned with the index pulse yet).
//!
//! \return The current position of the encoder.
//
//*****************************************************************************
#if defined(GROUP_positionget) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
QEIPositionGet(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Return the current position counter.
    //
    return(HWREG(ulBase + QEI_O_POS));
}
#endif

//*****************************************************************************
//
//! Sets the current encoder position.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//! \param ulPosition is the new position for the encoder.
//!
//! This sets the current position of the encoder; the encoder position will
//! then be measured relative to this value.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_positionset) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIPositionSet(unsigned long ulBase, unsigned long ulPosition)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Set the position counter.
    //
    HWREG(ulBase + QEI_O_POS) = ulPosition;
}
#endif

//*****************************************************************************
//
//! Gets the current direction of rotation.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//!
//! This returns the current direction of rotation.  In this case, current
//! means the most recently detected direction of the encoder; it may not be
//! presently moving but this is the direction it last moved before it stopped.
//!
//! \return 1 if moving in the forward direction or -1 if moving in the reverse
//! direction.
//
//*****************************************************************************
#if defined(GROUP_directionget) || defined(BUILD_ALL) || defined(DOXYGEN)
long
QEIDirectionGet(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Return the direction of rotation.
    //
    return((HWREG(ulBase + QEI_O_STAT) & QEI_STAT_DIRECTION) ? -1 : 1);
}
#endif

//*****************************************************************************
//
//! Gets the encoder error indicator.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//!
//! This returns the error indicator for the quadrature encoder.  It is an
//! error for both of the signals of the quadrature input to change at the same
//! time.
//!
//! \return true if an error has occurred and false otherwise.
//
//*****************************************************************************
#if defined(GROUP_errorget) || defined(BUILD_ALL) || defined(DOXYGEN)
tBoolean
QEIErrorGet(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Return the error indicator.
    //
    return((HWREG(ulBase + QEI_O_STAT) & QEI_STAT_ERROR) ? true : false);
}
#endif

//*****************************************************************************
//
//! Enables the velocity capture.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//!
//! This will enable operation of the velocity capture in the quadrature
//! encoder module.  It must be configured before it is enabled.  Velocity
//! capture will not occur if the quadrature encoder is not enabled.
//!
//! \sa QEIVelocityConfigure() and QEIEnable()
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_velocityenable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
QEIVelocityEnable(unsigned long ulBase)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == QEI_BASE);

    //
    // Enable the velocity capture.
    //
    HWREG(ulBase + QEI_O_CTL) |= QEI_CTL_VELEN;
}
#endif

//*****************************************************************************
//
//! Disables the velocity capture.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//!
//! This will disable operation of the velocity capture in the quadrature
//! encoder module.
//!
//! \return None.
//

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷综合久久久久中文 | 日本午夜一区二区| 午夜欧美视频在线观看| 日韩精品欧美成人高清一区二区| 全国精品久久少妇| 国产精品69毛片高清亚洲| 91亚洲精华国产精华精华液| 国产精品天天看| 91精彩视频在线观看| 制服丝袜在线91| 国产欧美精品在线观看| 久久久久久久综合| 亚洲视频每日更新| 色综合久久精品| 欧美午夜理伦三级在线观看| 日韩欧美国产高清| 亚洲色图欧洲色图婷婷| 免费成人性网站| 国产一区二区看久久| 色美美综合视频| 久久蜜桃av一区二区天堂| 日韩黄色免费网站| av日韩在线网站| 日韩欧美电影在线| 亚洲天堂福利av| 久久精品国产一区二区三 | 在线区一区二视频| 精品国产精品一区二区夜夜嗨| 136国产福利精品导航| 欧美aⅴ一区二区三区视频| 99综合影院在线| 日韩亚洲欧美成人一区| 亚洲人被黑人高潮完整版| 精品无人区卡一卡二卡三乱码免费卡| 色香蕉久久蜜桃| 91精品国产高清一区二区三区| 亚洲电影第三页| 成人手机电影网| 日韩亚洲欧美成人一区| 亚洲主播在线观看| 国产激情精品久久久第一区二区 | 欧美一区二区精美| 亚洲免费观看高清完整版在线观看熊| 精品一区二区三区在线观看| 欧美绝品在线观看成人午夜影视| 亚洲特黄一级片| 国产99精品国产| 日韩欧美国产午夜精品| 亚洲国产精品嫩草影院| 欧美日韩色综合| 欧美一级免费观看| 亚洲国产精品人人做人人爽| 99视频精品全部免费在线| 久久久av毛片精品| 麻豆高清免费国产一区| 欧美性视频一区二区三区| 亚洲欧洲一区二区在线播放| 国产麻豆精品95视频| 欧美一级一级性生活免费录像| 亚洲一区二区中文在线| 91日韩精品一区| 国产精品久久久久久久久久免费看| 亚洲va在线va天堂| 91色乱码一区二区三区| 国产精品国产三级国产aⅴ入口| 国产麻豆视频一区| 精品国产乱码久久| 韩国成人福利片在线播放| 精品国产第一区二区三区观看体验| 视频一区二区三区中文字幕| 欧美日韩精品一区二区| 亚洲小说欧美激情另类| 色婷婷激情久久| 亚洲精品免费在线观看| 一本到不卡免费一区二区| ...av二区三区久久精品| 99久久伊人久久99| 亚洲色大成网站www久久九九| av在线不卡观看免费观看| 17c精品麻豆一区二区免费| 91麻豆自制传媒国产之光| 亚洲男人的天堂在线aⅴ视频| 91麻豆免费看| 亚洲图片欧美一区| 555夜色666亚洲国产免| 麻豆精品国产传媒mv男同| 精品乱码亚洲一区二区不卡| 国产在线精品免费av| 国产精品素人一区二区| 99国产精品一区| 亚洲一区在线观看网站| 欧美乱熟臀69xxxxxx| 九九九久久久精品| 国产午夜亚洲精品午夜鲁丝片| 成人福利视频网站| 亚洲欧美乱综合| 8x8x8国产精品| 国产一区二区三区在线观看精品| 国产精品欧美精品| 在线日韩av片| 精品一区二区三区香蕉蜜桃| 国产精品视频一二三区| 在线精品视频一区二区三四| 日本伊人色综合网| 国产欧美综合在线观看第十页| 91视视频在线直接观看在线看网页在线看| 亚洲日本青草视频在线怡红院| 欧美日韩国产免费| 国产一区不卡视频| 亚洲精品视频在线看| 91精品黄色片免费大全| 国产一区视频导航| 亚洲欧美激情一区二区| 日韩欧美一卡二卡| av不卡在线播放| 日产国产欧美视频一区精品 | av电影天堂一区二区在线| 亚洲国产一区二区在线播放| www久久久久| 一本一本大道香蕉久在线精品 | 欧美人xxxx| 国产福利一区二区三区在线视频| 一区二区三区91| 久久伊人中文字幕| 在线看国产一区| 国产成人一级电影| 午夜欧美2019年伦理| 久久精品免视看| 欧美日韩久久久久久| 粉嫩嫩av羞羞动漫久久久| 日韩va亚洲va欧美va久久| 国产精品欧美精品| 欧美成人aa大片| 国产欧美日韩精品在线| 韩日精品视频一区| 亚洲国产中文字幕| 中文在线一区二区| 欧美一区二区在线视频| gogo大胆日本视频一区| 蜜臀91精品一区二区三区| 18涩涩午夜精品.www| 久久av中文字幕片| 成人高清av在线| 老司机午夜精品99久久| 亚洲欧美色图小说| 久久久久久日产精品| 69av一区二区三区| 色婷婷狠狠综合| 国产成人精品亚洲777人妖| 五月天丁香久久| 亚洲蜜臀av乱码久久精品| 国产午夜精品一区二区| 5月丁香婷婷综合| 在线观看91视频| 99精品视频在线播放观看| 激情深爱一区二区| 免费观看91视频大全| 亚洲国产美国国产综合一区二区| 亚洲欧美在线视频观看| 久久久亚洲高清| 精品国产1区二区| 欧美一二三区精品| 欧美伦理影视网| 欧美午夜精品一区二区三区| 91蝌蚪国产九色| 成人综合婷婷国产精品久久蜜臀 | 不卡的av在线播放| 国产suv精品一区二区6| 久久99久久精品| 喷白浆一区二区| 日本视频在线一区| 舔着乳尖日韩一区| 婷婷久久综合九色综合绿巨人| 亚洲国产一区二区视频| 一区二区三区波多野结衣在线观看 | 国产精品每日更新| 国产视频911| 国产欧美综合色| 欧美国产日韩a欧美在线观看| 久久网这里都是精品| 久久久精品免费观看| 精品99999| 久久亚洲精品国产精品紫薇| 精品国产成人系列| 精品久久久久久亚洲综合网| 久久综合一区二区| 久久日一线二线三线suv| 欧美v国产在线一区二区三区| 欧美成人国产一区二区| 欧美哺乳videos| 久久蜜桃av一区精品变态类天堂 | 日韩精品每日更新| 蜜臀精品久久久久久蜜臀| 奇米精品一区二区三区在线观看一| 免费欧美高清视频| 国产中文字幕精品| 成熟亚洲日本毛茸茸凸凹| bt7086福利一区国产| 色综合久久88色综合天天| 在线观看日韩高清av|