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

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

?? adc.c

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? C
?? 第 1 頁 / 共 3 頁
字號:
//*****************************************************************************
//
// adc.c - Driver for the ADC.
//
// 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 adc_api
//! @{
//
//*****************************************************************************

#include "../hw_adc.h"
#include "../hw_ints.h"
#include "../hw_memmap.h"
#include "../hw_types.h"
#include "adc.h"
#include "debug.h"
#include "interrupt.h"

//*****************************************************************************
//
// The currently configured software oversampling factor for each of the ADC
// sequencers.
//
//*****************************************************************************
#if defined(GROUP_pucoverssamplefactor) || defined(BUILD_ALL)
unsigned char g_pucOversampleFactor[3];
#else
extern unsigned char g_pucOversampleFactor[3];
#endif

//*****************************************************************************
//
//! Registers an interrupt handler for an ADC interrupt.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//! \param pfnHandler is a pointer to the function to be called when the
//! ADC sample sequence interrupt occurs.
//!
//! This function sets the handler to be called when a sample sequence
//! interrupt occurs.  This will enable the global interrupt in the interrupt
//! controller; the sequence interrupt must be enabled with ADCIntEnable().  It
//! is the interrupt handler's responsibility to clear the interrupt source via
//! ADCIntClear().
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intregister) || defined(BUILD_ALL) || defined(DOXYGEN)
void
ADCIntRegister(unsigned long ulBase, unsigned long ulSequenceNum,
               void (*pfnHandler)(void))
{
    unsigned long ulInt;

    //
    // Check the arguments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 4);

    //
    // Determine the interrupt to register based on the sequence number.
    //
    ulInt = INT_ADC0 + ulSequenceNum;

    //
    // Register the interrupt handler.
    //
    IntRegister(ulInt, pfnHandler);

    //
    // Enable the timer interrupt.
    //
    IntEnable(ulInt);
}
#endif

//*****************************************************************************
//
//! Unregisters the interrupt handler for an ADC interrupt.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//!
//! This function unregisters the interrupt handler.  This will disable the
//! global interrupt in the interrupt controller; the sequence interrupt must
//! be disabled via ADCIntDisable().
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intunregister) || defined(BUILD_ALL) || defined(DOXYGEN)
void
ADCIntUnregister(unsigned long ulBase, unsigned long ulSequenceNum)
{
    unsigned long ulInt;

    //
    // Check the arguments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 4);

    //
    // Determine the interrupt to unregister based on the sequence number.
    //
    ulInt = INT_ADC0 + ulSequenceNum;

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

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

//*****************************************************************************
//
//! Disables a sample sequence interrupt.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//!
//! This function disables the requested sample sequence interrupt.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intdisable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
ADCIntDisable(unsigned long ulBase, unsigned long ulSequenceNum)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 4);

    //
    // Disable this sample sequence interrupt.
    //
    HWREG(ulBase + ADC_O_IM) &= ~(1 << ulSequenceNum);
}
#endif

//*****************************************************************************
//
//! Enables a sample sequence interrupt.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//!
//! This function enables the requested sample sequence interrupt.  Any
//! outstanding interrupts are cleared before enabling the sample sequence
//! interrupt.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_intenable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
ADCIntEnable(unsigned long ulBase, unsigned long ulSequenceNum)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 4);

    //
    // Clear any outstanding interrupts on this sample sequence.
    //
    HWREG(ulBase + ADC_O_ISC) = 1 << ulSequenceNum;

    //
    // Enable this sample sequence interrupt.
    //
    HWREG(ulBase + ADC_O_IM) |= 1 << ulSequenceNum;
}
#endif

//*****************************************************************************
//
//! Gets the current interrupt status.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//! \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 specified sample sequence.
//! Either the raw interrupt status or the status of interrupts that are
//! allowed to reflect to the processor can be returned.
//!
//! \return The current raw or masked interrupt status.
//
//*****************************************************************************
#if defined(GROUP_intstatus) || defined(BUILD_ALL) || defined(DOXYGEN)
unsigned long
ADCIntStatus(unsigned long ulBase, unsigned long ulSequenceNum,
             tBoolean bMasked)
{
    //
    // Check the arguments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 4);

    //
    // Return either the interrupt status or the raw interrupt status as
    // requested.
    //
    if(bMasked)
    {
        return(HWREG(ulBase + ADC_O_ISC) & (1 << ulSequenceNum));
    }
    else
    {
        return(HWREG(ulBase + ADC_O_RIS) & (1 << ulSequenceNum));
    }
}
#endif

