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

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

?? qs_ek-lm3s2965.c

?? 最新版IAR FOR ARM(EWARM)5.11中的代碼例子
?? C
?? 第 1 頁 / 共 2 頁
字號:
//*****************************************************************************
//
// qs_ek-lm3s2965.c - The quick start application for the LM3S2965 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/can.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 "can_net.h"
#include "game.h"
#include "globals.h"
#include "images.h"
#include "random.h"
#include "screen_saver.h"
#include "sounds.h"

//*****************************************************************************
//
//! \addtogroup ek_lm3s2965_list
//! <h1>EK-LM3S2965 Quickstart Application (qs_ek-lm3s2965)</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.
//!
//! If the CAN device board is attached and is running the can_device_qs
//! application, the volume of the music and sound effects can be adjusted over
//! CAN with the two push buttons on the target board.  The LED on the CAN
//! device board will track the state of the LED on the main board via CAN
//! messages.  The operation of the game will not be affected by the absence of
//! the CAN device board.
//!
//! 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;

    //
    // Read the state of the push buttons.
    //
    ulData = ((GPIOPinRead(GPIO_PORTF_BASE, (GPIO_PIN_4 | GPIO_PIN_5 |
                                             GPIO_PIN_6 | GPIO_PIN_7)) >> 4) |
              GPIOPinRead(GPIO_PORTG_BASE, GPIO_PIN_4));

    //
    // 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.
