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

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

?? uart_out.c

?? Stellaris Luminary Micro 系列之 DK-LM3S801 多個學習范例全都是基于 Keil 工程版的范例, 而范例內容列舉如下: 1.BitBand 2.Comparator
?? C
字號:
//*****************************************************************************
//
// uart_out.c - Example for writing data to the UART in an interrupt driven
//              fashion.
//
// Copyright (c) 2005,2006 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 Stellaris Family of microcontroller products.
//
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws.  All rights are reserved.  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 852 of the Stellaris Driver Library.
//
//*****************************************************************************

#include "hw_ints.h"
#include "hw_memmap.h"
#include "hw_types.h"
#include "debug.h"
#include "gpio.h"
#include "interrupt.h"
#include "sysctl.h"
#include "uart.h"
#include "../pdc.h"

//*****************************************************************************
//
//! \addtogroup dk_lm3sxxx_list
//! <h1>UART (uart_out)</h1>
//!
//! This example application utilizes the UART to display text.  The first UART
//! (the SER0 connector on the Stellaris Family Development Board) will be
//! configured in 115,200 baud, 8-n-1 mode and continuously display text.  The
//! text is transferred by servicing the interrupt from the UART; since it
//! takes about 1 ms to drain half of the UART FIFO (causing an interrupt),
//! this leaves plenty of time for other processing to occur during the
//! transfer (though that time is not utilized by this example).
//
//*****************************************************************************

//*****************************************************************************
//
// The string that is to be written to the UART.  This happens to be the
// preamble to the Magna Carta.
//
//*****************************************************************************
static const unsigned char g_pucString[] =
"John, by the grace of God, king of England, lord of Ireland, duke of\r\n"
"Normandy and Aquitaine, and count of Anjou, to the archbishop, bishops,\r\n"
"abbots, earls, barons, justiciaries, foresters, sheriffs, stewards,\r\n"
"servants, and to all his bailiffs and liege subjects, greetings. Know\r\n"
"that, having regard to God and for the salvation of our soul, and those\r\n"
"of all our ancestors and heirs, and unto the honor of God and the\r\n"
"advancement of his holy Church and for the rectifying of our realm, we\r\n"
"have granted as underwritten by advice of our venerable fathers, Stephen,\r\n"
"archbishop of Canterbury, primate of all England and cardinal of the holy\r\n"
"Roman Church, Henry, archbishop of Dublin, William of London, Peter of\r\n"
"Winchester, Jocelyn of Bath and Glastonbury, Hugh of Lincoln, Walter of\r\n"
"Worcester, William of Coventry, Benedict of Rochester, bishops; of Master\r\n"
"Pandulf, subdeacon and member of the household of our lord the Pope, of\r\n"
"brother Aymeric (master of the Knights of the Temple in England), and of\r\n"
"the illustrious men William Marshal, earl of Pembroke, William, earl of\r\n"
"Salisbury, William, earl of Warenne, William, earl of Arundel, Alan of\r\n"
"Galloway (constable of Scotland), Waren Fitz Gerold, Peter Fitz Herbert,\r\n"
"Hubert De Burgh (seneschal of Poitou), Hugh de Neville, Matthew Fitz\r\n"
"Herbert, Thomas Basset, Alan Basset, Philip d'Aubigny, Robert of\r\n"
"Roppesley, John Marshal, John Fitz Hugh, and others, our liegemen.\r\n\r\n";

//*****************************************************************************
//
// The variables that track the data to be transmitted.
//
//*****************************************************************************
static volatile const unsigned char *g_pucBuffer = 0;
static volatile unsigned long g_ulCount = 0;

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

//*****************************************************************************
//
// The transmit interrupt handler for the UART.
//
//*****************************************************************************
void
UARTTxIntHandler(void)
{
    //
    // Loop while there are more characters to send and space available in the
    // hardware FIFO.
    //
    while(g_ulCount && UARTSpaceAvail(UART0_BASE))
    {
        //
        // Send the next character.
        //
        UARTCharNonBlockingPut(UART0_BASE, *g_pucBuffer++);

        //
        // Decrement the count of characters to send.
        //
        g_ulCount--;
    }
}

//*****************************************************************************
//
// The UART interrupt handler.
//
//*****************************************************************************
void
UARTIntHandler(void)
{
    unsigned long ulStatus;

    //
    // Get the interrrupt status.
    //
    ulStatus = UARTIntStatus(UART0_BASE, true);

    //
    // Clear the asserted interrupts.
    //
    UARTIntClear(UART0_BASE, ulStatus);

    //
    // See if the transmit interrupt was asserted.
    //
    if(ulStatus & UART_INT_TX)
    {
        //
        // Handle the transmit interrupt.
        //
        UARTTxIntHandler();
    }
}

