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

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

?? comp.c

?? STM32+Grlib
?? C
?? 第 1 頁 / 共 2 頁
字號:
//*****************************************************************************
//
// comp.c - Driver for the analog comparator.
//
// Copyright (c) 2005-2010 Texas Instruments Incorporated.  All rights reserved.
// Software License Agreement
// 
// Texas Instruments (TI) is supplying this software for use solely and
// exclusively on TI's microcontroller products. The software is owned by
// TI and/or its suppliers, and is protected under applicable copyright
// laws. You may not combine this software with "viral" open-source
// software in order to form a larger program.
// 
// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
// 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. TI SHALL NOT, UNDER ANY
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES, FOR ANY REASON WHATSOEVER.
// 
// This is part of revision 5821 of the Stellaris Peripheral Driver Library.
//
//*****************************************************************************

//*****************************************************************************
//
//! \addtogroup comp_api
//! @{
//
//*****************************************************************************

#include "inc/hw_comp.h"
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/comp.h"
#include "driverlib/debug.h"
#include "driverlib/interrupt.h"

//*****************************************************************************
//
//! Configures a comparator.
//!
//! \param ulBase is the base address of the comparator module.
//! \param ulComp is the index of the comparator to configure.
//! \param ulConfig is the configuration of the comparator.
//!
//! This function will configure a comparator.  The \e ulConfig parameter is
//! the result of a logical OR operation between the \b COMP_TRIG_xxx,
//! \b COMP_INT_xxx, \b COMP_ASRCP_xxx, and \b COMP_OUTPUT_xxx values.
//!
//! The \b COMP_TRIG_xxx term can take on the following values:
//!
//! - \b COMP_TRIG_NONE to have no trigger to the ADC.
//! - \b COMP_TRIG_HIGH to trigger the ADC when the comparator output is high.
//! - \b COMP_TRIG_LOW to trigger the ADC when the comparator output is low.
//! - \b COMP_TRIG_FALL to trigger the ADC when the comparator output goes low.
//! - \b COMP_TRIG_RISE to trigger the ADC when the comparator output goes
//! high.
//! - \b COMP_TRIG_BOTH to trigger the ADC when the comparator output goes low
//! or high.
//!
//! The \b COMP_INT_xxx term can take on the following values:
//!
//! - \b COMP_INT_HIGH to generate an interrupt when the comparator output is
//! high.
//! - \b COMP_INT_LOW to generate an interrupt when the comparator output is
//! low.
//! - \b COMP_INT_FALL to generate an interrupt when the comparator output goes
//! low.
//! - \b COMP_INT_RISE to generate an interrupt when the comparator output goes
//! high.
//! - \b COMP_INT_BOTH to generate an interrupt when the comparator output goes
//! low or high.
//!
//! The \b COMP_ASRCP_xxx term can take on the following values:
//!
//! - \b COMP_ASRCP_PIN to use the dedicated Comp+ pin as the reference
//! voltage.
//! - \b COMP_ASRCP_PIN0 to use the Comp0+ pin as the reference voltage (this
//! the same as \b COMP_ASRCP_PIN for the comparator 0).
//! - \b COMP_ASRCP_REF to use the internally generated voltage as the
//! reference voltage.
//!
//! The \b COMP_OUTPUT_xxx term can take on the following values:
//!
//! - \b COMP_OUTPUT_NORMAL to enable a non-inverted output from the comparator
//! to a device pin.
//! - \b COMP_OUTPUT_INVERT to enable an inverted output from the comparator to
//! a device pin.
//! - \b COMP_OUTPUT_NONE is deprecated and behaves the same as
//! \b COMP_OUTPUT_NORMAL.
//!
//! \return None.
//
//*****************************************************************************
void
ComparatorConfigure(unsigned long ulBase, unsigned long ulComp,
                    unsigned long ulConfig)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == COMP_BASE);
    ASSERT(ulComp < 3);

    //
    // Configure this comparator.
    //
    HWREG(ulBase + (ulComp * 0x20) + COMP_O_ACCTL0) = ulConfig;
}

