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

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

?? qs_ek-lm3s6965.c

?? 最新版IAR FOR ARM(EWARM)5.11中的代碼例子
?? C
?? 第 1 頁 / 共 2 頁
字號:
//*****************************************************************************
//
// qs_ek-lm3s6965.c - The quick start application for the LM3S6965 Evaluation
//                    Board.
//
// 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_ints.h"
#include "../../../hw_memmap.h"
#include "../../../hw_sysctl.h"
#include "../../../hw_types.h"
#include "../../../src/adc.h"
#include "../../../src/debug.h"
#include "../../../src/gpio.h"
#include "../../../src/interrupt.h"
#include "../../../src/pwm.h"
#include "../../../src/sysctl.h"
#include "../../../src/systick.h"
#include "../../../src/timer.h"
#include "../../../src/uart.h"
#include "../osram128x64x4.h"
#include "audio.h"
#include "enet.h"
#include "game.h"
#include "globals.h"
#include "images.h"
#include "random.h"
#include "screen_saver.h"
#include "sounds.h"

//*****************************************************************************
//
//! \addtogroup ek_lm3s6965_list
//! <h1>EK-LM3S6965 Quickstart Application (qs_ek-lm3s6965)</h1>
//!
//! A game in which a blob-like character tries to find its way out of a maze.
//! The character starts in the middle of the maze and must find the exit,
//! which will always be located at one of the four corners of the maze.  Once
//! the exit to the maze is located, the character is placed into the middle of
//! a new maze and must find the exit to that maze; this repeats endlessly.
//!
//! The game is started by pressing the select push button on the right side
//! of the board.  During game play, the select push button will fire a bullet
//! in the direction the character is currently facing, and the navigation push
//! buttons on the left side of the board will cause the character to walk in
//! the corresponding direction.
//!
//! Populating the maze are a hundred spinning stars that mindlessly attack the
//! character.  Contact with one of these stars results in the game ending, but
//! the stars go away when shot.
//!
//! Score is accumulated for shooting the stars and for finding the exit to the
//! maze.  The game lasts for only one character, and the score is displayed on
//! the virtual UART at 115,200, 8-N-1 during game play and will be displayed
//! on the screen at the end of the game.
//!
//! A small web site is provided by the game over the Ethernet port.  DHCP is
//! used to obtain an Ethernet address.  If DHCP times out without obtaining an
//! address, a static IP address will be used.  The DHCP timeout and the
//! default static IP are easily configurable using macros.  The address that
//! is selected will be shown on the OLED display before the game starts.  The
//! web pages allow the entire game maze to be viewed, along with the character
//! and stars; the display is generated by a Java applet that is downloaded
//! from the game (therefore requiring that Java be installed in the web
//! browser).  The volume of the game music and sound effects can also be
//! adjusted.
//!
//! Since the OLED display on the evaluation board has burn-in characteristics
//! similar to a CRT, the application also contains a screen saver.  The screen
//! saver will only become active if two minutes have passed without the user
//! push button being pressed while waiting to start the game (that is, it will
//! never come on during game play).  Qix-style bouncing lines are drawn on the
//! display by the screen saver.
//!
//! After two minutes of running the screen saver, the display will be turned
//! off and the user LED will blink.  Either mode of screen saver (bouncing
//! lines or blank display) will be exited by pressing the select push button.
//! The select push button will then need to be pressed again to start the
//! game.
//
//*****************************************************************************

//*****************************************************************************
//
// A set of flags used to track the state of the application.
//
//*****************************************************************************
unsigned long g_ulFlags;

//*****************************************************************************
//
// The speed of the processor clock, which is therefore the speed of the clock
// that is fed to the peripherals.
//
//*****************************************************************************
unsigned long g_ulSystemClock;

//*****************************************************************************
//
// Storage for a local frame buffer.
//
//*****************************************************************************
unsigned char g_pucFrame[4096];

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

