亚洲欧美第一页_禁久久精品乱码_粉嫩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 "../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一区二区三区免费野_久草精品视频
日韩欧美一区在线| 天堂影院一区二区| 国产欧美一区二区三区在线看蜜臀 | 成人av综合一区| av在线综合网| 99精品视频在线免费观看| 国产成人精品1024| 成人午夜看片网址| av一区二区三区| 91丨porny丨蝌蚪视频| 91网页版在线| 欧洲视频一区二区| 欧美猛男男办公室激情| 91精品福利在线一区二区三区 | 一区在线观看免费| 亚洲欧美日韩人成在线播放| 亚洲欧洲精品成人久久奇米网| 国产精品久久久久久久久图文区| 中文字幕一区二区在线播放| 亚洲男人的天堂在线观看| 亚洲精品免费在线观看| 亚洲va天堂va国产va久| 日本成人在线一区| 狠狠狠色丁香婷婷综合激情| 成人一区在线看| 色综合欧美在线| 欧美高清视频不卡网| 欧美成人国产一区二区| 国产日产精品1区| 亚洲男同性恋视频| 天堂一区二区在线免费观看| 国产一区二区三区日韩 | 国产精品午夜久久| 洋洋成人永久网站入口| 麻豆免费精品视频| 波波电影院一区二区三区| 欧美三级在线播放| 精品精品欲导航| 亚洲免费在线视频一区 二区| 亚洲成人免费视频| 国产高清成人在线| 欧美视频一区在线观看| 亚洲精品一线二线三线无人区| 中文字幕在线不卡| 青草国产精品久久久久久| www.欧美色图| 日韩一区二区三区在线观看| 国产精品久久久久国产精品日日| 视频一区二区三区入口| 国产999精品久久久久久| 欧美系列在线观看| 久久精品夜色噜噜亚洲aⅴ| 亚洲成在人线在线播放| 国产成a人无v码亚洲福利| 欧美日韩dvd在线观看| 国产精品丝袜久久久久久app| 亚洲成人av在线电影| 成人自拍视频在线| 日韩欧美高清一区| 一区二区三区在线不卡| 国产精华液一区二区三区| 欧美久久久久久蜜桃| 亚洲视频免费在线| 国产激情一区二区三区四区| 欧美片在线播放| 亚洲丝袜另类动漫二区| av在线不卡电影| 精品国产免费一区二区三区香蕉| 亚洲精品成人天堂一二三| 国产91精品一区二区麻豆亚洲| 欧美日韩国产综合一区二区三区| 国产精品久久久久久久久久免费看| 青娱乐精品在线视频| 一本一本大道香蕉久在线精品 | 中文字幕一区二区三中文字幕| 久久精品国产网站| 欧美日韩一卡二卡三卡 | 国产福利一区二区三区| 欧美人伦禁忌dvd放荡欲情| **网站欧美大片在线观看| 韩日欧美一区二区三区| 欧美一级欧美一级在线播放| 樱花草国产18久久久久| 99这里只有久久精品视频| 国产色产综合产在线视频| 精品一区二区久久久| 在线综合+亚洲+欧美中文字幕| 亚洲午夜在线电影| 欧美亚洲一区二区在线| 一区二区在线免费观看| 99久久夜色精品国产网站| 日本一区二区电影| 国产成人一区二区精品非洲| 久久日韩粉嫩一区二区三区| 韩国视频一区二区| 精品久久久久久久久久久久久久久久久 | 99国产精品久久久久久久久久| 国产亚洲精品久| 国产超碰在线一区| 欧美国产综合一区二区| 国产精品一区二区三区乱码| 久久久精品免费网站| 国产成人在线观看| 国产精品网站在线播放| 成人高清伦理免费影院在线观看| 欧美国产精品一区| 成人av网址在线观看| **欧美大码日韩| 在线一区二区三区做爰视频网站| 亚洲与欧洲av电影| 欧美日韩久久不卡| 日本在线不卡一区| 精品日韩在线观看| 国产麻豆精品在线| 国产精品久久久久一区二区三区共| gogo大胆日本视频一区| 一区二区三区精品| 7777精品伊人久久久大香线蕉超级流畅| 日韩精品1区2区3区| 精品久久久久久久久久久久包黑料| 国产麻豆视频精品| 日韩一区中文字幕| 欧美日韩精品一区二区三区蜜桃| 奇米影视一区二区三区小说| 精品国产91洋老外米糕| 国产成人精品午夜视频免费| 国产精品久久一卡二卡| 欧洲av一区二区嗯嗯嗯啊| 成人综合婷婷国产精品久久| 国产精品国产a| 精品视频1区2区3区| 卡一卡二国产精品| 国产精品久久久久久久岛一牛影视| 色偷偷成人一区二区三区91| 五月激情六月综合| 久久久一区二区三区捆绑**| 99精品欧美一区二区蜜桃免费| 亚洲综合一二三区| 欧美一卡在线观看| 成人丝袜视频网| 午夜电影久久久| 亚洲国产激情av| 欧美日韩国产成人在线免费| 国产精品影视网| 亚洲欧美另类久久久精品2019| 91精品国产色综合久久| 风间由美一区二区三区在线观看| 亚洲与欧洲av电影| 国产丝袜美腿一区二区三区| 在线欧美日韩国产| 国产又粗又猛又爽又黄91精品| 亚洲黄色小视频| 精品99999| 欧美熟乱第一页| 福利电影一区二区| 青娱乐精品视频| 中文字幕一区二区三区av| 日韩一级视频免费观看在线| av在线不卡免费看| 国内久久婷婷综合| 亚洲成人av一区| 中文字幕精品一区二区三区精品| 亚洲精品一区二区三区影院| 99精品久久只有精品| 激情综合网av| 亚洲成人午夜影院| 日本一区二区成人| 国产91精品在线观看| 亚洲成a人v欧美综合天堂| 国产精品日产欧美久久久久| 成人免费毛片片v| 成人高清免费在线播放| 国产成人精品免费看| 国产精品18久久久久久久久| 精品一二三四区| 久久精品国产亚洲a| 麻豆精品视频在线| 激情综合色综合久久综合| 另类欧美日韩国产在线| 免费在线观看不卡| 免费成人在线播放| 久久激五月天综合精品| 麻豆久久久久久| 韩国毛片一区二区三区| 国产美女视频91| 成人短视频下载| 波多野结衣亚洲| 99riav久久精品riav| 91麻豆免费看| 欧美最猛性xxxxx直播| 欧亚洲嫩模精品一区三区| 欧美日韩在线免费视频| 欧美另类高清zo欧美| 欧美一区二区三区性视频| 日韩三区在线观看| 国产视频一区在线观看| 亚洲天堂av老司机| 亚洲成人精品在线观看| 免费一级片91| 国产成人鲁色资源国产91色综 |