//*****************************************************************************
//
//! Clears sample sequence interrupt source.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//!
//! The specified sample sequence interrupt is cleared, so that it no longer
//! asserts.  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
ADCIntClear(unsigned long ulBase, unsigned long ulSequenceNum)
{
    //
    // Check the arugments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 4);

    //
    // Clear the interrupt.
    //
    HWREG(ulBase + ADC_O_ISC) = 1 << ulSequenceNum;
}
#endif

//*****************************************************************************
//
//! Enables a sample sequence.
//!
//! \param ulBase is the base address of the ADC module.
//! \param ulSequenceNum is the sample sequence number.
//!
//! Allows the specified sample sequence to be captured when its trigger is
//! detected.  A sample sequence must be configured before it is enabled.
//!
//! \return None.
//
//*****************************************************************************
#if defined(GROUP_sequenceenable) || defined(BUILD_ALL) || defined(DOXYGEN)
void
ADCSequenceEnable(unsigned long ulBase, unsigned long ulSequenceNum)
{
    //
    // Check the arugments.
    //
    ASSERT(ulBase == ADC_BASE);
    ASSERT(ulSequenceNum < 4);

    //
    // Enable the specified sequence.
    //
    HWREG(ulBase + ADC_O_ACTSS) |= 1 << ulSequenceNum;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区电影在线| 精品一区二区成人精品| 国产91清纯白嫩初高中在线观看| 欧美日本国产一区| 国产色婷婷亚洲99精品小说| 久久99精品国产.久久久久 | 国内欧美视频一区二区| 国产宾馆实践打屁股91| 久久久久久久综合色一本| 国内偷窥港台综合视频在线播放| 欧美一区二视频| 麻豆一区二区三| 日韩精品一区二区三区四区| 激情综合网av| 久久综合九色综合欧美98| 免费在线欧美视频| 欧美成人女星排名| 国内精品国产成人国产三级粉色| 久久久久久99久久久精品网站| 蜜臀va亚洲va欧美va天堂| 91精品国产一区二区| 精品一区二区在线视频| 精品乱码亚洲一区二区不卡| 精品一区二区三区在线播放 | 加勒比av一区二区| 日韩一区二区在线看| 麻豆视频观看网址久久| 精品久久人人做人人爱| 国产专区综合网| 欧美精品一区二| 97久久久精品综合88久久| 亚洲人成网站色在线观看| 欧美日韩国产精品自在自线| 麻豆国产欧美一区二区三区| 久久久精品中文字幕麻豆发布| 成人av资源在线| 一区二区三区中文在线观看| 5月丁香婷婷综合| 成人高清在线视频| 亚洲成人手机在线| 91精品国产综合久久婷婷香蕉 | 久久尤物电影视频在线观看| 免费精品视频在线| 日韩理论片中文av| 日韩三区在线观看| 国产a久久麻豆| 中文字幕国产一区| 欧美区在线观看| 国产精品一级在线| 午夜精品国产更新| 国产精品欧美一区喷水| 欧美日韩亚洲综合| 成人在线视频首页| 免费在线视频一区| 一个色综合av| 欧美韩国日本不卡| 日韩欧美国产综合| 欧美亚洲日本一区| 高清不卡一区二区在线| 一区二区三区精品| 精品国产伦一区二区三区观看方式 | 国产成人午夜精品影院观看视频| 亚洲一区二区在线免费看| 国产网站一区二区三区| 欧美日韩一二三| 色婷婷久久久综合中文字幕| 精品一区二区三区香蕉蜜桃| 亚洲影院理伦片| 国产精品久久久久久福利一牛影视 | 久久精品国产精品青草| 一区二区三区资源| 中文字幕久久午夜不卡| 精品国产免费一区二区三区四区 | 日本美女一区二区三区视频| xf在线a精品一区二区视频网站| 欧美写真视频网站| 成人黄色国产精品网站大全在线免费观看| 欧美变态tickle挠乳网站| 色哟哟精品一区| 97精品视频在线观看自产线路二| 国产麻豆视频一区二区| 久久国产精品露脸对白| 久久se精品一区精品二区| 国模娜娜一区二区三区| 成人小视频免费在线观看| 成人精品小蝌蚪| 91成人在线免费观看| 欧美在线免费播放| 91精品福利在线一区二区三区 | 日本欧美久久久久免费播放网| 视频精品一区二区| 久久精品国产亚洲一区二区三区 | 岛国精品在线观看| eeuss国产一区二区三区| 色综合天天综合在线视频| 欧美最猛黑人xxxxx猛交| 欧美无乱码久久久免费午夜一区 | 国产在线视频精品一区| 国产在线一区二区综合免费视频| 国产成人av福利| 99久久99久久免费精品蜜臀| 色香蕉成人二区免费| 欧美日韩成人综合天天影院| 欧美一区二区在线看| 久久久久97国产精华液好用吗| 亚洲视频每日更新| 午夜精品久久久久久久蜜桃app| 精品一区二区三区香蕉蜜桃| 成人18视频日本| 欧美日韩国产影片| 久久久无码精品亚洲日韩按摩| 国产精品福利电影一区二区三区四区| 一区二区三区丝袜| 久久99精品国产麻豆不卡| 成人黄色a**站在线观看| 欧美久久高跟鞋激| 久久精品人人做| 午夜一区二区三区视频| 国产精品资源网| 欧美主播一区二区三区美女| 欧美成人女星排名| 亚洲最大的成人av| 国产精品一线二线三线| 欧美揉bbbbb揉bbbbb| 国产亚洲精品7777| 日韩精品国产欧美| 91美女片黄在线观看91美女| 精品国产一区二区三区久久久蜜月 | 国产不卡在线视频| 欧美精品一二三| 18欧美亚洲精品| 国产一区二区精品久久99| 在线观看亚洲专区| 久久精品网站免费观看| 日韩影院精彩在线| 在线亚洲高清视频| 久久久蜜桃精品| 日本欧美韩国一区三区| 色偷偷一区二区三区| 久久欧美一区二区| 日本午夜精品视频在线观看| 一本大道久久精品懂色aⅴ| 国产亚洲短视频| 精品一区二区三区久久久| 欧美人与禽zozo性伦| 亚洲人成影院在线观看| 成人做爰69片免费看网站| 精品国产一区二区三区久久久蜜月| 亚洲大尺度视频在线观看| 色综合色综合色综合| 国产精品欧美久久久久无广告| 久久爱www久久做| 日韩你懂的在线播放| 日本网站在线观看一区二区三区| 欧美中文字幕不卡| 亚洲一级二级三级| 色一情一乱一乱一91av| 中文字幕亚洲电影| 成人午夜碰碰视频| 国产精品乱码一区二区三区软件| 国产又粗又猛又爽又黄91精品| 91精品欧美一区二区三区综合在| 亚洲线精品一区二区三区| 欧美在线免费观看亚洲| 亚洲最大的成人av| 欧美日韩综合一区| 亚洲国产aⅴ成人精品无吗| 欧美日韩国产免费一区二区 | 亚洲v日本v欧美v久久精品| 欧美色视频一区| 偷拍一区二区三区| 日韩精品一区在线观看| 蜜臀av国产精品久久久久| 日韩欧美国产成人一区二区| 日韩电影在线观看电影| 欧美一级高清片| 美女视频一区二区| 久久久久成人黄色影片| 国产成人精品影视| 国产精品久线在线观看| 99vv1com这只有精品| 亚洲精品成人在线| 欧美裸体一区二区三区| 麻豆精品在线播放| 久久久久久一二三区| 成人国产一区二区三区精品| 亚洲精品第一国产综合野| 欧美视频在线一区二区三区| 日本强好片久久久久久aaa| 久久综合九色综合欧美就去吻| 懂色av一区二区在线播放| 一区二区三区日韩欧美精品| 欧美日韩国产片| 国产精品原创巨作av| 亚洲欧美另类小说视频| 91精品国产欧美一区二区成人| 国产一区二区导航在线播放| 亚洲视频在线一区观看| 91麻豆精品国产91久久久使用方法 | 日韩精品资源二区在线|