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

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

?? uart_out.c

?? Stellaris Luminary Micro 系列之 DK-LM3S828 多個(gè)學(xué)習(xí)范例全都是基于 Keil 工程版的范例, 而范例內(nèi)容列舉如下: 1.BitBand 2.I2C_Atmel 3
?? C
字號(hào):
//*****************************************************************************
//
// 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
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青草精品视频| 亚洲18影院在线观看| 麻豆精品国产传媒mv男同| 一本色道久久综合亚洲91| 2020国产精品| 日韩国产高清影视| 欧美亚洲图片小说| 中文字幕一区二区三区乱码在线| 欧美男生操女生| 国产精品国产三级国产有无不卡 | 国产精品全国免费观看高清 | 日韩国产欧美在线观看| 色先锋aa成人| 国产精品免费人成网站| 久久99国产精品久久99果冻传媒| 欧美午夜精品久久久久久孕妇 | 久久蜜桃一区二区| 免费一级欧美片在线观看| 欧美性大战xxxxx久久久| 综合久久综合久久| 国产99久久久国产精品免费看| 欧美电影免费观看高清完整版在线观看 | 日韩女优av电影| 日韩中文字幕一区二区三区| 欧美中文字幕不卡| 亚洲精品成人在线| 91色九色蝌蚪| 亚洲免费av高清| 色综合色综合色综合色综合色综合| 国产精品青草久久| 成人高清视频免费观看| 日本一区二区动态图| 国产成人免费在线| 久久蜜臀中文字幕| 国产精品亚洲人在线观看| 久久这里只有精品6| 国产一区三区三区| 亚洲精品一区二区三区蜜桃下载| 极品美女销魂一区二区三区免费| 欧美大尺度电影在线| 精品亚洲aⅴ乱码一区二区三区| 欧美一区二区三区不卡| 美女一区二区在线观看| 日韩欧美国产1| 激情欧美日韩一区二区| 久久一区二区视频| 国产一区在线观看麻豆| 国产色91在线| 国产91丝袜在线播放| 国产精品美女久久久久aⅴ | 激情综合五月天| 欧美成人a在线| 国产老妇另类xxxxx| 中文字幕成人网| 91老师国产黑色丝袜在线| 亚洲一区在线观看免费观看电影高清| 一区二区三区中文字幕在线观看| 日本乱码高清不卡字幕| 亚洲高清不卡在线| 欧美一区二区三区不卡| 精品一区二区三区免费播放| 久久精品水蜜桃av综合天堂| 国产sm精品调教视频网站| 中文字幕一区二区视频| 欧美亚洲国产bt| 首页亚洲欧美制服丝腿| 在线不卡欧美精品一区二区三区| 免费人成精品欧美精品| 久久影院午夜片一区| 99精品一区二区| 午夜视黄欧洲亚洲| 久久亚洲一级片| 97精品久久久午夜一区二区三区| 亚洲一区视频在线| 欧美va日韩va| 国产麻豆精品久久一二三| 亚洲婷婷国产精品电影人久久| 欧美综合天天夜夜久久| 青青草国产成人av片免费| 国产色91在线| 欧美色图第一页| 国内国产精品久久| 亚洲视频一区二区在线观看| 91精品久久久久久久99蜜桃| 国产精品996| 亚洲国产精品一区二区久久| 精品对白一区国产伦| 色哟哟一区二区三区| 久久av资源网| 一区二区三区四区不卡在线| 欧美成人一区二区| 91啪在线观看| 九九九久久久精品| 亚洲综合免费观看高清完整版在线 | 成人激情小说乱人伦| 日日夜夜精品视频免费| 中文字幕二三区不卡| 7777精品伊人久久久大香线蕉完整版 | 91成人在线精品| 国内精品嫩模私拍在线| 夜夜嗨av一区二区三区网页| 久久亚洲欧美国产精品乐播 | 国产999精品久久久久久| 亚洲国产欧美另类丝袜| 国产人成一区二区三区影院| 欧美性极品少妇| 国产成人精品免费网站| 日韩在线一区二区三区| 国产精品国产三级国产普通话99 | 成人精品国产免费网站| 日本成人在线不卡视频| 亚洲少妇30p| 久久亚区不卡日本| 欧美人与z0zoxxxx视频| 99re这里都是精品| 国产精品亚洲午夜一区二区三区| 日日夜夜一区二区| 亚洲人精品午夜| 久久久久国产精品麻豆| 欧美一区二区三级| 欧美这里有精品| 91一区二区三区在线观看| 国产精品一区二区黑丝| 日韩高清不卡在线| 亚洲成人三级小说| 亚洲码国产岛国毛片在线| 国产三级欧美三级日产三级99 | 91国产丝袜在线播放| 丁香婷婷综合激情五月色| 美国欧美日韩国产在线播放| 亚洲国产中文字幕在线视频综合| 国产精品久久久久久一区二区三区| 欧美刺激脚交jootjob| 7777精品伊人久久久大香线蕉经典版下载 | 亚洲视频在线观看一区| 欧美国产精品专区| 久久精品日韩一区二区三区| 日韩免费观看高清完整版| 91精品国产福利在线观看| 欧美日韩一区二区不卡| 91久久精品一区二区三| 91在线丨porny丨国产| 99这里只有久久精品视频| 国产91露脸合集magnet | 五月天丁香久久| 午夜精品久久一牛影视| 性欧美疯狂xxxxbbbb| 亚洲第一成年网| 亚洲电影一级黄| 婷婷久久综合九色国产成人| 亚洲成av人综合在线观看| 亚洲成人免费看| 同产精品九九九| 日韩av在线免费观看不卡| 日本在线不卡一区| 蜜桃视频免费观看一区| 经典三级在线一区| 国产高清不卡二三区| 国产sm精品调教视频网站| 成人av资源网站| 一本色道久久综合亚洲91| 欧美在线看片a免费观看| 欧美日韩国产免费一区二区 | 国产不卡一区视频| 成人午夜短视频| 91色在线porny| 欧美日韩一区二区电影| 91精品国产综合久久精品 | 一本到不卡精品视频在线观看| 色综合久久66| 精品视频免费看| 日韩欧美在线综合网| 国产亚洲综合在线| 国产精品久久久久久久久动漫| 伊人婷婷欧美激情| 五月婷婷久久综合| 精品一区二区三区视频在线观看| 国产精品系列在线播放| 日本一区二区久久| 亚洲色欲色欲www在线观看| 亚洲第一在线综合网站| 蜜臀av一区二区| 国产盗摄视频一区二区三区| 99久久国产综合精品麻豆| 欧美性受xxxx| 日韩欧美国产午夜精品| 国产欧美日本一区二区三区| 一区在线观看视频| 性感美女极品91精品| 狠狠色综合日日| 99久久国产综合精品麻豆| 日韩av一区二区三区| 韩国成人精品a∨在线观看| 国产乱人伦偷精品视频免下载| 成人久久18免费网站麻豆| 91成人免费在线视频| 日韩欧美视频在线| 自拍偷在线精品自拍偷无码专区| 午夜视频一区在线观看| 丁香婷婷综合色啪|