//*****************************************************************************
//
// Send a string to the UART.
//
//*****************************************************************************
void
UARTSend(const unsigned char *pucBuffer, unsigned long ulCount)
{
    //
    // Wait until any previous string has been sent.
    //
    while(g_ulCount)
    {
    }

    //
    // Save the data buffer to be transmitted.
    //
    g_pucBuffer = pucBuffer;
    g_ulCount = ulCount;

    //
    // Prime the UART FIFO.  This is done with interrupts disabled to avoid
    // problems if a transmit interrupt occurs mid way through the priming.
    //
    UARTIntDisable(UART0_BASE, UART_INT_TX);
    UARTTxIntHandler();
    UARTIntEnable(UART0_BASE, UART_INT_TX);
}

//*****************************************************************************
//
// This example demonstrates how to send a string of data to the UART.
//
//*****************************************************************************
int
main(void)
{
    //
    // Set the clocking to run directly from the crystal.
    //
    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                   SYSCTL_XTAL_6MHZ);

    //
    // Init the PDC, and then the LCD, then write the LCD.
    //
    PDCInit();
    PDCLCDInit();
    PDCLCDBacklightOn();
    PDCLCDSetPos(0, 0);
    PDCLCDWrite("UART out on SER0", 16);
    PDCLCDSetPos(1, 1);
    PDCLCDWrite("115,200, 8-N-1", 14);

    //
    // Enable the peripherals used by this example.
    //
    SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);

    //
    // Enable processor interrupts.
    //
    IntMasterEnable();

    //
    // Set GPIO A0 and A1 as UART pins.
    //
    GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

    //
    // Configure the UART for 115,200, 8-N-1 operation.
    //
    UARTConfigSet(UART0_BASE, 115200, (UART_CONFIG_WLEN_8 |
                                       UART_CONFIG_STOP_ONE |
                                       UART_CONFIG_PAR_NONE));

    //
    // Enable the UART interrupt.
    //
    IntEnable(INT_UART0);
    UARTIntEnable(UART0_BASE, UART_INT_TX);

    //
    // Loop forever sending data out the UART.
    //
    while(1)
    {
        //
        // Send the string to the UART.
        //
        UARTSend(g_pucString, sizeof(g_pucString) - 1);
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区不卡| 国产精品久线观看视频| 国产日韩v精品一区二区| 一区二区三区四区五区视频在线观看| 日韩高清在线电影| 色综合久久综合网| 亚洲精品一区二区精华| 午夜成人在线视频| 95精品视频在线| 久久久久久久久久久久久女国产乱| 夜夜夜精品看看| 不卡一区二区三区四区| 久久综合资源网| 日韩高清在线观看| 欧美日韩国产精品成人| 亚洲欧美精品午睡沙发| 成人aa视频在线观看| 国产丝袜欧美中文另类| 久久99精品国产.久久久久| 欧美剧情片在线观看| 亚洲精品国产a| 色哦色哦哦色天天综合| 亚洲免费观看高清完整版在线观看 | 91丝袜国产在线播放| 久久久久国产一区二区三区四区 | 91精品福利在线一区二区三区| 亚洲欧美精品午睡沙发| 91在线国产观看| 国产精品美女久久久久av爽李琼| 国产成人鲁色资源国产91色综| 精品国产免费人成在线观看| 日本中文字幕一区二区视频 | 日本国产一区二区| 自拍偷在线精品自拍偷无码专区| 成熟亚洲日本毛茸茸凸凹| 久久综合丝袜日本网| 国产乱理伦片在线观看夜一区 | 在线观看国产日韩| 亚洲午夜视频在线观看| 91福利区一区二区三区| 亚洲一级二级三级| 欧美午夜免费电影| 天堂蜜桃91精品| 欧美哺乳videos| 国产精品18久久久久| 中文字幕欧美区| 99久久免费视频.com| 亚洲精品va在线观看| 欧美午夜片在线观看| 视频一区中文字幕国产| 精品久久久久久综合日本欧美| 狠狠色丁香久久婷婷综合_中| 国产亚洲一区二区三区在线观看 | 中日韩av电影| 在线视频中文字幕一区二区| 日韩国产欧美三级| 久久综合色综合88| 91天堂素人约啪| 首页国产丝袜综合| 久久久www免费人成精品| 99久久精品国产一区| 午夜视频一区在线观看| 精品处破学生在线二十三| av亚洲精华国产精华精华| 亚洲一区二区三区四区五区中文| 欧美浪妇xxxx高跟鞋交| 国产成人精品亚洲777人妖| 亚洲精品高清在线| 欧美大白屁股肥臀xxxxxx| 成人av在线看| 蜜臀国产一区二区三区在线播放| 欧美激情一区二区在线| 欧美日本一区二区| 成人一区二区在线观看| 丝袜美腿亚洲一区二区图片| 久久精品视频网| 欧美日韩一区二区三区在线| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲综合一区二区精品导航| 久久久久国产精品麻豆ai换脸 | 成人激情动漫在线观看| 亚洲成人你懂的| 国产精品高潮呻吟| 日韩欧美不卡一区| 欧美午夜精品久久久久久超碰| 国产精品18久久久久久久网站| 石原莉奈在线亚洲三区| 亚洲免费在线播放| 欧美激情一区二区三区在线| 日韩欧美综合一区| 欧美视频一区在线观看| 99精品国产视频| 国产精品88av| 国模冰冰炮一区二区| 日韩在线观看一区二区| 一区二区免费看| 中文字幕的久久| 色婷婷综合久久久久中文| 韩国av一区二区三区| 亚洲一级在线观看| 国产精品久久久久久久久动漫| 精品国产凹凸成av人导航| 欧美少妇性性性| 成人高清伦理免费影院在线观看| 蜜桃视频免费观看一区| 亚洲国产精品久久久男人的天堂| 中文字幕不卡在线播放| 日韩欧美国产一区二区在线播放| 色狠狠色噜噜噜综合网| 成熟亚洲日本毛茸茸凸凹| 蜜桃久久久久久| 五月综合激情网| 一区二区欧美国产| 亚洲成人资源在线| 一个色综合av| 亚洲乱码日产精品bd| 中文字幕巨乱亚洲| 久久亚洲私人国产精品va媚药| 成人av电影在线观看| 国产99久久久国产精品潘金网站| 久久成人精品无人区| 三级不卡在线观看| 亚洲成a人片在线观看中文| 一区二区三区资源| 亚洲同性同志一二三专区| 国产精品久久看| 国产精品久久久久久久久搜平片| 久久九九影视网| 国产视频一区在线观看| 精品美女被调教视频大全网站| 欧美精品一区视频| 日韩精品一区二区三区三区免费| 欧美精品色一区二区三区| 欧美日韩一二三区| 在线成人av影院| 欧美精品vⅰdeose4hd| 精品国精品自拍自在线| 欧美精品一区二区久久久| 精品动漫一区二区三区在线观看| 精品国产sm最大网站免费看| 26uuu国产电影一区二区| 欧美电影一区二区| 国产欧美日韩三级| 国产精品久久久久影视| 亚洲精品中文字幕乱码三区| 一区二区三区蜜桃| 日韩福利电影在线| 成人高清在线视频| 日本丰满少妇一区二区三区| 在线观看区一区二| 欧美一区二区国产| 久久久美女毛片| 中文字幕亚洲不卡| 亚洲午夜精品网| 男女男精品视频| 国产高清久久久久| 99天天综合性| 欧美精品免费视频| 亚洲精品在线网站| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 亚洲精品视频一区二区| 丝袜亚洲另类欧美| 极品尤物av久久免费看| 色婷婷av久久久久久久| 91精品国产一区二区| 国产日韩欧美精品在线| 亚洲一区二区在线视频| 久久精品国产亚洲一区二区三区 | 欧美一区二区三区视频在线 | 国产一区二区三区精品欧美日韩一区二区三区| 国产伦精品一区二区三区在线观看| 99国内精品久久| 91麻豆精品国产| 精品人伦一区二区色婷婷| 亚洲激情av在线| 国产一区二区在线观看免费| 91福利国产精品| 26uuu精品一区二区三区四区在线| 亚洲女同ⅹxx女同tv| 美国三级日本三级久久99| 91伊人久久大香线蕉| 日韩欧美久久久| 国产精品天干天干在观线| 蜜臀av国产精品久久久久| 色老综合老女人久久久| 久久久99久久| 亚洲国产日日夜夜| 色偷偷久久一区二区三区| 久久久久久综合| 日韩高清一区在线| 欧美色网站导航| 中文字幕精品一区二区精品绿巨人| 亚洲成av人片一区二区| 91蜜桃视频在线| 国产午夜精品一区二区三区四区| 亚洲成人av福利| 国产黄色91视频| 国产精品美女久久久久久2018| 久久er99精品| 91精品欧美久久久久久动漫 |