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

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

?? uart_out.c

?? Stellaris公司推出1美元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一区二区三区免费野_久草精品视频
日本精品视频一区二区三区| 中文字幕在线不卡一区| 精品一区二区影视| 91精品国产日韩91久久久久久| 精品一区二区三区影院在线午夜| 亚洲欧洲精品一区二区三区不卡 | 精品奇米国产一区二区三区| 91福利区一区二区三区| 欧美最猛黑人xxxxx猛交| 欧美视频日韩视频| 国产色91在线| 一区二区三区久久| 国产精品99精品久久免费| 日本高清免费不卡视频| 2020国产精品自拍| 一级女性全黄久久生活片免费| 久久99精品久久久| 欧美视频在线一区二区三区| 久久亚洲精精品中文字幕早川悠里| 亚洲男帅同性gay1069| 国产精品99久久久久久久女警| 欧美日韩国产综合视频在线观看| 国产精品久久久久久久久免费丝袜| 丝袜a∨在线一区二区三区不卡 | 久久蜜桃av一区二区天堂| 亚洲精品久久7777| 一本色道**综合亚洲精品蜜桃冫| 日韩午夜激情电影| 亚洲成a人v欧美综合天堂下载| 国产毛片精品一区| 亚洲精品在线一区二区| 日韩精品免费专区| 欧美人妇做爰xxxⅹ性高电影| 一区二区三区在线免费观看| av电影在线观看不卡| 国产精品你懂的| av电影在线观看完整版一区二区| 精品国精品国产| 国产乱码字幕精品高清av| 欧美精品一区二| 99国产精品一区| 亚洲成人动漫精品| 2021国产精品久久精品| 久久精工是国产品牌吗| 国产日产欧美一区二区视频| 国产精品456| 亚洲自拍偷拍欧美| 欧美一级免费大片| 99久久久久久| 一区二区三区自拍| 欧美大度的电影原声| 精品不卡在线视频| 激情综合五月天| 国产精品不卡在线观看| 欧美色中文字幕| 日韩国产欧美在线播放| 制服丝袜av成人在线看| 亚洲免费在线播放| 日韩欧美国产麻豆| eeuss影院一区二区三区| 亚洲a一区二区| 国产人伦精品一区二区| 欧美日韩精品一区视频| 国产专区综合网| 天天综合色天天综合色h| 久久精品一区二区三区四区| 色噜噜狠狠色综合中国| 国产成人亚洲综合a∨婷婷图片| 亚洲影视资源网| 欧美精品一区二区三区很污很色的| 成人免费视频国产在线观看| 婷婷国产在线综合| 一区二区视频在线| 久久九九久久九九| 欧美一个色资源| 欧美一级片免费看| 欧美肥妇free| 欧美精品高清视频| 97超碰欧美中文字幕| 精品在线免费观看| 国产一本一道久久香蕉| 久国产精品韩国三级视频| 国产精品卡一卡二| 一区二区免费在线| 国产精品视频一区二区三区不卡| 精品国产一区二区精华| 久久久久高清精品| 久久久久免费观看| 国产亚洲成aⅴ人片在线观看| 久久久91精品国产一区二区精品| 精品久久99ma| 欧美一三区三区四区免费在线看| 91精品免费观看| 精品蜜桃在线看| 欧美一区二区三区在线电影| 日韩午夜精品电影| 欧美国产禁国产网站cc| 精品国产乱码久久久久久久久| 久久久影视传媒| 亚洲人成网站色在线观看 | 久久精品一区二区三区四区| 久久久不卡网国产精品一区| 国产精品麻豆欧美日韩ww| 国产精品色眯眯| 亚洲欧美日韩国产一区二区三区 | 成人性生交大片免费看中文 | 日产国产高清一区二区三区| 蜜桃视频在线观看一区| 国产成人av一区二区三区在线观看| 91色综合久久久久婷婷| 精品国产百合女同互慰| 亚洲人成网站在线| 国产91精品在线观看| 日韩视频免费观看高清完整版| 国产欧美日韩另类一区| 免费人成精品欧美精品| 色婷婷亚洲一区二区三区| 久久亚洲一级片| 日韩激情视频网站| 欧美另类久久久品| 一区2区3区在线看| 色88888久久久久久影院野外 | 日本成人在线电影网| 色综合久久中文字幕综合网| 久久夜色精品一区| 韩国视频一区二区| 日韩欧美专区在线| 国产精品第五页| 99精品视频在线免费观看| 欧美激情一区不卡| 国产成人一区在线| 久久综合九色欧美综合狠狠| 夜夜嗨av一区二区三区四季av | 88在线观看91蜜桃国自产| 亚洲美女电影在线| 欧美在线观看一二区| 亚洲激情自拍偷拍| 不卡一区二区三区四区| 国产精品欧美极品| 99视频热这里只有精品免费| 亚洲美女少妇撒尿| 丁香婷婷综合网| 亚洲国产一二三| 欧美喷水一区二区| 国产一区美女在线| 2020日本不卡一区二区视频| 国产另类ts人妖一区二区| 国产精品国产自产拍在线| 91蝌蚪porny九色| 午夜激情综合网| 国产视频在线观看一区二区三区 | 国产精品夜夜嗨| 亚洲免费高清视频在线| 日韩欧美黄色影院| 99精品黄色片免费大全| 免费成人性网站| 亚洲精品自拍动漫在线| 欧美成人a在线| 色综合久久久久网| 国产91精品久久久久久久网曝门| 亚洲一区二区三区在线看| 亚洲欧美日韩小说| 中文幕一区二区三区久久蜜桃| 欧美老肥妇做.爰bbww| 91小视频免费观看| 成人黄色在线网站| 成人午夜免费电影| 国产91高潮流白浆在线麻豆| 日本不卡一二三| 国内精品伊人久久久久av一坑| 亚洲国产日韩精品| 亚洲国产三级在线| 亚洲成人av中文| 一区二区三区波多野结衣在线观看| 久久久美女毛片| 国产日韩欧美不卡在线| 国产欧美一区二区三区在线老狼| 久久久精品蜜桃| 久久综合狠狠综合| 国产免费久久精品| 欧美国产1区2区| 国产亚洲一本大道中文在线| 日韩欧美国产1| 国产亚洲福利社区一区| 久久久亚洲高清| 国产清纯美女被跳蛋高潮一区二区久久w | 久久精品国产一区二区三区免费看| 日韩国产欧美在线观看| 蜜臀av性久久久久av蜜臀妖精| 日韩精品三区四区| 国产成人av影院| 91亚洲精品乱码久久久久久蜜桃| 欧美色综合网站| 一区在线中文字幕| 久久国产麻豆精品| 91福利在线导航| 久久精品一级爱片| 婷婷国产v国产偷v亚洲高清| 成人一区二区三区在线观看| 欧美日本一区二区|