//*****************************************************************************
//
//! Sets the internal reference voltage.
//!
//! \param ulBase is the base address of the comparator module.
//! \param ulRef is the desired reference voltage.
//!
//! This function will set the internal reference voltage value.  The voltage
//! is specified as one of the following values:
//!
//! - \b COMP_REF_OFF to turn off the reference voltage
//! - \b COMP_REF_0V to set the reference voltage to 0 V
//! - \b COMP_REF_0_1375V to set the reference voltage to 0.1375 V
//! - \b COMP_REF_0_275V to set the reference voltage to 0.275 V
//! - \b COMP_REF_0_4125V to set the reference voltage to 0.4125 V
//! - \b COMP_REF_0_55V to set the reference voltage to 0.55 V
//! - \b COMP_REF_0_6875V to set the reference voltage to 0.6875 V
//! - \b COMP_REF_0_825V to set the reference voltage to 0.825 V
//! - \b COMP_REF_0_928125V to set the reference voltage to 0.928125 V
//! - \b COMP_REF_0_9625V to set the reference voltage to 0.9625 V
//! - \b COMP_REF_1_03125V to set the reference voltage to 1.03125 V
//! - \b COMP_REF_1_134375V to set the reference voltage to 1.134375 V
//! - \b COMP_REF_1_1V to set the reference voltage to 1.1 V
//! - \b COMP_REF_1_2375V to set the reference voltage to 1.2375 V
//! - \b COMP_REF_1_340625V to set the reference voltage to 1.340625 V
//! - \b COMP_REF_1_375V to set the reference voltage to 1.375 V
//! - \b COMP_REF_1_44375V to set the reference voltage to 1.44375 V
//! - \b COMP_REF_1_5125V to set the reference voltage to 1.5125 V
//! - \b COMP_REF_1_546875V to set the reference voltage to 1.546875 V
//! - \b COMP_REF_1_65V to set the reference voltage to 1.65 V
//! - \b COMP_REF_1_753125V to set the reference voltage to 1.753125 V
//! - \b COMP_REF_1_7875V to set the reference voltage to 1.7875 V
//! - \b COMP_REF_1_85625V to set the reference voltage to 1.85625 V
//! - \b COMP_REF_1_925V to set the reference voltage to 1.925 V
//! - \b COMP_REF_1_959375V to set the reference voltage to 1.959375 V
//! - \b COMP_REF_2_0625V to set the reference voltage to 2.0625 V
//! - \b COMP_REF_2_165625V to set the reference voltage to 2.165625 V
//! - \b COMP_REF_2_26875V to set the reference voltage to 2.26875 V
//! - \b COMP_REF_2_371875V to set the reference voltage to 2.371875 V
//!
//! \return None.
//
//*****************************************************************************
void
ComparatorRefSet(unsigned long ulBase, unsigned long ulRef)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == COMP_BASE);

    //
    // Set the voltage reference voltage as requested.
    //
    HWREG(ulBase + COMP_O_ACREFCTL) = ulRef;
}

//*****************************************************************************
//
//! Gets the current comparator output value.
//!
//! \param ulBase is the base address of the comparator module.
//! \param ulComp is the index of the comparator.
//!
//! This function retrieves the current value of the comparator output.
//!
//! \return Returns \b true if the comparator output is high and \b false if
//! the comparator output is low.
//
//*****************************************************************************
tBoolean
ComparatorValueGet(unsigned long ulBase, unsigned long ulComp)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == COMP_BASE);
    ASSERT(ulComp < 3);

    //
    // Return the appropriate value based on the comparator's present output
    // value.
    //
    if(HWREG(ulBase + (ulComp * 0x20) + COMP_O_ACSTAT0) & COMP_ACSTAT0_OVAL)
    {
        return(true);
    }
    else
    {
        return(false);
    }
}

