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

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

?? bitband.c

?? 最新版IAR FOR ARM(EWARM)5.11中的代碼例子
?? C
字號:
//*****************************************************************************
//
// bitband.c - Bit-band manipulation example.
//
// Copyright (c) 2005-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_types.h"
#include "../../../src/debug.h"
#include "../../../src/sysctl.h"
#include "../../../src/systick.h"
#include "../../../utils/diag.h"
#include "../osram128x64x4.h"

//*****************************************************************************
//
//! \addtogroup ek_lm3s6965_list
//! <h1>Bit-Banding (bitband)</h1>
//!
//! This example application demonstrates the use of the bit-banding
//! capabilities of the Cortex-M3 microprocessor.  All of SRAM and all of the
//! peripherals reside within bit-band regions, meaning that bit-banding
//! operations can be applied to any of them.  In this example, a variable in
//! SRAM is set to a particular value one bit at a time using bit-banding
//! operations (it would be more efficient to do a single non-bit-banded write;
//! this simply demonstrates the operation of bit-banding).
//
//*****************************************************************************

//*****************************************************************************
//
// A map of hex nibbles to ASCII characters.
//
//*****************************************************************************
static const char * const pcHex = "0123456789ABCDEF";

//*****************************************************************************
//
// The value that is to be modified via bit-banding.
//
//*****************************************************************************
static volatile unsigned long g_ulValue;

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

//*****************************************************************************
//
// Delay for the specified number of seconds.  Depending upon the current
// SysTick value, the delay will be between N-1 and N seconds (i.e. N-1 full
// seconds are guaranteed, along with the remainder of the current second).
//
//*****************************************************************************
void
Delay(unsigned long ulSeconds)
{
    //
    // Loop while there are more seconds to wait.
    //
    while(ulSeconds--)
    {
        //
        // Wait until the SysTick value is less than 1000.
        //
        while(SysTickValueGet() > 1000)
        {
        }

        //
        // Wait until the SysTick value is greater than 1000.
        //
        while(SysTickValueGet() < 1000)
        {
        }
    }
}

//*****************************************************************************
//
// Print the given value as a hexadecimal string on the OLED.
//
//*****************************************************************************
void
PrintValue(unsigned long ulValue)
{
    char pcBuffer[9];

    pcBuffer[0] = pcHex[(ulValue >> 28) & 15];
    pcBuffer[1] = pcHex[(ulValue >> 24) & 15];
    pcBuffer[2] = pcHex[(ulValue >> 20) & 15];
    pcBuffer[3] = pcHex[(ulValue >> 16) & 15];
    pcBuffer[4] = pcHex[(ulValue >> 12) & 15];
    pcBuffer[5] = pcHex[(ulValue >> 8) & 15];
    pcBuffer[6] = pcHex[(ulValue >> 4) & 15];
    pcBuffer[7] = pcHex[(ulValue >> 0) & 15];
    pcBuffer[8] = '\0';
    OSRAM128x64x4StringDraw(pcBuffer, 42, 24, 15);
}

