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

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

?? qs_dk-lm3s102.c

?? Stellaris公司推出1美元ARM,這是Stellaris驅動庫源程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
//*****************************************************************************
//
// qs_dk-lm3s102.c - A quick start sample application to demo chip features
//
// Copyright (c) 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 920 of the Stellaris Driver Library.
//
//*****************************************************************************

#include "../../hw_memmap.h"
#include "../../hw_types.h"
#include "../../src/comp.h"
#include "../../src/debug.h"
#include "../../src/gpio.h"
#include "../../src/interrupt.h"
#include "../../src/sysctl.h"
#include "../../src/systick.h"
#include "../../src/pwm.h"
#include "../../src/adc.h"
#include "../../src/uart.h"
#include "../pdc.h"

//*****************************************************************************
//
// Define I/O configuration.
//
//*****************************************************************************
#define COMPARATOR_ID   0
#define GPIO_PIN_MUTE   GPIO_PIN_5

//*****************************************************************************
//
//! \addtogroup dk_lm3sxxx_list
//! <h1>DK-LM3S102 Quickstart Application (qs_dk-lm3s102)</h1>
//!
//! This example uses the photocell on the development board to create a geiger
//! counter for visible light.  In bright light, the click rate (i.e. the
//! count) increases; in low light it decreases.  The light reading is also
//! displayed on the LCD, and a log of the readings is output on the UART at
//! 115,200, 8-n-1.  The push button can be used to turn off the clicking noise
//! on and off; when off the LCD and UART still provide the light reading.
//!
//! In the default jumper configuration of the development board, this example
//! actually samples the potentiometer and the push button will not work.  In
//! order for this example to fully work, the following jumper wire connections
//! must be made: JP3 pin 1 to JP5 pin 2 (requiring the removal of the jumper
//! on JP5) and JP19 pin 2 to J6 pin 6.
//
//*****************************************************************************

//*****************************************************************************
//
// The voltage levels of the internal voltage reference to use for comparison
// to the photocell input.
//
//*****************************************************************************
static const unsigned long g_pulCompLevels[] =
{
    COMP_REF_0_1375V, COMP_REF_0_275V, COMP_REF_0_4125V, COMP_REF_0_55V,
    COMP_REF_0_6875V, COMP_REF_0_825V, COMP_REF_0_9625V, COMP_REF_1_1V,
    COMP_REF_1_2375V, COMP_REF_1_375V, COMP_REF_1_5125V, COMP_REF_1_65V,
    COMP_REF_1_7875V, COMP_REF_1_925V, COMP_REF_2_0625V
};

//*****************************************************************************
//
// The current index into the internal voltage reference array.
//
//*****************************************************************************
static unsigned long g_ulCompIdx;

//*****************************************************************************
//
// The current accumulation of results from the comparator.
//
//*****************************************************************************
static unsigned long g_ulCompAccum;

//*****************************************************************************
//
// The most recent setting of the potentiometer.
//
//*****************************************************************************
static unsigned long g_ulPotSetting;

//*****************************************************************************
//
// The number of SysTick counts between clicks of the piezo.
//
//*****************************************************************************
static unsigned long g_ulClickRate;

//*****************************************************************************
//
// Counts SysTick events.  Used to determine when the piezo should make a
// sound.
//
//*****************************************************************************
static unsigned long g_ulClickRateCount;

//*****************************************************************************
//
// The counter of the number of consecutive times that the push button has a
// value different than the currently debounced state.
//
//*****************************************************************************
static unsigned long g_ulDebounceCounter;

//*****************************************************************************
//
// A set of flags.  The flag bits are defined as follows:
//
//     0 -> The mute flag; when clear, the piezo will not be clicked and the
//          comparator results will only be available on the LCD and over the
//          UART.  When set, the piezo will click.
//     1 -> An indicator from the SysTick interrupt handler to the main code
//          that new comparator results are available.
//     2 -> The current debounced state of the push button.
//     3 -> An indicator that a SysTick interrupt has occurred.
//
//*****************************************************************************
#define FLAG_UNMUTE     0
#define FLAG_RESULTS    1
#define FLAG_BUTTON     2
#define FLAG_SYSTICK    3
static volatile unsigned long g_ulFlags;

//*****************************************************************************
//
// The error routine that is called if the driver library encounters an error.
//
//*****************************************************************************
#ifdef DEBUG
void
__error__(char *pcFilename, unsigned long ulLine)
{
}
#endif

