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

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

?? qs_ek-lm3s8962.c

?? 最新版IAR FOR ARM(EWARM)5.11中的代碼例子
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
//*****************************************************************************
//
// qs_ek-lm3s8962.c - The quick start application for the LM3S8962 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 "../rit128x96x4.h"
#include "audio.h"
#include "can_net.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_lm3s8962_list
//! <h1>EK-LM3S8962 Quickstart Application (qs_ek-lm3s8962)</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.
//!
//! 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[6144];

//*****************************************************************************
//
// 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;
    }
}

//*****************************************************************************

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区麻豆国产| 国产欧美久久久精品影院| 一区二区在线观看免费视频播放| 欧美疯狂做受xxxx富婆| 一本久久a久久免费精品不卡| 国产一区二区剧情av在线| 亚洲一区二区中文在线| 中文字幕精品一区二区精品绿巨人 | 亚洲影院理伦片| 久久黄色级2电影| 日韩一区二区三区在线| 亚洲成人777| 久久电影网站中文字幕| 日韩欧美亚洲国产精品字幕久久久| 一区二区三区不卡视频| 精品视频在线视频| 精品一区精品二区高清| 99综合影院在线| 日本欧美一区二区三区乱码| 首页综合国产亚洲丝袜| 免费成人在线视频观看| 狠狠久久亚洲欧美| 国产在线精品国自产拍免费| 99久久精品免费看国产免费软件| 欧洲人成人精品| 日韩一区二区三区视频| 精品sm捆绑视频| 亚洲色大成网站www久久九九| 欧美四级电影在线观看| 激情久久久久久久久久久久久久久久| 久久九九久久九九| 在线视频你懂得一区| 国产真实乱对白精彩久久| 亚洲色图在线播放| 中文字幕在线一区| 天天综合网 天天综合色| 久久久精品国产免大香伊| 亚洲国产精品一区二区久久| 一区二区在线观看免费视频播放| 午夜久久电影网| www.亚洲免费av| 欧美大片日本大片免费观看| 国产精品成人一区二区三区夜夜夜| 亚洲国产精品综合小说图片区| 国产在线精品一区二区三区不卡| 欧美在线免费播放| 日韩午夜精品视频| 黄一区二区三区| 亚洲一二三四在线| 日韩一区日韩二区| 亚洲精品中文在线影院| 久久免费的精品国产v∧| 337p亚洲精品色噜噜噜| 亚洲色图一区二区三区| 亚洲黄色片在线观看| 一区二区三区久久| 日本欧美在线看| 粉嫩高潮美女一区二区三区| 秋霞午夜av一区二区三区| 久久99国产精品尤物| 欧美日韩你懂得| 亚洲国产精品人人做人人爽| 91传媒视频在线播放| 国产精品乱码妇女bbbb| 国产大片一区二区| 久久精品视频免费| 成人晚上爱看视频| 久久亚洲欧美国产精品乐播| 久久久亚洲精华液精华液精华液| 欧美大片顶级少妇| 欧美一区二区国产| 日韩免费电影一区| 久久久久88色偷偷免费| 国产精品久久久久久久久免费桃花| 亚洲精品写真福利| 国内精品在线播放| 国产成人自拍在线| 欧洲精品中文字幕| 精品精品国产高清a毛片牛牛 | 欧美一区二区女人| 日本特黄久久久高潮| 91色.com| 久久精品国产亚洲a| 精品sm捆绑视频| 粉嫩嫩av羞羞动漫久久久| 亚洲国产精品成人综合色在线婷婷| 91精品免费观看| 久久久久国色av免费看影院| 亚洲线精品一区二区三区八戒| 日本不卡视频一二三区| 福利一区福利二区| 欧美日韩视频不卡| 亚洲色图欧美激情| 粉嫩av一区二区三区粉嫩| 91精品国产高清一区二区三区| 日韩国产精品91| 91亚洲精华国产精华精华液| 欧美tickling挠脚心丨vk| 欧美高清www午色夜在线视频| 亚洲国产一区二区在线播放| 国产日韩影视精品| 9191精品国产综合久久久久久 | 欧美色男人天堂| 成人午夜精品在线| 日韩国产欧美三级| 一区二区三区精品久久久| 国产精品麻豆久久久| 久久久国产精华| 看国产成人h片视频| 欧美日韩免费不卡视频一区二区三区| 中文字幕视频一区| 91免费国产在线观看| 亚洲国产美女搞黄色| 欧美中文字幕一区二区三区 | 色综合一区二区| 中文字幕成人在线观看| 成人精品小蝌蚪| 日韩影视精彩在线| 色哟哟亚洲精品| 不卡视频一二三| 99re这里只有精品6| 色一情一乱一乱一91av| 色综合久久中文字幕| 色综合久久88色综合天天| 91香蕉视频在线| 亚洲一区二区三区小说| 成人免费小视频| 亚洲综合色网站| 亚洲免费观看高清完整版在线| 精品一区二区久久| 1000部国产精品成人观看| 欧美精选一区二区| 国产成人亚洲综合色影视| 欧美成人aa大片| 日韩视频一区二区| 国产一区二区三区日韩| 国产精品护士白丝一区av| 精品国产乱码久久久久久久| 粉嫩欧美一区二区三区高清影视| 视频一区中文字幕国产| 国产精品超碰97尤物18| 日韩欧美成人午夜| 麻豆久久久久久| 99久久国产综合精品麻豆| 在线观看视频91| 久久精品一区四区| 色综合欧美在线视频区| 欧美一区二区久久| 亚洲视频一区二区在线观看| 免费在线观看一区二区三区| 99精品国产91久久久久久| 欧美日韩国产免费| 最新国产成人在线观看| 欧美成人一区二区三区在线观看| 亚洲男人天堂av| 国产精品国产三级国产普通话99 | 久久精品男人的天堂| 日韩一级高清毛片| 欧美另类久久久品| 日韩亚洲欧美一区| 久久综合色婷婷| 久久久久国产精品免费免费搜索| 国产成人av一区二区| 日本乱人伦aⅴ精品| 国产日韩影视精品| 国产一区二区在线看| 日韩限制级电影在线观看| 午夜一区二区三区视频| 欧美性生活一区| 亚洲影视在线播放| 99在线精品免费| 国产精品成人一区二区三区夜夜夜 | 丝袜脚交一区二区| 欧美一级xxx| 国产精品久久久一区麻豆最新章节| 日韩欧美色电影| 在线电影一区二区三区| 欧美成人一区二区三区在线观看 | 日韩av电影免费观看高清完整版 | 免费视频最近日韩| 国产一区二区网址| 亚洲在线视频免费观看| 国产精品一区在线观看你懂的| 日韩午夜精品电影| 国产一区二区精品久久99| 久久精品亚洲麻豆av一区二区| 成+人+亚洲+综合天堂| 中文字幕视频一区二区三区久| 日本韩国欧美在线| 悠悠色在线精品| 欧美日韩久久久一区| 久久国产精品99精品国产| 精品对白一区国产伦| av在线综合网| 亚洲男女一区二区三区| 国产亚洲成年网址在线观看| 亚洲国产综合人成综合网站| 国产一区二区主播在线| 欧美电影精品一区二区| 美日韩一区二区三区|