//*****************************************************************************
//
//! Registers an interrupt handler for the comparator interrupt.
//!
//! \param ulBase is the base address of the comparator module.
//! \param ulComp is the index of the comparator.
//! \param pfnHandler is a pointer to the function to be called when the
//! comparator interrupt occurs.
//!
//! This sets the handler to be called when the comparator interrupt occurs.
//! This will enable the interrupt in the interrupt controller; it is the
//! interrupt-handler's responsibility to clear the interrupt source via
//! ComparatorIntClear().
//!

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线播放/欧美激情| 亚洲一区二区三区四区在线观看| 中文在线资源观看网站视频免费不卡| 亚洲精品中文字幕乱码三区 | 日韩精品一区二区三区在线播放| 国产欧美一区二区精品仙草咪| 亚洲综合色自拍一区| 成人美女视频在线观看| 欧美成人a∨高清免费观看| 一区二区成人在线| 99re6这里只有精品视频在线观看| 日韩欧美电影在线| 亚洲18女电影在线观看| 欧美人牲a欧美精品| 亚洲欧美视频一区| 成人黄色在线看| 国产欧美一区二区三区鸳鸯浴 | 色屁屁一区二区| 国产网红主播福利一区二区| 欧美aⅴ一区二区三区视频| 欧美伊人久久大香线蕉综合69| 国产精品国产三级国产普通话蜜臀| 激情深爱一区二区| 精品播放一区二区| 国产自产2019最新不卡| 欧美r级电影在线观看| 久久99精品国产麻豆不卡| 欧美一级欧美三级在线观看 | 在线播放中文一区| 午夜精品国产更新| 538在线一区二区精品国产| 图片区小说区国产精品视频| 欧美日韩精品三区| 日韩精品电影一区亚洲| 欧美一级午夜免费电影| 久久成人精品无人区| 2023国产精华国产精品| 国产成人av电影在线| 国产精品久久久久久久久晋中 | 一区二区三区在线观看欧美| 91在线视频播放| 亚洲三级在线播放| 欧美揉bbbbb揉bbbbb| 免费成人在线影院| 久久久亚洲高清| 91在线视频观看| 亚洲高清视频中文字幕| 日韩欧美中文字幕一区| 懂色av一区二区三区免费看| 亚洲天堂福利av| 久久久国产午夜精品| 暴力调教一区二区三区| 亚洲午夜视频在线| 欧美videofree性高清杂交| 国产九色sp调教91| 亚洲美女视频一区| 日韩欧美国产成人一区二区| 丰满亚洲少妇av| 亚洲一区二区三区激情| 久久综合九色综合97_久久久| 成人精品视频一区二区三区尤物| 亚洲美女在线国产| 久久一区二区三区四区| 91在线视频免费观看| 九九**精品视频免费播放| 国产精品成人在线观看| 7777精品伊人久久久大香线蕉的 | 丝袜美腿一区二区三区| 久久久国产综合精品女国产盗摄| 在线中文字幕一区二区| 韩国一区二区三区| 亚洲国产精品影院| 欧美国产日韩a欧美在线观看| 欧美三级乱人伦电影| 福利91精品一区二区三区| 懂色av一区二区三区蜜臀| 丝袜亚洲另类欧美综合| 日韩毛片视频在线看| 精品人在线二区三区| 欧美自拍偷拍午夜视频| 福利电影一区二区| 久久不见久久见免费视频7| 亚洲乱码一区二区三区在线观看| 精品国产一区久久| 在线播放视频一区| 日本韩国欧美国产| 国产91富婆露脸刺激对白| 免费一级欧美片在线观看| 一区二区三区中文在线观看| 国产欧美综合在线| 精品久久久久99| 在线不卡免费av| 欧美在线视频日韩| 色综合久久综合| www.日韩精品| 国产suv一区二区三区88区| 久久电影网电视剧免费观看| 视频一区在线播放| 亚洲五月六月丁香激情| 亚洲码国产岛国毛片在线| 国产欧美综合色| 国产日韩三级在线| 国产午夜精品理论片a级大结局 | 亚洲欧美日韩在线| 国产精品二三区| 国产精品视频一二三区| 国产欧美一区二区精品婷婷 | 99综合影院在线| 成人av在线资源| 大美女一区二区三区| 国产成人8x视频一区二区| 国产精品1024| 成人看片黄a免费看在线| 成人网在线免费视频| av福利精品导航| 91小视频在线| 欧美性猛片aaaaaaa做受| 欧美日韩综合色| 日韩一区二区在线观看视频播放| 欧美美女黄视频| 欧美一区二区三区在| 精品少妇一区二区三区视频免付费| 日韩欧美中文字幕一区| 2022国产精品视频| 国产精品久久看| 有码一区二区三区| 午夜视频在线观看一区二区三区| 亚洲18影院在线观看| 裸体一区二区三区| 粉嫩绯色av一区二区在线观看| 成人午夜视频网站| 色94色欧美sute亚洲线路一ni | 日韩午夜av电影| 亚洲精品一区在线观看| 中文字幕av资源一区| 亚洲精品国产第一综合99久久 | 亚洲国产另类av| 久久草av在线| 成人综合婷婷国产精品久久蜜臀 | 一本久久a久久精品亚洲| 欧美午夜精品久久久| 日韩欧美一二三四区| 国产女人aaa级久久久级 | 中文字幕第一区综合| 亚洲激情在线播放| 美国一区二区三区在线播放| 国产999精品久久久久久| 欧美性色黄大片手机版| 久久久久久久久久久久久夜| 一级日本不卡的影视| 国产综合色视频| 欧美中文字幕一区二区三区亚洲| 精品久久久久香蕉网| 综合久久综合久久| 精品一区二区三区在线播放视频| gogogo免费视频观看亚洲一| 91精品欧美综合在线观看最新| 国产精品久久久久永久免费观看| 亚洲韩国精品一区| 成人免费看视频| 日韩欧美卡一卡二| 一区二区三区色| 成人天堂资源www在线| 日韩一区二区在线观看| 亚洲女人的天堂| 国产成人精品网址| 日韩一区二区三区视频在线观看| 综合婷婷亚洲小说| 国产精品资源网站| 91精品国产综合久久久久久久久久| 中文幕一区二区三区久久蜜桃| 视频一区二区不卡| 欧美视频一区二区| 日韩美女久久久| 成人精品小蝌蚪| 国产欧美视频在线观看| 毛片av一区二区| 欧美精品日日鲁夜夜添| 一区二区三区在线观看动漫 | 精品日韩欧美在线| 亚洲成精国产精品女| 色先锋aa成人| 亚洲日本va午夜在线影院| 国产精品一级二级三级| 欧美mv和日韩mv国产网站| 日本欧美加勒比视频| 欧美日韩国产经典色站一区二区三区| 亚洲三级电影网站| 99精品欧美一区| 亚洲天堂福利av| 99久久免费视频.com| 最新久久zyz资源站| 成人午夜在线视频| 国产精品视频免费| av色综合久久天堂av综合| 国产精品成人免费在线| 91亚洲精品久久久蜜桃网站| 亚洲丝袜美腿综合| 在线观看免费亚洲| 午夜婷婷国产麻豆精品|