亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品久久夜| 精品国产123| 亚洲国产三级在线| 欧美日韩在线播放一区| 午夜精品视频在线观看| 日韩亚洲欧美高清| 国产一区二区三区免费在线观看| 久久精品一区蜜桃臀影院| 国产99久久久国产精品潘金| 亚洲伦在线观看| 欧美精品第1页| 国产伦理精品不卡| 国产精品第五页| 欧美日韩一区二区三区四区| 精品一区二区在线观看| 国产精品久久久久久久久久久免费看 | 久久人人97超碰com| 国产不卡视频在线观看| 一级中文字幕一区二区| 欧美大度的电影原声| 成人h精品动漫一区二区三区| 亚洲激情六月丁香| 欧美电影免费观看高清完整版在| 国产超碰在线一区| 五月婷婷综合网| 欧美激情中文字幕| 91精品国产手机| 成人动漫av在线| 日本在线播放一区二区三区| 中文字幕成人网| 欧美精品欧美精品系列| 成人免费毛片片v| 日韩极品在线观看| 亚洲日本va在线观看| 26uuu亚洲综合色| 欧美亚洲国产一区二区三区| 丰满放荡岳乱妇91ww| 秋霞电影网一区二区| 亚洲乱码中文字幕| 久久久精品蜜桃| 日韩三级中文字幕| 欧美综合欧美视频| 99亚偷拍自图区亚洲| 韩国一区二区三区| 污片在线观看一区二区| 日韩美女视频一区| 国产精品无遮挡| 欧美xxxx老人做受| 欧美日韩国产高清一区二区三区 | 亚洲色图20p| 久久色在线视频| 日韩一区二区三免费高清| 91美女在线看| 国产电影精品久久禁18| 日韩精品亚洲专区| 亚洲va欧美va国产va天堂影院| 亚洲天堂精品在线观看| 国产欧美日韩视频一区二区| 日韩欧美综合一区| 3d动漫精品啪啪| 欧美性一区二区| 色一情一伦一子一伦一区| 成人ar影院免费观看视频| 国产又黄又大久久| 久久精品久久99精品久久| 天堂午夜影视日韩欧美一区二区| 亚洲日本电影在线| 亚洲欧美日韩国产成人精品影院 | 亚洲精品网站在线观看| 国产精品午夜在线观看| 欧美韩国日本一区| 久久精品人人做人人爽97| 精品国产乱码久久久久久久久| 日韩一区二区三区精品视频 | 精品国产一区二区国模嫣然| 4438x亚洲最大成人网| 在线播放欧美女士性生活| 欧美日韩国产123区| 制服丝袜中文字幕一区| 欧美一区二区三区视频在线观看 | 欧美一区二区三区爱爱| 欧美一级理论性理论a| 欧美电影免费观看高清完整版在 | 天天操天天综合网| 日韩和欧美一区二区| 免费在线看成人av| 蓝色福利精品导航| 国产成a人无v码亚洲福利| 91影视在线播放| 欧美在线播放高清精品| 欧美日韩精品一区视频| 日韩精品一区二区三区视频播放 | 国产午夜精品久久久久久免费视 | 精品国产伦理网| 欧美国产视频在线| 一区二区久久久久久| 亚洲gay无套男同| 精品一区二区国语对白| 国产69精品一区二区亚洲孕妇| 97国产精品videossex| 欧美色视频一区| 欧美成人性战久久| 日本一区二区在线不卡| 亚洲一区二区三区四区五区黄| 日本91福利区| 国产电影一区二区三区| 欧美在线啊v一区| 欧美一区二区视频在线观看2022| 国产亚洲va综合人人澡精品| 自拍偷拍欧美精品| 裸体歌舞表演一区二区| gogo大胆日本视频一区| 欧美日韩精品一区二区三区蜜桃| 久久综合久久99| 亚洲制服丝袜av| 国产一区二区三区黄视频| 色综合久久久久综合体桃花网| 欧美一区二区精品久久911| 国产精品网站在线观看| 日韩经典一区二区| 91视视频在线观看入口直接观看www | 久久综合综合久久综合| jlzzjlzz亚洲女人18| 欧美日韩国产影片| 一区在线观看视频| 麻豆国产精品视频| 91久久精品一区二区三| 久久久久久电影| 首页综合国产亚洲丝袜| 99国产精品国产精品毛片| 精品三级在线观看| 偷拍日韩校园综合在线| 99国内精品久久| 国产欧美日韩在线看| 久久精品理论片| 欧美丰满一区二区免费视频 | 播五月开心婷婷综合| 日韩一区二区电影网| 一区二区三区精品| 北条麻妃国产九九精品视频| 欧美精品一区二区三区蜜桃| 性欧美疯狂xxxxbbbb| 色又黄又爽网站www久久| 中文字幕成人av| 国产剧情一区二区| 精品国精品自拍自在线| 无码av免费一区二区三区试看 | 国产一区二区视频在线播放| 欧美日韩精品福利| 亚洲综合av网| 97久久久精品综合88久久| 国产日韩欧美精品电影三级在线| 日韩中文字幕不卡| 717成人午夜免费福利电影| 亚洲成人激情综合网| 欧美三级日韩三级国产三级| 亚洲视频网在线直播| 91日韩在线专区| 亚洲精品中文在线影院| 色先锋久久av资源部| 一区二区三区日韩精品视频| 色综合中文字幕国产| 亚洲欧洲日产国码二区| 91丨九色porny丨蝌蚪| 亚洲欧美另类久久久精品2019| 99久久精品国产麻豆演员表| 亚洲欧洲精品一区二区三区不卡| www.激情成人| 亚洲欧美日韩系列| 欧美亚洲国产一区在线观看网站| 亚洲一区二区在线观看视频| 欧美日韩电影在线播放| 日韩经典中文字幕一区| 欧美成人精品1314www| 激情欧美一区二区| 中文字幕的久久| 一本到不卡免费一区二区| 一区二区在线观看免费视频播放| 91久久精品午夜一区二区| 亚洲国产精品久久人人爱蜜臀| 欧美丰满一区二区免费视频| 蜜桃久久久久久久| 国产欧美精品一区二区三区四区 | 国产99久久久国产精品潘金网站| 国产精品久久久久婷婷二区次| 99精品热视频| 天天色综合天天| 久久久久久夜精品精品免费| eeuss影院一区二区三区| 亚洲国产欧美日韩另类综合 | 久久久国产午夜精品| 成人高清视频在线观看| 亚洲成人av福利| 久久久另类综合| 日本韩国欧美国产| 日韩av在线播放中文字幕| 国产清纯白嫩初高生在线观看91| 色综合久久99| 精品无人区卡一卡二卡三乱码免费卡| 中文字幕av免费专区久久|