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

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

?? qs_dk-lm3s301.c

?? 最新版IAR FOR ARM(EWARM)5.11中的代碼例子
?? C
?? 第 1 頁 / 共 2 頁
字號:
//*****************************************************************************
//
// qs_dk-lm3s301.c - A quick start sample application to demo chip features
//
// Copyright (c) 2006-2007 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 microcontroller products.
// 
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws.  All rights are reserved.  You may not combine
// this software with "viral" open-source software in order to form a larger
// program.  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 1952 of the Stellaris Peripheral 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_lm3s301_list
//! <h1>DK-LM3S301 Quickstart Application (qs_dk-lm3s301)</h1>
//!
//! This example uses the photocell on the development board to create a geiger
//! counter for visible light.  In bright light, the click rate (that is, 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一区二区三区免费野_久草精品视频
国产精品美女久久久久久久网站| 欧美videossexotv100| 91精品国产综合久久香蕉麻豆| 精品国产一区二区三区久久久蜜月| 亚洲天堂久久久久久久| 成人综合婷婷国产精品久久蜜臀| 欧美精品色综合| 亚洲人成精品久久久久久| 国产精品自产自拍| 亚洲精品在线三区| 奇米四色…亚洲| 日韩一区二区三| 蜜臀91精品一区二区三区| 欧美精品久久一区二区三区| 一区二区三区高清| 欧美三级三级三级| 日韩精品久久久久久| 欧美猛男超大videosgay| 日日骚欧美日韩| 2021中文字幕一区亚洲| 国产精品自产自拍| 亚洲人成精品久久久久久| 91在线免费看| 亚洲成人一区二区| 欧美α欧美αv大片| 精品对白一区国产伦| 国产一区二区三区精品欧美日韩一区二区三区 | 国产精品激情偷乱一区二区∴| 欧美三级视频在线播放| 成人性视频免费网站| 日本不卡不码高清免费观看| 最新国产の精品合集bt伙计| 精品国产青草久久久久福利| 欧美色手机在线观看| 成人性生交大片免费看在线播放 | 国产精品福利在线播放| 4438x亚洲最大成人网| 日本道色综合久久| 成人avav影音| 91在线你懂得| 色拍拍在线精品视频8848| 色综合天天综合网天天狠天天| 国产成人精品www牛牛影视| 国精产品一区一区三区mba桃花| 亚洲国产精品精华液网站| 一区二区三区在线观看网站| 中文字幕一区二区三区av | 欧美一区二区久久久| 欧美欧美欧美欧美| 制服.丝袜.亚洲.中文.综合| 欧美日本一区二区三区四区| 欧美网站一区二区| 日韩一区二区电影| 精品国产乱子伦一区| 久久综合九色综合97婷婷女人| 欧美一级二级三级蜜桃| 久久香蕉国产线看观看99| 久久蜜桃av一区二区天堂 | 国产米奇在线777精品观看| 国产v日产∨综合v精品视频| av电影在线观看一区| 成人激情动漫在线观看| 亚洲成人一区二区在线观看| 国产露脸91国语对白| 欧美精品自拍偷拍| 亚洲精品综合在线| 国产成人精品免费视频网站| 欧美一级片在线看| 五月天一区二区三区| 一本久久综合亚洲鲁鲁五月天| 欧美电影免费观看高清完整版在| 一区二区三区在线高清| 99re在线视频这里只有精品| 久久久天堂av| 国产九色sp调教91| 久久久久综合网| 国产美女精品一区二区三区| 精品乱码亚洲一区二区不卡| 美国十次综合导航| 久久久久国产精品厨房| 国产成人综合在线播放| 精品日产卡一卡二卡麻豆| 亚洲综合999| 日本黄色一区二区| 中文字幕亚洲区| 成人性生交大片免费| 久久在线观看免费| 久久精品国产成人一区二区三区| 色网站国产精品| 亚洲最大的成人av| 色哟哟精品一区| 一区二区三区四区亚洲| 色综合久久天天| 亚洲一区在线观看免费观看电影高清| 不卡的av网站| 亚洲综合免费观看高清在线观看| 日本久久精品电影| 亚洲国产精品麻豆| 日韩视频在线永久播放| 精品亚洲欧美一区| 中文久久乱码一区二区| 99久久综合精品| 午夜亚洲国产au精品一区二区| 欧美日韩国产一级片| 蜜臀99久久精品久久久久久软件| 日韩精品一区二| 波多野结衣91| 天堂在线亚洲视频| 国产亚洲欧美日韩在线一区| 成人高清伦理免费影院在线观看| 亚洲欧美日韩久久精品| 欧美男人的天堂一二区| 国产一区二区精品久久99| 国产精品久线观看视频| 欧美福利视频一区| 成人app网站| 奇米777欧美一区二区| 国产精品二区一区二区aⅴ污介绍| 在线一区二区观看| 国产一区亚洲一区| 午夜精品福利一区二区三区av| 久久久不卡网国产精品一区| 日本精品免费观看高清观看| 国产精品一区一区三区| 亚洲国产日韩精品| 中文字幕一区二区三区四区不卡| 欧美一级欧美三级在线观看 | 免费成人在线播放| 亚洲午夜电影在线| 自拍偷拍欧美精品| 国产亚洲短视频| 久久综合国产精品| 7777女厕盗摄久久久| 欧美日韩精品福利| 91福利社在线观看| 91免费观看视频在线| 91亚洲大成网污www| av在线不卡观看免费观看| 国产很黄免费观看久久| 国产一区免费电影| 国产成人午夜电影网| 极品少妇一区二区三区精品视频| 三级久久三级久久| 蜜臀91精品一区二区三区| 精油按摩中文字幕久久| 久久福利视频一区二区| 国精产品一区一区三区mba视频| 国产一区二区三区香蕉| 国产成人av自拍| 91亚洲午夜精品久久久久久| 在线亚洲欧美专区二区| 日韩视频一区二区三区| 久久九九全国免费| 一二三区精品福利视频| 三级在线观看一区二区| 国产一区视频网站| 色综合天天性综合| 日韩欧美精品在线| 中文字幕一区二区三| 亚洲国产一区二区三区| 韩国女主播一区二区三区| 成人精品在线视频观看| 欧美三级日本三级少妇99| 精品人在线二区三区| 亚洲麻豆国产自偷在线| 麻豆精品一二三| 91农村精品一区二区在线| 日韩欧美国产电影| 亚洲精品日韩一| 国产电影一区在线| 欧美精品一卡两卡| 亚洲色图欧洲色图| 精品无人码麻豆乱码1区2区| 欧美天堂一区二区三区| 中文字幕不卡一区| 国内成+人亚洲+欧美+综合在线| 色综合久久天天| 1区2区3区精品视频| 国产精品香蕉一区二区三区| 欧美高清视频不卡网| 亚洲美女在线国产| 91丨九色丨蝌蚪丨老版| 亚洲国产精品激情在线观看| 麻豆91精品91久久久的内涵| 欧美日韩性生活| 亚洲一区二区三区小说| 在线免费观看视频一区| 综合久久久久久| 91久久精品一区二区| 亚洲女与黑人做爰| 欧美性猛交xxxx乱大交退制版| 国产精品超碰97尤物18| 成人综合婷婷国产精品久久| 国产片一区二区三区| 国产99久久久国产精品| 一区在线中文字幕| 色婷婷综合在线| 亚洲福利国产精品| 日韩美女天天操| 成人午夜视频在线观看|