//*****************************************************************************
//
// This example demonstrates the use of bit-banding to set individual bits
// within a word of SRAM.
//
//*****************************************************************************
int
main(void)
{
    unsigned long ulErrors, ulIdx;

    //
    // Set the clocking to run directly from the crystal.
    //
    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                   SYSCTL_XTAL_8MHZ);

    //
    // Initialize the OLED display and write status.
    //
    OSRAM128x64x4Init(1000000);
    OSRAM128x64x4StringDraw("Bit banding...", 24, 8, 15);

    //
    // Set up and enable the SysTick timer.  It will be used as a reference
    // for delay loops.  The SysTick timer period will be set up for one
    // second.
    //
    SysTickPeriodSet(SysCtlClockGet());
    SysTickEnable();

    //
    // Set the value and error count to zero.
    //
    g_ulValue = 0;
    ulErrors = 0;

    //
    // Print the initial value to the OLED.
    //
    PrintValue(g_ulValue);

    //
    // Delay for 1 second.
    //
    Delay(1);

    //
    // Set the value to 0xdecafbad using bit band accesses to each individual
    // bit.
    //
    for(ulIdx = 0; ulIdx < 32; ulIdx++)
    {
        //
        // Set this bit.
        //
        HWREGBITW(&g_ulValue, 31 - ulIdx) = (0xdecafbad >> (31 - ulIdx)) & 1;

        //
        // Print the current value to the OLED.
        //
        PrintValue(g_ulValue);

        //
        // Delay for 1 second.
        //
        Delay(1);
    }

    //
    // Make sure that the value is 0xdecafbad.
    //
    if(g_ulValue != 0xdecafbad)
    {
        ulErrors++;
    }

    //
    // Make sure that the individual bits read back correctly.
    //
    for(ulIdx = 0; ulIdx < 32; ulIdx++)
    {
        if(HWREGBITW(&g_ulValue, ulIdx) != ((0xdecafbad >> ulIdx) & 1))
        {
            ulErrors++;
        }
    }

    //
    // Delay for 2 seconds.
    //
    Delay(2);

    //
    // Print out the result.
    //
    if(ulErrors)
    {
        OSRAM128x64x4StringDraw("Errors!", 42, 40, 15);
    }
    else
    {
        OSRAM128x64x4StringDraw("Success!", 42, 40, 15);
    }

    //
    // Exit.
    //
    DiagExit(0);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲少妇最新在线视频| 成人午夜视频网站| www.亚洲精品| 日韩精品中文字幕一区| 国产精品伦一区| 五月天欧美精品| 成人影视亚洲图片在线| 欧美日韩国产一级片| 欧美激情一区二区三区在线| 免费在线观看视频一区| 91蜜桃免费观看视频| 精品va天堂亚洲国产| 亚洲精品高清在线| 成人av在线一区二区三区| 日韩久久久久久| 夜夜嗨av一区二区三区四季av| 韩国理伦片一区二区三区在线播放| 欧洲激情一区二区| 亚洲欧美在线aaa| 国产一区二区三区四| 91精品国产综合久久国产大片| 天天色天天操综合| 97国产一区二区| 中文字幕久久午夜不卡| 精品一区二区三区视频| 欧美理论片在线| 亚洲国产精品一区二区久久恐怖片| 99视频一区二区| 国产视频在线观看一区二区三区 | 欧美一区二区三区喷汁尤物| 亚洲一区二区在线观看视频| 色综合久久综合中文综合网| 综合色中文字幕| 91亚洲永久精品| 亚洲天堂2016| av一二三不卡影片| 亚洲精品五月天| 色综合一个色综合| 一区二区三区 在线观看视频| 色菇凉天天综合网| 亚洲成人免费视| 911精品产国品一二三产区| 天天综合网 天天综合色| 欧美日韩日本视频| 丝袜美腿亚洲色图| 欧美电视剧在线看免费| 激情综合网最新| 国产亚洲欧美日韩在线一区| 大白屁股一区二区视频| 亚洲免费资源在线播放| 欧美日韩色一区| 经典三级在线一区| 国产精品你懂的在线欣赏| 色婷婷亚洲综合| 石原莉奈在线亚洲三区| 国产精品不卡在线| 色婷婷综合五月| 日韩电影免费一区| 久久精品人人做人人综合| 91网站最新地址| 日韩中文字幕区一区有砖一区| 日韩精品一区二区三区视频在线观看| 国产老肥熟一区二区三区| 国产精品久久久久久久久免费相片| 日本电影亚洲天堂一区| 蜜桃在线一区二区三区| 国产喷白浆一区二区三区| 一本大道久久a久久精品综合| 亚洲国产wwwccc36天堂| 国产午夜精品一区二区三区视频 | 91视频观看免费| 日韩中文字幕91| 国产精品情趣视频| 欧美精品乱码久久久久久| 国产精一品亚洲二区在线视频| 亚洲精品免费视频| 精品国产一区二区国模嫣然| 在线国产亚洲欧美| 国产综合色视频| 亚洲成a人v欧美综合天堂下载| 久久久国产精华| 欧美精品一二三| av中文字幕亚洲| 韩国女主播成人在线| 午夜影院在线观看欧美| 亚洲图片另类小说| 久久新电视剧免费观看| 欧美色男人天堂| 99久久久国产精品免费蜜臀| 九色综合国产一区二区三区| 一区二区三区高清不卡| 久久精品亚洲麻豆av一区二区 | 在线视频国内自拍亚洲视频| 国产成人午夜片在线观看高清观看| 亚洲成人免费影院| 中文字幕一区二区三区精华液| 亚洲精品一线二线三线| 欧美亚洲日本一区| av日韩在线网站| 国模套图日韩精品一区二区| 亚洲成人一区二区| 亚洲激情第一区| 亚洲人成网站影音先锋播放| 国产欧美精品在线观看| 日韩你懂的在线播放| 欧美一区二区免费视频| 91福利资源站| 在线观看日韩av先锋影音电影院| 成人一级视频在线观看| 国产精品99久久久久久宅男| 久久99热这里只有精品| 理论片日本一区| 另类人妖一区二区av| 美女脱光内衣内裤视频久久网站| 国产美女主播视频一区| 男男gaygay亚洲| 日韩不卡一区二区三区| 蜜臀av性久久久久蜜臀av麻豆 | 7777精品伊人久久久大香线蕉的 | 一区二区三区国产| 亚洲综合丁香婷婷六月香| 亚洲精品菠萝久久久久久久| 亚洲六月丁香色婷婷综合久久| 中文字幕亚洲欧美在线不卡| 国产精品乱人伦| 成人免费在线视频| 亚洲精品国产精品乱码不99 | 日本不卡的三区四区五区| 无码av中文一区二区三区桃花岛| 天天综合色天天| 美洲天堂一区二卡三卡四卡视频| 九九精品视频在线看| 国产精品77777竹菊影视小说| 成人影视亚洲图片在线| av中文一区二区三区| 欧美怡红院视频| 3atv在线一区二区三区| 精品国产伦一区二区三区观看方式| 国产亚洲一区二区三区四区 | 亚洲精品日日夜夜| 亚洲成人www| 久久丁香综合五月国产三级网站| 国产一区二区女| 国产成人99久久亚洲综合精品| 91欧美一区二区| 欧美一区二区网站| 国产日产欧美一区| 一区二区三区在线观看视频| 水蜜桃久久夜色精品一区的特点 | 久久人人97超碰com| 国产精品久久久久久亚洲伦 | 555www色欧美视频| 久久精品亚洲精品国产欧美kt∨| 亚洲女同一区二区| 免费成人结看片| 99视频一区二区| 日韩精品一区二区三区蜜臀| 国产精品成人免费在线| 视频一区国产视频| 成人午夜视频免费看| 欧美日韩小视频| 国产精品国产成人国产三级| 国产91清纯白嫩初高中在线观看| 欧美日韩亚洲丝袜制服| 国产欧美视频一区二区三区| 午夜视频一区二区三区| 成人深夜视频在线观看| 欧美久久高跟鞋激| 亚洲欧美自拍偷拍色图| 蜜臀久久99精品久久久画质超高清| gogo大胆日本视频一区| 日韩精品一区二区三区四区| 亚洲综合丁香婷婷六月香| 成人在线一区二区三区| 日韩欧美国产综合一区| 夜色激情一区二区| 成人免费三级在线| 日韩免费视频一区| 亚洲va国产天堂va久久en| 不卡影院免费观看| 久久久一区二区| 全国精品久久少妇| 欧美日韩免费视频| 亚洲婷婷在线视频| 成人中文字幕在线| 久久久午夜电影| 精品一区二区免费在线观看| 欧美日韩高清一区二区不卡| 国产精品国产三级国产普通话99| 国产精品资源在线观看| 日韩女优av电影| 喷水一区二区三区| 欧美日韩国产欧美日美国产精品| 亚洲人妖av一区二区| 成人av片在线观看| 亚洲国产精品二十页| 国产不卡免费视频| 国产视频一区在线播放| 国产露脸91国语对白| 久久尤物电影视频在线观看|