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

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

?? uart_out.c

?? 周立功ARM Stellaris驅動庫源程序
?? 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 920 of the Stellaris Driver Library.
//
//*****************************************************************************

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

//*****************************************************************************
//
//! \addtogroup ev_lm3s811_list
//! <h1>UART (uart_out)</h1>
//!
//! This example application utilizes the UART to display text.  The first UART
//! (connected to the FTDI virtual serial port on the Stellaris LM3S811
//! Evaluation 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);

    //
    // Initialize the OLED display and write status.
    //
    OSRAMInit(false);
    OSRAMStringDraw("UART out on SER0", 0, 0);
    OSRAMStringDraw("115,200, 8-N-1", 6, 1);

    //
    // 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一区二区三区免费野_久草精品视频
婷婷久久综合九色综合绿巨人| 亚洲国产精品黑人久久久| 9色porny自拍视频一区二区| 国产一区高清在线| 久久精品999| 另类小说欧美激情| 另类欧美日韩国产在线| 精品一区二区三区欧美| 黄色资源网久久资源365| 久久国产夜色精品鲁鲁99| 免费看黄色91| 国产精品一二三| 丁香婷婷综合激情五月色| 粉嫩嫩av羞羞动漫久久久| 丁香亚洲综合激情啪啪综合| www.色精品| 欧美日韩一区成人| 欧美一二三区在线| 国产日韩欧美制服另类| 国产精品久久久久久久午夜片| 国产精品久久久久影院亚瑟| 一区二区三区四区国产精品| 午夜电影网一区| 国内精品伊人久久久久av影院 | 日本一区二区三区电影| 国产精品嫩草久久久久| 亚洲国产综合在线| 经典三级视频一区| 99久久精品国产毛片| 欧美丰满一区二区免费视频| 精品精品国产高清a毛片牛牛 | 国产亚洲欧美日韩日本| 亚洲美女精品一区| 久久精品国产一区二区三区免费看| 国产成人精品一区二区三区网站观看 | 伊人色综合久久天天人手人婷| 日韩高清不卡一区二区| 国产精品小仙女| 欧美久久一二区| 国产精品久久夜| 毛片av一区二区三区| 97超碰欧美中文字幕| 日韩欧美国产综合一区| 亚洲一区二区三区四区的| 国产一区二区三区美女| 欧美日韩久久不卡| 亚洲欧美自拍偷拍色图| 日本美女一区二区| 成人丝袜高跟foot| 精品欧美黑人一区二区三区| 国产精品久久网站| 国产一区二区三区不卡在线观看| 91成人在线免费观看| 国产欧美日本一区视频| 精品中文字幕一区二区小辣椒| 欧美三级中文字| 国产精品久久午夜夜伦鲁鲁| 精品一区二区日韩| 91精品久久久久久蜜臀| 亚洲在线视频网站| 色婷婷综合激情| 国产精品久久一级| a级精品国产片在线观看| 欧美精品一区二区三区久久久| 亚洲综合激情网| 9l国产精品久久久久麻豆| 久久精品这里都是精品| 久久福利视频一区二区| 91麻豆精品国产91久久久| 亚洲天堂精品视频| 波多野结衣中文一区| 久久久久久久久久电影| 日韩有码一区二区三区| 欧美日韩国产高清一区| 一区二区欧美精品| 欧美日韩三级一区二区| 午夜精品一区二区三区电影天堂| 色婷婷一区二区三区四区| 亚洲激情第一区| 91高清在线观看| 亚洲综合在线第一页| 欧美视频一区在线观看| 一级特黄大欧美久久久| 欧美在线观看视频在线| 亚洲一区二区欧美| 欧美日韩免费观看一区二区三区| 亚洲国产精品天堂| 91精品在线免费观看| 免费观看在线综合| 26uuu亚洲| 91亚洲资源网| 日韩成人一区二区| 国产无人区一区二区三区| 成人a级免费电影| 亚洲午夜免费福利视频| 日韩一区二区麻豆国产| 成人午夜在线视频| 亚洲国产综合人成综合网站| 欧美一区二区三区系列电影| 激情五月播播久久久精品| 中文字幕中文乱码欧美一区二区| 一本大道av伊人久久综合| 免费在线看一区| 国产精品卡一卡二| 欧美美女一区二区| 国产精品一区久久久久| 亚洲男同性恋视频| 欧美电影免费观看高清完整版在线 | 51精品视频一区二区三区| 精品制服美女久久| 亚洲视频一二区| 欧美伦理视频网站| av高清久久久| 韩国在线一区二区| 悠悠色在线精品| 精品久久久久一区二区国产| 91麻豆.com| 国产精品1区二区.| 亚洲风情在线资源站| 国产精品免费人成网站| 精品国产一区二区精华| 在线亚洲一区观看| 成人中文字幕在线| 蜜桃av一区二区| 一区二区三区四区不卡在线| 欧美精品一区二区三区蜜桃| 欧美亚洲综合另类| 成人涩涩免费视频| 国产精一区二区三区| 日韩精品一级二级 | 99精品视频一区| 麻豆91免费看| 天堂蜜桃91精品| 亚洲国产美女搞黄色| 中文字幕日本乱码精品影院| 久久久久久久一区| 欧美成人福利视频| 精品美女在线观看| 精品福利二区三区| 日韩欧美一区二区免费| 欧美电影在线免费观看| 欧美亚洲综合久久| 在线欧美日韩精品| 一本久久a久久免费精品不卡| 国产美女主播视频一区| 国产在线观看免费一区| 久久精品国产精品亚洲红杏| 日产国产欧美视频一区精品| 午夜天堂影视香蕉久久| 亚洲综合在线观看视频| 亚洲一区二区三区自拍| 欧美吻胸吃奶大尺度电影 | 日韩精品专区在线影院观看| 欧美精品18+| 欧美久久久久久蜜桃| 欧美日韩国产成人在线91| 欧美日韩一区高清| 日韩欧美国产综合在线一区二区三区| 欧美精品一卡二卡| 日韩欧美国产综合| 精品国产成人系列| 国产偷国产偷精品高清尤物| 中文字幕av一区二区三区高| 亚洲欧洲av在线| 亚洲国产成人tv| 激情图片小说一区| 高清beeg欧美| 欧美午夜电影网| 日韩三级中文字幕| 欧美国产激情一区二区三区蜜月| 中文字幕精品一区二区三区精品| 亚洲欧美另类在线| 日韩中文字幕一区二区三区| 精品亚洲成a人在线观看| 国产一区二区0| 色吧成人激情小说| 欧美大片在线观看一区| 国产精品无圣光一区二区| 综合电影一区二区三区| 奇米精品一区二区三区在线观看 | 亚洲精品第1页| 美女一区二区三区在线观看| 国产一区二三区| 欧美又粗又大又爽| 国产视频在线观看一区二区三区| 国产精品久久久久久久岛一牛影视| 亚洲高清三级视频| 国产成人午夜高潮毛片| 色综合一区二区| 久久亚洲精华国产精华液 | 7777精品久久久大香线蕉| 精品盗摄一区二区三区| 亚洲卡通欧美制服中文| 久久精品国产秦先生| 色av一区二区| 国产免费成人在线视频| 国产精品小仙女| 欧美系列日韩一区| 国产精品久久一级| 国产精品一区在线观看你懂的|