//*****************************************************************************
//
// The number of clock ticks that have occurred.  This is used as an entropy
// source for the random number generator; the number of clock ticks at the
// time of a button press or release is an entropic event.
//
//*****************************************************************************
static unsigned long g_ulTickCount = 0;

//*****************************************************************************
//
// The number of clock ticks that have occurred since the last screen update
// was requested.  This is used to divide down the system clock tick to the
// desired screen update rate.
//
//*****************************************************************************
static unsigned char g_ucScreenUpdateCount = 0;

//*****************************************************************************
//
// The number of clock ticks that have occurred since the last application
// update was performed.  This is used to divide down the system clock tick to
// the desired application update rate.
//
//*****************************************************************************
static unsigned char g_ucAppUpdateCount = 0;

//*****************************************************************************
//
// The debounced state of the five push buttons.  The bit positions correspond
// to:
//
//     0 - Up
//     1 - Down
//     2 - Left
//     3 - Right
//     4 - Select
//
//*****************************************************************************
unsigned char g_ucSwitches = 0x1f;

//*****************************************************************************
//
// The vertical counter used to debounce the push buttons.  The bit positions
// are the same as g_ucSwitches.
//
//*****************************************************************************
static unsigned char g_ucSwitchClockA = 0;
static unsigned char g_ucSwitchClockB = 0;

//*****************************************************************************
//
// Handles the SysTick timeout interrupt.
//
//*****************************************************************************
void
SysTickIntHandler(void)
{
    unsigned long ulData, ulDelta;

    //
    // Increment the tick count.
    //
    g_ulTickCount++;

    //
    // Indicate that a timer interrupt has occurred.
    //
    HWREGBITW(&g_ulFlags, FLAG_CLOCK_TICK) = 1;

    //
    // Increment the screen update count.
    //
    g_ucScreenUpdateCount++;

    //
    // See if 1/30th of a second has passed since the last screen update.
    //
    if(g_ucScreenUpdateCount == (CLOCK_RATE / 30))
    {
        //
        // Restart the screen update count.
        //
        g_ucScreenUpdateCount = 0;

        //
        // Request a screen update.
        //
        HWREGBITW(&g_ulFlags, FLAG_UPDATE) = 1;
    }

    //
    // Update the music/sound effects.
    //
    AudioHandler();

    //
    // Increment the application update count.
    //
    g_ucAppUpdateCount++;

    //
    // See if 1/100th of a second has passed since the last application update.
    //
    if(g_ucAppUpdateCount != (CLOCK_RATE / 100))
    {
        //
        // Return without doing any further processing.
        //
        return;
    }

    //
    // Restart the application update count.
    //
    g_ucAppUpdateCount = 0;

    //
    // Run the Ethernet handler.
    //
    EnetTick(10);

    //
    // Read the state of the push buttons.
    //
    ulData = (GPIOPinRead(GPIO_PORTE_BASE, (GPIO_PIN_0 | GPIO_PIN_1 |
                                            GPIO_PIN_2 | GPIO_PIN_3)) |
              (GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_1) << 3));

    //
    // Determine the switches that are at a different state than the debounced
    // state.
    //
    ulDelta = ulData ^ g_ucSwitches;

    //
    // Increment the clocks by one.
    //
    g_ucSwitchClockA ^= g_ucSwitchClockB;
    g_ucSwitchClockB = ~g_ucSwitchClockB;

    //
    // Reset the clocks corresponding to switches that have not changed state.
    //
    g_ucSwitchClockA &= ulDelta;
    g_ucSwitchClockB &= ulDelta;

    //
    // Get the new debounced switch state.
    //
    g_ucSwitches &= g_ucSwitchClockA | g_ucSwitchClockB;
    g_ucSwitches |= (~(g_ucSwitchClockA | g_ucSwitchClockB)) & ulData;

    //
    // Determine the switches that just changed debounced state.
    //
    ulDelta ^= (g_ucSwitchClockA | g_ucSwitchClockB);

    //
    // See if any switches just changed debounced state.
    //
    if(ulDelta)
    {
        //
        // Add the current tick count to the entropy pool.
        //
        RandomAddEntropy(g_ulTickCount);
    }

    //
    // See if the select button was just pressed.
    //
    if((ulDelta & 0x10) && !(g_ucSwitches & 0x10))
    {
        //
        // Set a flag to indicate that the select button was just pressed.
        //
        HWREGBITW(&g_ulFlags, FLAG_BUTTON_PRESS) = 1;
    }
}

