亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
99re视频精品| 日韩成人午夜精品| 波多野结衣中文字幕一区二区三区| 2021久久国产精品不只是精品| 精品一区二区成人精品| 久久男人中文字幕资源站| 国产白丝精品91爽爽久久| 中文字幕一区二区在线观看| 色综合视频在线观看| 亚洲二区在线视频| 91精品国产综合久久香蕉麻豆| 麻豆精品在线看| 久久久激情视频| 99久久精品国产精品久久| 亚洲激情综合网| 欧美男女性生活在线直播观看| 久久99久久久欧美国产| 欧美国产欧美综合| 色婷婷综合激情| 青青国产91久久久久久| 国产亚洲欧洲一区高清在线观看| 国产成人av一区| 一区二区三区加勒比av| 911精品国产一区二区在线| 精品一区二区日韩| 亚洲精品视频一区二区| 欧美一级片在线看| 成人一区二区在线观看| 亚洲成人黄色影院| 国产校园另类小说区| 在线观看欧美黄色| 国产一区二区美女诱惑| 亚洲激情图片小说视频| 久久这里只有精品6| 色婷婷综合久久| 午夜不卡av免费| 国产欧美一区二区精品性| 久久99精品国产91久久来源| 久久久99精品免费观看不卡| 欧美高清精品3d| 国产在线精品免费| 亚洲国产美女搞黄色| 日本一区二区三区高清不卡 | 视频一区视频二区中文| 国产日韩欧美a| 在线播放中文一区| av在线综合网| 国产成人午夜精品影院观看视频| 午夜一区二区三区在线观看| 国产精品嫩草久久久久| 精品国产乱码久久久久久夜甘婷婷| 色综合天天综合| 国产成人av一区二区三区在线| 蜜桃视频第一区免费观看| 亚洲一区中文日韩| 亚洲桃色在线一区| 国产欧美精品一区二区色综合朱莉| 欧美另类videos死尸| 99久久99久久精品国产片果冻| 国产高清久久久久| 极品销魂美女一区二区三区| 日本少妇一区二区| 亚洲高清在线精品| 亚洲伊人伊色伊影伊综合网| 亚洲日本va在线观看| 国产精品色婷婷| 久久精子c满五个校花| 欧美电影免费观看完整版| 7777精品伊人久久久大香线蕉的| 色呦呦日韩精品| 99国产麻豆精品| 99久久精品国产观看| 99v久久综合狠狠综合久久| 国产成人综合网站| 懂色av一区二区在线播放| 国内成人精品2018免费看| 精品亚洲成a人在线观看| 蜜臀av性久久久久蜜臀av麻豆| 三级精品在线观看| 天天色 色综合| 三级不卡在线观看| 青青草国产精品亚洲专区无| 亚洲成人黄色影院| 日本中文在线一区| 韩国av一区二区三区在线观看| 日韩精品乱码免费| 日产精品久久久久久久性色| 免费成人在线观看| 韩国av一区二区| 国产精品88av| av午夜一区麻豆| 日本电影亚洲天堂一区| 91在线免费看| 日本高清不卡aⅴ免费网站| 欧美日韩一区二区在线视频| 欧美一区二区精品在线| 久久先锋影音av鲁色资源| 亚洲国产精品国自产拍av| 国产精品美女久久久久久久网站| 一色桃子久久精品亚洲| 亚洲一级二级三级| 美日韩黄色大片| 国产一区二区影院| 不卡一区二区三区四区| 色综合久久综合网欧美综合网| 欧美影视一区在线| 国产日韩成人精品| 欧美国产1区2区| 一区二区在线看| 亚洲黄色免费网站| 久久久久久久久岛国免费| 欧美日韩成人综合| 欧美精品vⅰdeose4hd| 一级特黄大欧美久久久| 日韩专区欧美专区| 捆绑变态av一区二区三区| 一本久久a久久免费精品不卡| 天天av天天翘天天综合网色鬼国产| 亚洲乱码精品一二三四区日韩在线| 午夜成人在线视频| 成人av免费在线播放| 欧美日本国产视频| 中文字幕乱码一区二区免费| 亚洲国产一二三| 国产精品一区二区久久不卡| 色综合天天综合网天天看片| 欧美mv日韩mv亚洲| 一区二区免费看| 国产91精品在线观看| 69av一区二区三区| 国产精品大尺度| 另类中文字幕网| 97se亚洲国产综合自在线| 久久婷婷久久一区二区三区| 亚洲高清视频在线| 91一区二区在线观看| 久久久久久久久免费| 日韩精品一二区| 欧美色区777第一页| 国产精品久久久久三级| 国产精品羞羞答答xxdd| 欧美日韩不卡在线| 亚洲综合视频在线| 91在线精品一区二区| 久久品道一品道久久精品| 麻豆91精品视频| 欧美伦理视频网站| 一区二区三区欧美日| 99精品热视频| 国产日本欧洲亚洲| 另类的小说在线视频另类成人小视频在线 | 色av综合在线| 国产精品色呦呦| 成人一区二区视频| 国产日韩欧美不卡在线| 激情综合色播五月| 日韩免费高清av| 免费在线看成人av| 91精品国产乱码| 日本不卡一区二区三区高清视频| 欧美日韩大陆一区二区| 亚洲电影欧美电影有声小说| 欧美视频一区二区三区在线观看 | 丝袜美腿一区二区三区| 欧美午夜电影一区| 亚洲午夜久久久久久久久电影院| 欧洲中文字幕精品| 五月天丁香久久| 欧美一卡2卡3卡4卡| 国产成人免费网站| 国产精品中文字幕一区二区三区| 一本色道**综合亚洲精品蜜桃冫| 自拍av一区二区三区| 91丨九色丨尤物| 一区二区三区高清在线| 高清不卡一区二区在线| 亚洲欧美视频在线观看视频| 色综合一个色综合| 亚洲欧洲另类国产综合| 亚洲国产日产av| 欧美日韩mp4| 青青草国产成人av片免费| 中文久久乱码一区二区| 色播五月激情综合网| 国产精品77777| 成人毛片老司机大片| 欧美日韩成人综合| 久草中文综合在线| 久久狠狠亚洲综合| 91福利国产精品| 久久一夜天堂av一区二区三区| 欧美日本视频在线| 亚洲精品水蜜桃| 国产成人免费视频网站| 国产成人午夜视频| 成人免费av资源| 亚洲精品久久嫩草网站秘色| 欧美三级电影在线看| 国产激情一区二区三区桃花岛亚洲| 成人三级在线视频|