//*****************************************************************************
//
// The interrupt handler for the SysTick interrupt.
//
//*****************************************************************************
void
SysTickIntHandler(void)
{
    //
    // Indicate that a SysTick interrupt has occurred.
    //
    HWREGBITW(&g_ulFlags, FLAG_SYSTICK) = 1;

    //
    // Determine the tick rate.  Get the current comparator value.  Increment
    // the accumulator if it is one.
    //
    if(ComparatorValueGet(COMP_BASE, COMPARATOR_ID))
    {
        g_ulCompAccum++;
    }

    //
    // Increment the internal reference voltage array index and see if the end
    // has been reached.
    //
    g_ulCompIdx++;
    if(g_ulCompIdx == (sizeof(g_pulCompLevels) / sizeof(g_pulCompLevels[0])))
    {
        //
        // Go back to the beginning of the array.
        //
        g_ulCompIdx = 0;

        //
        // Save the comparison results and reset the accumulator.
        //
        g_ulPotSetting = g_ulCompAccum;
        g_ulCompAccum = 0;

        //
        // Set the bit in g_ulFlags indicating that new results are available.
        //
        HWREGBITW(&g_ulFlags, FLAG_RESULTS) = 1;

        //
        // Compute the new rate at which to click the piezo.
        //
        g_ulClickRate = ((15 - g_ulPotSetting) + 3) * 5;

        //
        // If the current count is greater than the click rate then set the
        // count to the click rate so that the click will happen sooner.
        //
        if(g_ulClickRateCount > g_ulClickRate)
        {
            g_ulClickRateCount = g_ulClickRate;
        }
    }

    //
    // Set the internal reference voltage to the next comparison value.
    //
    ComparatorRefSet(COMP_BASE, g_pulCompLevels[g_ulCompIdx]);

    //
    // Determine if the piezo should be muted.  See if the push button is in a
    // different state than the currently debounced state.
    //
    if((GPIOPinRead(GPIO_PORTB_BASE, GPIO_PIN_MUTE) ? 1 : 0) !=
       HWREGBITW(&g_ulFlags, FLAG_BUTTON))
    {
        //
        // Increment the number of counts with the push button in a different
        // state.
        //
        g_ulDebounceCounter++;

        //
        // If four consecutive counts have had the push button in a different
        // state then the state has changed.
        //
        if(g_ulDebounceCounter == 4)
        {
            //
            // Toggle the debounced state of the push button.
            //
            HWREGBITW(&g_ulFlags, FLAG_BUTTON) ^= 1;

            //
            // If the push button was just pushed, then toggle the mute flag.
            //
            if(!HWREGBITW(&g_ulFlags, FLAG_BUTTON))
            {
                //
                // Toggle the mute flag.
                //

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷精品久久二区二区蜜臂av| 成人天堂资源www在线| 正在播放亚洲一区| 日韩成人免费电影| 久久亚洲综合av| 成人av综合一区| 亚洲人成精品久久久久久| 欧美专区在线观看一区| 日韩一区精品视频| 日韩精品一区二区在线| 成人一道本在线| 亚洲影视在线播放| 精品国产电影一区二区| 成人av网在线| 日本中文字幕一区二区有限公司| 久久色在线视频| 91网站视频在线观看| 天天综合天天做天天综合| 久久九九国产精品| 欧美色综合影院| 国产精品一区专区| 亚洲免费高清视频在线| 欧美一区二区三区四区高清| 国产成都精品91一区二区三| 亚洲超碰精品一区二区| 国产亚洲欧美中文| 欧美卡1卡2卡| thepron国产精品| 免费看欧美美女黄的网站| 国产精品久久久99| 欧美一级免费大片| 色就色 综合激情| 国产精品一区二区无线| 亚洲大片免费看| 国产精品麻豆久久久| 在线播放欧美女士性生活| 大胆欧美人体老妇| 老色鬼精品视频在线观看播放| 中文字幕亚洲在| 精品久久久久久久久久久久包黑料| 91麻豆国产香蕉久久精品| 国产一区二区三区四区五区美女 | 日本欧美大码aⅴ在线播放| 国产欧美一区二区精品性色超碰| 欧美电影影音先锋| 99久久精品国产网站| 激情综合色播激情啊| 亚洲自拍都市欧美小说| 国产精品对白交换视频| 国产精品乱子久久久久| 91精品国产aⅴ一区二区| 99久久综合国产精品| 国产麻豆视频一区二区| 日本中文一区二区三区| 亚州成人在线电影| 一区二区三区中文在线观看| 中文字幕欧美日本乱码一线二线| 欧美va亚洲va在线观看蝴蝶网| 欧美日韩日本视频| 在线看国产一区| 91视频在线看| 91网站在线观看视频| www.日韩av| 99久久久久久99| yourporn久久国产精品| 国产成人av在线影院| 国产在线播放一区二区三区| 久久er99精品| 韩国精品久久久| 精品亚洲成a人| 久久成人久久鬼色| 美女视频一区二区三区| 青草国产精品久久久久久| 日韩成人免费在线| 久久精品国产精品亚洲精品| 久久精品国产77777蜜臀| 日本亚洲视频在线| 青青草91视频| 黄网站免费久久| 国产成人av资源| 波多野结衣中文一区| 91蜜桃婷婷狠狠久久综合9色| 99精品视频一区| 在线观看欧美黄色| 欧美麻豆精品久久久久久| 制服.丝袜.亚洲.中文.综合| 日韩亚洲欧美在线| 久久精品亚洲麻豆av一区二区| 久久久精品国产99久久精品芒果| 国产女人aaa级久久久级 | 亚洲精品视频一区| 亚洲一区二区欧美日韩| 日本成人在线网站| 国产一区二区三区香蕉| a级高清视频欧美日韩| 欧美视频在线一区二区三区 | 亚洲电影视频在线| 免费观看一级特黄欧美大片| 国产乱码字幕精品高清av | 欧美日韩一区二区三区视频| 91精品国产欧美一区二区成人| 精品成a人在线观看| 亚洲一区二区中文在线| 人妖欧美一区二区| 丁香亚洲综合激情啪啪综合| 91蝌蚪porny| 日韩欧美在线网站| 国产精品久久午夜夜伦鲁鲁| 亚洲一卡二卡三卡四卡| 国产曰批免费观看久久久| jiyouzz国产精品久久| 91精品久久久久久久91蜜桃| 国产亚洲一区二区三区在线观看 | 国产欧美日韩精品在线| 樱花草国产18久久久久| 激情图片小说一区| 91同城在线观看| 精品精品国产高清一毛片一天堂| 综合色天天鬼久久鬼色| 捆绑紧缚一区二区三区视频| 日本久久精品电影| 久久久久久97三级| 日日噜噜夜夜狠狠视频欧美人 | 亚洲乱码国产乱码精品精的特点 | 日韩国产精品91| 成人午夜看片网址| 91精品国产免费| 亚洲精品国产a久久久久久| 黄色日韩网站视频| 欧美丰满嫩嫩电影| 中文字幕在线不卡| 国产精选一区二区三区| 欧美日韩国产经典色站一区二区三区| 国产日本欧美一区二区| 免费成人av在线播放| 欧美日韩中文字幕精品| 国产精品久久久久久久久晋中| 热久久免费视频| 欧美日韩中文字幕一区二区| 中文字幕一区二区在线播放| 国产精品一区二区不卡| 欧美一级生活片| 亚洲午夜久久久久久久久电影网 | 欧美成人一区二区三区片免费 | 午夜视频在线观看一区二区三区| 成人av先锋影音| 国产日产亚洲精品系列| 精品系列免费在线观看| 欧美一区二区三区免费大片| 亚洲福利电影网| 欧美三级资源在线| 亚洲男同性视频| 91女厕偷拍女厕偷拍高清| 欧美高清在线一区二区| 国产精品亚洲综合一区在线观看| 日韩一级免费一区| 丝袜美腿一区二区三区| 欧美精品一级二级| 日欧美一区二区| 3d成人动漫网站| 蜜臀a∨国产成人精品| 91精品国产欧美一区二区| 丝袜诱惑制服诱惑色一区在线观看 | 国产精品视频一区二区三区不卡| 国产一区二区三区四区五区入口| 精品国产电影一区二区| 经典三级一区二区| 精品久久五月天| 国产在线国偷精品产拍免费yy| wwwwww.欧美系列| 国产成人精品亚洲777人妖| 国产精品色噜噜| 一本在线高清不卡dvd| 亚洲国产美国国产综合一区二区| 欧美午夜电影网| 日本欧美韩国一区三区| 精品欧美乱码久久久久久| 国产伦精品一区二区三区视频青涩| 国产日韩欧美精品在线| 99久久伊人网影院| 一区二区三区欧美| 欧美日韩一区二区三区不卡| 美腿丝袜在线亚洲一区| 久久免费视频一区| 91在线精品一区二区三区| 一区二区三区精品在线观看| 欧美精品粉嫩高潮一区二区| 九九九久久久精品| 中文字幕欧美日韩一区| 色婷婷久久久亚洲一区二区三区| 亚洲成年人网站在线观看| 欧美videofree性高清杂交| 成av人片一区二区| 午夜精品久久久久久久久| 亚洲精品一区二区三区影院| 北条麻妃国产九九精品视频| 香港成人在线视频| 国产三级一区二区| 精品视频在线看| 国产成人免费av在线|