//*****************************************************************************
//
// Delay for a multiple of the system tick clock rate.
//
//*****************************************************************************
static void
Delay(unsigned long ulCount)
{
    //
    // Loop while there are more clock ticks to wait for.
    //
    while(ulCount--)
    {
        //
        // Wait until a SysTick interrupt has occurred.
        //
        while(!HWREGBITW(&g_ulFlags, FLAG_CLOCK_TICK))
        {
        }

        //
        // Clear the SysTick interrupt flag.
        //
        HWREGBITW(&g_ulFlags, FLAG_CLOCK_TICK) = 0;
    }
}

//*****************************************************************************
//
// Displays a logo for a specified amount of time.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲18女电影在线观看| 欧洲一区二区三区在线| 久久久久久久久久美女| 久久99精品久久久久久国产越南| 欧美日韩另类一区| 日韩免费看的电影| 韩国午夜理伦三级不卡影院| 日韩色在线观看| 国产精品小仙女| 中文字幕日本乱码精品影院| 久久成人久久爱| 午夜影院久久久| 亚洲视频 欧洲视频| 久久在线免费观看| 在线成人免费视频| 日本高清免费不卡视频| 高清久久久久久| 韩国v欧美v亚洲v日本v| 日韩在线a电影| 亚洲国产成人av网| 综合久久给合久久狠狠狠97色| 欧美mv日韩mv亚洲| 日韩亚洲欧美成人一区| 欧美日韩一区二区电影| 91极品美女在线| av综合在线播放| 国产98色在线|日韩| 国内成人精品2018免费看| 午夜精品久久久久久久99樱桃| 亚洲欧美成人一区二区三区| 国产精品三级在线观看| 国产亚洲精品aa午夜观看| 精品电影一区二区| 日韩欧美一级特黄在线播放| 制服丝袜国产精品| 6080日韩午夜伦伦午夜伦| 欧美人与z0zoxxxx视频| 制服丝袜av成人在线看| 欧美一区二区三区四区视频| 欧美丰满高潮xxxx喷水动漫 | 国产一区二区不卡老阿姨| 日本sm残虐另类| 毛片一区二区三区| 久久国产精品一区二区| 久久国产尿小便嘘嘘| 激情丁香综合五月| 国产传媒久久文化传媒| 高清不卡一二三区| av亚洲精华国产精华| 91免费在线视频观看| 91精品1区2区| 在线观看91精品国产麻豆| 日韩欧美一级二级三级| 精品精品国产高清a毛片牛牛 | 国产日韩精品一区| 国产欧美精品一区二区色综合朱莉| 久久精品人人做人人爽人人| 亚洲国产高清在线观看视频| 综合电影一区二区三区| 亚洲一二三区视频在线观看| 五月天视频一区| 国产一区二区视频在线播放| 国产成人av电影| 欧美色视频一区| 日韩欧美色电影| 欧美激情综合五月色丁香小说| 国产精品福利影院| 亚洲国产美女搞黄色| 久草精品在线观看| av成人免费在线观看| 欧美日韩国产免费一区二区| 欧美α欧美αv大片| 国产精品免费av| 亚洲成av人影院| 精品一区二区久久| 91片黄在线观看| 日韩一区二区三区精品视频 | 婷婷丁香久久五月婷婷| 韩国午夜理伦三级不卡影院| 色综合久久久久久久| 欧美一卡二卡在线| 国产精品久久久久毛片软件| 一级做a爱片久久| 久久草av在线| 在线看国产日韩| 欧美日韩一区二区三区四区| 欧美精品国产精品| 国产色爱av资源综合区| 亚洲大片精品永久免费| 青草av.久久免费一区| 成人av网站免费| 日韩欧美国产精品| 亚洲久本草在线中文字幕| 久久99精品久久久久久久久久久久| 99re免费视频精品全部| 日韩欧美国产系列| 一色屋精品亚洲香蕉网站| 亚洲激情校园春色| 国产精品影视天天线| 欧美精品电影在线播放| 日韩一区在线看| 狠狠色丁香婷婷综合久久片| av网站免费线看精品| 精品日韩在线观看| 亚洲成人自拍一区| a美女胸又www黄视频久久| 日韩一区二区视频| 亚洲国产日韩一区二区| 丁香亚洲综合激情啪啪综合| 欧美另类久久久品| 国产精品久久久久久久午夜片| 日本中文字幕一区二区视频| 成人黄色小视频| 日韩精品最新网址| 亚洲欧美日韩国产综合| 国产乱理伦片在线观看夜一区| 欧美一激情一区二区三区| 夜夜夜精品看看| 一本到高清视频免费精品| 中文字幕乱码亚洲精品一区| 激情五月婷婷综合| 日韩视频免费观看高清完整版 | 91精品国产一区二区三区| 中文字幕亚洲不卡| 国产成都精品91一区二区三| 精品国产欧美一区二区| 欧美aaa在线| 69堂国产成人免费视频| 亚欧色一区w666天堂| 欧美天天综合网| 亚洲一区二区偷拍精品| 色哟哟在线观看一区二区三区| 国产精品久久久久一区二区三区| 国产成人午夜精品5599| 久久精品亚洲精品国产欧美| 日本不卡视频在线观看| 日韩欧美在线1卡| 麻豆视频观看网址久久| 日韩一二三区视频| 亚洲午夜一区二区| 国产传媒日韩欧美成人| 国产日韩精品一区二区浪潮av | 日韩欧美色综合| 久久99精品国产.久久久久| 精品国产一区二区三区久久影院| 亚洲激情男女视频| 欧美日韩精品一区二区三区蜜桃| 香蕉影视欧美成人| 日韩区在线观看| 国产精品正在播放| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | a在线播放不卡| 亚洲激情av在线| 欧美精品免费视频| 国产主播一区二区| 亚洲国产成人在线| 色成年激情久久综合| 午夜av一区二区| 精品福利在线导航| 丁香婷婷综合五月| 亚洲午夜精品在线| 欧美电视剧免费观看| 成人久久久精品乱码一区二区三区 | 欧美色网站导航| 青青草原综合久久大伊人精品 | 亚洲国产sm捆绑调教视频 | 国产成人激情av| 国产精品美女久久久久久久久久久| 91亚洲精品乱码久久久久久蜜桃| 蜜臀精品一区二区三区在线观看| 26uuu久久天堂性欧美| 国产精品一区二区在线看| 亚洲欧洲无码一区二区三区| 欧美三级电影在线看| 久久精品国产99国产| 国产精品国产精品国产专区不片 | 91网页版在线| 日韩中文字幕91| 亚洲国产精品99久久久久久久久| 91国偷自产一区二区使用方法| 亚洲va欧美va国产va天堂影院| 久久久美女毛片| 欧美色成人综合| 国产91丝袜在线观看| 亚洲国产精品影院| 欧美一级理论片| 91视频免费播放| 精品在线免费视频| 日韩毛片视频在线看| 精品久久人人做人人爽| 粉嫩av一区二区三区粉嫩| 五月婷婷久久丁香| 中文字幕一区二区三区在线观看| 这里只有精品电影| 91在线云播放| 国产成人在线免费| 欧美aaaaaa午夜精品| 一区二区在线观看不卡| 国产欧美一区在线| 7777精品久久久大香线蕉|