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

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

?? uart_out.c

?? Stellaris Luminary Micro 系列之 DK-LM3S102 多個學(xué)習(xí)范例全都是基于 Keil 工程版的范例, 而范例內(nèi)容列舉如下: 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);
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费欧美高清视频| 在线一区二区三区做爰视频网站| 国产**成人网毛片九色| 在线亚洲高清视频| 国产精品每日更新在线播放网址| 日本大胆欧美人术艺术动态| 91免费看片在线观看| 精品精品国产高清一毛片一天堂| 欧美国产精品一区| 久久99久久99| 91精品国产91综合久久蜜臀| 亚洲日本乱码在线观看| 国产黄色成人av| 精品国产污污免费网站入口 | 成人ar影院免费观看视频| 91精品国产麻豆国产自产在线 | 久久国产精品99精品国产| 91久久香蕉国产日韩欧美9色| 亚洲国产精品激情在线观看| 精品在线一区二区三区| 91精品国产91综合久久蜜臀| 亚洲午夜精品在线| 欧美在线观看一二区| 亚洲人成人一区二区在线观看| 国产精品系列在线观看| 久久综合网色—综合色88| 美女任你摸久久| 欧美一区二区视频免费观看| 午夜电影一区二区| 91精品国产麻豆| 日韩电影在线看| 欧美性一级生活| 国产美女一区二区| 亚洲视频在线观看一区| 亚洲综合久久av| 欧美疯狂性受xxxxx喷水图片| 国产成人免费高清| 天堂久久一区二区三区| 国产精品网站一区| 欧美一激情一区二区三区| av电影在线观看完整版一区二区| 免费日本视频一区| 亚洲激情第一区| 国产日本欧美一区二区| 7777女厕盗摄久久久| 99精品一区二区| 丁香网亚洲国际| 美国毛片一区二区| 亚洲一区二区欧美| 中文字幕在线观看一区二区| 久久久欧美精品sm网站| 欧美精品久久天天躁| 色偷偷久久人人79超碰人人澡| 国产一区二区三区日韩| 久久精品国产久精国产爱| 亚洲一区二区三区四区在线免费观看 | 欧美一区二区三区视频免费播放| 94色蜜桃网一区二区三区| 国产91丝袜在线观看| 狠狠狠色丁香婷婷综合久久五月| 亚洲成av人片观看| 一区二区高清视频在线观看| 国产精品美女一区二区在线观看| 精品国产99国产精品| 日韩女优视频免费观看| 精品1区2区3区| 在线看国产一区| 色吧成人激情小说| 一本色道亚洲精品aⅴ| 99久久精品久久久久久清纯| 成人美女在线观看| 波多野结衣91| 99久久婷婷国产综合精品| 成人一区二区三区视频在线观看| 国产精品综合在线视频| 国产成人精品一区二| 国产精品一二一区| 国产精品亚洲专一区二区三区| 激情小说欧美图片| 国产精品18久久久久久久网站| 激情五月婷婷综合网| 国产精品99久久久久久似苏梦涵| 韩国精品久久久| 国产一区二区在线免费观看| 国产在线麻豆精品观看| 成人午夜又粗又硬又大| av电影天堂一区二区在线观看| 97久久超碰国产精品| 欧美在线观看视频在线| 欧美一区二区三区喷汁尤物| 精品精品欲导航| 中文字幕免费在线观看视频一区| 国产精品久久久久久久久免费桃花| 国产精品看片你懂得| 一区二区三区产品免费精品久久75| 又紧又大又爽精品一区二区| 亚洲成a人片在线观看中文| 日本一道高清亚洲日美韩| 国产乱子轮精品视频| 91亚洲精品一区二区乱码| 欧美欧美欧美欧美首页| 精品国产91乱码一区二区三区| 国产精品视频看| 亚洲电影在线播放| 精品一区二区三区av| 暴力调教一区二区三区| 欧美日韩电影在线| 久久尤物电影视频在线观看| 亚洲天堂2014| 日韩专区欧美专区| 国产成人av电影免费在线观看| 色噜噜狠狠色综合中国| 日韩三区在线观看| 国产精品不卡一区| 日日夜夜一区二区| 成人教育av在线| 欧美一二三在线| 亚洲视频在线一区观看| 蜜桃久久av一区| 色综合天天做天天爱| 日韩免费高清av| 依依成人综合视频| 国产剧情在线观看一区二区| 欧美亚洲自拍偷拍| 久久精品人人做人人爽人人| 一区二区三区在线影院| 国产乱子伦视频一区二区三区| 91久久线看在观草草青青| 久久免费精品国产久精品久久久久| 亚洲六月丁香色婷婷综合久久 | 懂色中文一区二区在线播放| 欧美三级午夜理伦三级中视频| 久久久国产精品午夜一区ai换脸| 午夜精品福利久久久| va亚洲va日韩不卡在线观看| 精品国产a毛片| 午夜精品一区二区三区免费视频| 高清不卡一二三区| 日韩欧美不卡一区| 午夜精品久久久久久久蜜桃app| 成人久久视频在线观看| 精品国产乱码久久久久久牛牛 | 欧美精品一区二区三区久久久| 亚洲一区二区视频| 国产**成人网毛片九色| 精品日韩欧美在线| 免费成人在线播放| 欧美日韩国产一级片| 一区二区三区精密机械公司| 成人一级片网址| 精品国产一二三| 免费观看久久久4p| 欧美精品成人一区二区三区四区| 中文字幕亚洲区| 成人黄色小视频| 亚洲国产精品ⅴa在线观看| 国产一区二区三区香蕉| 精品国免费一区二区三区| 老汉av免费一区二区三区| 欧美女孩性生活视频| 午夜精品福利在线| 欧美日韩免费观看一区二区三区| 亚洲精品成人精品456| 99精品国产91久久久久久| 综合中文字幕亚洲| 99久久国产综合精品女不卡| 亚洲欧美在线另类| 9i在线看片成人免费| 国产精品精品国产色婷婷| 成人h动漫精品一区二区| 亚洲天堂2014| 欧美主播一区二区三区美女| 一区二区三区免费在线观看| 欧洲生活片亚洲生活在线观看| 亚洲一区二区三区在线| 欧美男男青年gay1069videost| 三级影片在线观看欧美日韩一区二区 | 国产精品视频你懂的| 99久久综合国产精品| 亚洲精品视频在线观看网站| 色综合一个色综合亚洲| 五月婷婷综合在线| 日韩精品专区在线| 国产成人免费视频网站高清观看视频| 国产日韩精品视频一区| 99热国产精品| 亚洲va韩国va欧美va| 日韩午夜精品视频| 国产精品白丝jk白祙喷水网站| 国产精品美女久久久久久2018| 91理论电影在线观看| 亚洲第一二三四区| 精品久久久久一区| av在线不卡网| 午夜av区久久| 2021久久国产精品不只是精品| av在线不卡网| 日韩精品电影一区亚洲| 久久九九久久九九| 欧美性高清videossexo|