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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 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.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国内二区三区| 丰满岳乱妇一区二区三区| 日韩一级黄色大片| 成人免费看的视频| 日韩av中文字幕一区二区| 国产精品私房写真福利视频| 欧美在线看片a免费观看| 国内精品久久久久影院色| 亚洲综合一二三区| 欧美国产欧美综合| 精品日产卡一卡二卡麻豆| 色88888久久久久久影院野外| 国产一区二区在线影院| 亚洲高清免费视频| 亚洲欧洲美洲综合色网| 精品国产乱码久久| 欧美色综合久久| 91在线你懂得| 成人丝袜高跟foot| 国内国产精品久久| 日本欧美大码aⅴ在线播放| 亚洲乱码国产乱码精品精小说 | 国产曰批免费观看久久久| 亚洲精品视频在线观看网站| 成人永久免费视频| 久久精品人人爽人人爽| 成人做爰69片免费看网站| 亚洲人午夜精品天堂一二香蕉| 免费av成人在线| 欧美日本一道本| 亚洲第一精品在线| 日本精品一区二区三区四区的功能| 蜜桃av一区二区| 日韩午夜电影av| 日本丰满少妇一区二区三区| 成人开心网精品视频| 国产精品资源在线| 国产精品一区2区| 国产一区二区女| 国产在线精品不卡| 蜜桃视频一区二区三区在线观看| 亚洲第一福利视频在线| 亚洲一区二区在线视频| 亚洲一区二区三区视频在线播放 | 欧美无人高清视频在线观看| 99麻豆久久久国产精品免费 | 亚洲色图清纯唯美| 一区二区在线观看视频在线观看| **欧美大码日韩| 樱花影视一区二区| 夜夜嗨av一区二区三区网页| 亚洲成人中文在线| 亚洲国产毛片aaaaa无费看| 亚洲综合在线免费观看| 亚洲国产精品自拍| 婷婷久久综合九色综合伊人色| 午夜精品国产更新| 美国精品在线观看| 韩国av一区二区| av资源网一区| 欧美三电影在线| 久久久九九九九| 久久精品一区二区| 中国av一区二区三区| 亚洲综合精品自拍| 奇米888四色在线精品| 国产在线国偷精品免费看| 97se亚洲国产综合自在线观| 色综合一区二区三区| 欧美揉bbbbb揉bbbbb| 精品国产一区a| 国产精品亲子伦对白| 一个色在线综合| 久久精品理论片| 成人国产在线观看| 欧美日本在线播放| 日本一区二区不卡视频| 亚洲观看高清完整版在线观看| 国产在线国偷精品产拍免费yy| 成人中文字幕在线| 欧美精品高清视频| 日本一区二区免费在线| 亚洲一级不卡视频| 国产尤物一区二区在线| 91官网在线观看| 久久久精品免费网站| 一区二区三区中文字幕精品精品| 蜜桃久久久久久| av午夜一区麻豆| 欧美成人伊人久久综合网| ...xxx性欧美| 国产精品自拍网站| 欧美精品乱码久久久久久按摩| 国产亚洲精品中文字幕| 丝袜亚洲精品中文字幕一区| 国产成人福利片| 欧美一级久久久久久久大片| 亚洲图片你懂的| 国产原创一区二区| 欧美一区二区三区在线观看视频 | 97久久精品人人做人人爽| 欧美成人aa大片| 一区二区三区中文字幕| 国产成人av自拍| 精品欧美乱码久久久久久| 一个色在线综合| 91色视频在线| 日本一区二区三区国色天香| 蜜桃av一区二区三区电影| 欧美在线观看禁18| 中文字幕欧美一| 国产精品系列在线观看| 亚洲精品久久久久久国产精华液| 国模娜娜一区二区三区| 在线电影欧美成精品| 亚洲一区在线观看免费| 波多野结衣一区二区三区| 欧美一级日韩免费不卡| 亚洲一区二区美女| 91麻豆免费视频| 国产精品夫妻自拍| 成人性生交大片免费看中文| 久久久99精品久久| 九九九精品视频| 精品国产免费久久| 日韩av电影免费观看高清完整版| 欧亚一区二区三区| 一区二区三区影院| 色婷婷激情久久| 亚洲丝袜制服诱惑| 91网站最新地址| 一区二区三区在线观看动漫| 91蝌蚪国产九色| 一区二区三区四区视频精品免费 | 91精品国产91久久久久久一区二区| 亚洲国产欧美在线| 欧美久久一区二区| 三级欧美韩日大片在线看| 欧美日韩国产小视频| 午夜电影久久久| 91精选在线观看| 久久精品国产免费| 精品国产91久久久久久久妲己| 国产一区不卡在线| 欧美国产一区视频在线观看| 成人h动漫精品| 亚洲欧美二区三区| 欧美亚洲丝袜传媒另类| 亚洲国产精品久久人人爱蜜臀 | 久久精品99国产国产精| 精品国产3级a| 成人免费看黄yyy456| 亚洲免费观看高清完整 | 久久九九99视频| 成人app下载| 亚洲综合色在线| 91精品国产综合久久精品app| 日本女人一区二区三区| 国产丝袜美腿一区二区三区| 懂色av一区二区三区免费观看| 国产精品乱人伦中文| 欧美午夜精品电影| 六月丁香婷婷色狠狠久久| 久久精品视频在线看| 91亚洲精品久久久蜜桃网站| 亚洲午夜免费电影| 亚洲一区二区在线免费看| 久久蜜臀精品av| 丰满亚洲少妇av| 中文字幕日韩一区| 欧美另类videos死尸| 久久66热偷产精品| 中文字幕亚洲综合久久菠萝蜜| 欧美午夜片在线看| 国产一区二区三区免费看 | 在线观看国产91| 久久69国产一区二区蜜臀| 国产精品成人一区二区艾草| 欧美主播一区二区三区美女| 精品一区二区国语对白| 最新欧美精品一区二区三区| 6080午夜不卡| av午夜一区麻豆| 久久99深爱久久99精品| 亚洲人123区| 欧美精品一区二区三区很污很色的| 国产成人午夜视频| 午夜电影一区二区三区| 中国色在线观看另类| 日韩欧美国产三级电影视频| 99综合电影在线视频| 蜜桃在线一区二区三区| 一区二区三区加勒比av| 久久久久久一二三区| 欧美日韩高清不卡| 成人爽a毛片一区二区免费| 三级影片在线观看欧美日韩一区二区| 国产欧美日韩一区二区三区在线观看| 欧美午夜精品一区二区三区| jiyouzz国产精品久久|