//
//*****************************************************************************
static void
DisplayLogo(const unsigned char *pucLogo, unsigned long ulWidth,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99re热这里只有精品免费视频| 午夜伊人狠狠久久| 欧美喷潮久久久xxxxx| 91精品国产综合久久精品| 日韩视频一区二区在线观看| 国产日韩欧美一区二区三区乱码 | 亚洲v中文字幕| 奇米色一区二区| 国产91精品一区二区麻豆亚洲| 一本到三区不卡视频| 在线不卡欧美精品一区二区三区| 久久久久久一二三区| 亚洲香蕉伊在人在线观| 国产在线视视频有精品| 在线观看亚洲一区| 久久先锋影音av鲁色资源网| 亚洲人成网站在线| 中文字幕日韩精品一区| 视频一区中文字幕| 国产suv精品一区二区883| 欧美日韩和欧美的一区二区| 国产欧美一区视频| 日韩不卡一区二区| 91污在线观看| 久久久亚洲精品石原莉奈| 欧美专区日韩专区| 欧美日韩五月天| 欧美激情自拍偷拍| 男女男精品视频网| 色香色香欲天天天影视综合网| 精品国产伦一区二区三区观看体验| 亚洲欧美日韩在线| 国产精品99久久久| 91精品国产综合久久福利软件 | 成人在线一区二区三区| 91精品国产福利在线观看| 亚洲三级免费电影| 国产一区二区三区精品欧美日韩一区二区三区 | 日av在线不卡| 在线欧美日韩国产| 国产精品亲子乱子伦xxxx裸| 午夜精品在线看| 亚洲免费观看高清完整版在线观看熊 | 国产白丝网站精品污在线入口| 欧美精品久久久久久久多人混战 | 色成年激情久久综合| 欧美—级在线免费片| 激情伊人五月天久久综合| 欧美在线观看视频一区二区三区| 国产日韩欧美综合一区| 韩国精品久久久| 欧美一区二区三区在线电影 | 这里只有精品99re| 一区二区三区高清| 日韩综合在线视频| 欧美午夜理伦三级在线观看| 日韩毛片精品高清免费| 国产露脸91国语对白| 精品国产1区2区3区| 青草国产精品久久久久久| 欧美自拍丝袜亚洲| 一区二区三区美女视频| 一区二区三区精品视频| 奇米影视一区二区三区| 4438x成人网最大色成网站| 一区二区三区四区在线| 一本大道久久a久久精品综合| 欧美激情中文字幕一区二区| 国产精品12区| 久久欧美一区二区| 国产精品自拍三区| 国产无遮挡一区二区三区毛片日本| 久久激情五月婷婷| 精品久久一区二区三区| 久久国产成人午夜av影院| 欧美成人官网二区| 精品一区二区三区不卡| 久久影视一区二区| 国产精品18久久久久| 欧美高清在线精品一区| 成人免费观看视频| 最新成人av在线| 色婷婷一区二区三区四区| 一区二区三区丝袜| 欧美日韩美少妇| 日韩黄色免费电影| 91精品在线观看入口| 精品亚洲成a人在线观看| 久久久国际精品| 日日骚欧美日韩| 欧美成人精品福利| 国产福利一区二区| 日韩伦理免费电影| 欧美日韩大陆一区二区| 午夜精品福利久久久| 精品久久久久久最新网址| 国产成人免费视频| 亚洲欧美区自拍先锋| 亚洲高清视频在线| 99热国产精品| 亚洲成人自拍一区| 日韩美女一区二区三区四区| 国产不卡高清在线观看视频| 一区二区三区四区在线播放| 日韩一区二区三区免费看| 国产美女一区二区| 亚洲欧美日本在线| 91精品国产日韩91久久久久久| 国产又黄又大久久| 亚洲色图欧洲色图| 91精品视频网| 成人免费毛片片v| 亚洲韩国精品一区| 26uuu亚洲综合色欧美| 91香蕉视频在线| 免费在线观看精品| 久草中文综合在线| 在线视频中文字幕一区二区| 乱中年女人伦av一区二区| 国产精品久久久久影院老司| 欧美日韩国产另类不卡| 国产精品一二三在| 亚洲地区一二三色| 国产精品你懂的在线欣赏| 884aa四虎影成人精品一区| 一区二区三区不卡视频在线观看| 日韩欧美中文字幕公布| 92国产精品观看| 精品一区二区三区免费毛片爱| 亚洲女子a中天字幕| 欧美xxxxxxxxx| 欧美在线综合视频| 国产成人免费视频网站高清观看视频| 亚洲图片欧美视频| 91网站在线播放| 国产精品不卡在线观看| 欧美一二三区在线观看| 色婷婷av一区| 国产黄色成人av| 日本欧美一区二区三区乱码| 日韩伦理电影网| 国产日本欧美一区二区| 91精品国产麻豆| 欧美中文字幕一区二区三区亚洲| 福利91精品一区二区三区| 蜜桃视频一区二区三区| 亚洲一区二区视频在线| 国产精品毛片高清在线完整版| 日韩欧美国产一区二区三区| 欧美性大战xxxxx久久久| 东方aⅴ免费观看久久av| 蜜桃av一区二区三区电影| 亚洲影视在线观看| 日韩一区中文字幕| 国产亚洲精品aa午夜观看| 日韩欧美国产午夜精品| 欧美久久一二区| 欧美色倩网站大全免费| 91丨国产丨九色丨pron| 成人精品视频网站| 一区二区三区在线观看国产| 中文字幕日韩一区| 国产精品久久免费看| 国产色产综合产在线视频| 精品日本一线二线三线不卡| 91精品国产一区二区三区| 欧美日韩一级视频| 欧美中文字幕一二三区视频| 91久久一区二区| 久久久99免费| 精品国产乱码久久久久久牛牛 | 91亚洲精品久久久蜜桃网站| 国产不卡免费视频| 国产成人免费在线| 懂色av一区二区夜夜嗨| 国产馆精品极品| 国产成人免费视频一区| 成人在线视频一区| 成人av在线电影| www.亚洲精品| 99久久亚洲一区二区三区青草| 波多野洁衣一区| 99久久99精品久久久久久| av在线不卡观看免费观看| 91在线视频18| 在线精品视频一区二区三四 | 日本成人在线网站| 免费人成网站在线观看欧美高清| 日韩1区2区日韩1区2区| 麻豆久久一区二区| 国产一区久久久| 成人在线视频首页| 99国产精品久久久久久久久久| 欧美一区二区大片| 97久久超碰精品国产| 91视频.com| 激情综合一区二区三区| 韩国欧美国产一区| 成人精品免费网站| 在线一区二区视频|