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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? uart_out.c

?? Stellaris Luminary Micro 系列之 DK-LM3S316 多個(gè)學(xué)習(xí)范例全都是基于 Keil 工程版的范例, 而范例內(nèi)容列舉如下: 1.BitBand 2.Comparator
?? 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 618 of the Stellaris Driver Library.
//
//*****************************************************************************

#include <string.h>
#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 examples_list
//! <h1>UART (uart_out)</h1>
//!
//! This example application utilizes the UART to display text.  The first UART
//! (the SER0 connector on the Stellaris 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, strlen((const char *)g_pucString));
    }
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲地区一二三色| 国产精品原创巨作av| 91色在线porny| 亚洲美女在线国产| 91久久精品一区二区| 一区二区三区久久久| 欧美影院一区二区三区| 日韩黄色一级片| 精品毛片乱码1区2区3区| 国产黄人亚洲片| 最新国产精品久久精品| 盗摄精品av一区二区三区| 亚洲免费视频成人| 国产女人水真多18毛片18精品视频| 99久久久免费精品国产一区二区 | 久久夜色精品一区| 成人午夜视频免费看| 日本午夜一区二区| 国产拍揄自揄精品视频麻豆| 日韩欧美成人午夜| www.性欧美| 日精品一区二区| 亚洲最色的网站| 亚洲视频综合在线| 欧美激情一二三区| 欧美午夜精品久久久久久超碰 | 欧美丝袜自拍制服另类| 波多野结衣中文字幕一区二区三区| 亚洲国产一区二区三区| 久久综合久久综合久久| 91精品在线一区二区| 99久久99久久精品免费看蜜桃| 国产在线看一区| 亚洲一区在线观看视频| 国产免费久久精品| 国产欧美一区二区三区网站 | 欧美sm美女调教| 欧美mv日韩mv国产| 久久婷婷久久一区二区三区| 精品少妇一区二区三区视频免付费 | 麻豆久久一区二区| 亚洲美女精品一区| 一区二区三区蜜桃| 五月综合激情网| 国产精品理伦片| 欧美va在线播放| 久久久午夜电影| 制服丝袜亚洲网站| 日韩欧美国产三级| 精品成人一区二区三区| 欧美美女bb生活片| 色欧美片视频在线观看在线视频| 国产福利91精品一区| 成人毛片老司机大片| 日本韩国一区二区| 欧美日韩国产a| 欧洲一区在线电影| 色天天综合色天天久久| 欧美日韩黄视频| 欧美一区二区在线免费播放| 欧美午夜精品理论片a级按摩| 欧美日韩美少妇| 久久综合久久综合亚洲| 中文字幕亚洲精品在线观看| 依依成人综合视频| 亚洲精品美国一| 日产精品久久久久久久性色| 久久aⅴ国产欧美74aaa| 美女视频黄久久| 成人黄色电影在线 | 久久精品人人爽人人爽| 欧美一区二区三区爱爱| 国产亚洲成年网址在线观看| 亚洲日本va午夜在线影院| 午夜电影一区二区三区| 国产精品综合一区二区| 色综合天天综合| 在线视频观看一区| 欧美刺激午夜性久久久久久久| 久久精品无码一区二区三区| 亚洲美女淫视频| 久久精品国产**网站演员| 99精品视频在线观看| 日韩女优视频免费观看| 亚洲天天做日日做天天谢日日欢| 视频精品一区二区| 粉嫩嫩av羞羞动漫久久久| 成人免费va视频| 欧美日韩国产高清一区| 欧美激情艳妇裸体舞| 日日摸夜夜添夜夜添精品视频| 成人免费黄色在线| 日韩精品一区国产麻豆| 一区二区欧美精品| 懂色av一区二区在线播放| 欧美一区二区人人喊爽| 亚洲精品日韩一| 国产不卡视频在线观看| 欧美一区二区三区免费在线看| 国产精品妹子av| 亚洲精品国产一区二区精华液 | 中文文精品字幕一区二区| 视频一区在线播放| 99久精品国产| 国产亚洲欧美色| 日韩国产一二三区| 一道本成人在线| 中文字幕精品综合| 精品亚洲国内自在自线福利| 国产精品一区在线观看你懂的| 欧美日韩一级片在线观看| 精品精品欲导航| 亚洲成va人在线观看| 色欧美88888久久久久久影院| 欧美国产一区二区在线观看| 美女一区二区三区在线观看| 欧美日韩国产影片| 一区二区三区久久久| 91蝌蚪porny| 国产精品入口麻豆原神| 国产电影一区二区三区| 精品欧美久久久| 一区二区三区蜜桃| 日韩三级视频中文字幕| 久久久久免费观看| 欧美激情综合五月色丁香小说| 国产馆精品极品| 9i看片成人免费高清| 在线看国产一区二区| 亚洲天堂av一区| 91女人视频在线观看| 椎名由奈av一区二区三区| av影院午夜一区| 亚洲人成网站影音先锋播放| 粗大黑人巨茎大战欧美成人| 中文一区二区完整视频在线观看| 国产不卡视频在线播放| 中文字幕精品一区二区精品绿巨人| 国产一区二区三区黄视频 | 亚洲在线免费播放| 色琪琪一区二区三区亚洲区| 亚洲日本va在线观看| 色综合天天综合在线视频| 亚洲激情在线播放| 精品视频色一区| 日本女优在线视频一区二区| 91丝袜呻吟高潮美腿白嫩在线观看| 色噜噜狠狠一区二区三区果冻| 精品久久久久久久久久久久包黑料 | 日韩精品电影在线| 日韩一区二区三区电影在线观看| 青青草国产成人av片免费| 国产高清精品网站| 中文字幕 久热精品 视频在线 | 国产欧美一区二区三区在线老狼| 福利电影一区二区| 一区二区中文字幕在线| 在线视频综合导航| 日韩avvvv在线播放| 久久综合色婷婷| 99久久精品国产麻豆演员表| 亚洲国产一区视频| 欧美成人性战久久| av在线不卡电影| 亚洲第一搞黄网站| 久久久久亚洲综合| 色香蕉久久蜜桃| 日本视频中文字幕一区二区三区| 欧美成人性战久久| 91在线观看成人| 日本vs亚洲vs韩国一区三区二区 | 欧美成人r级一区二区三区| 懂色av一区二区三区免费观看| 亚洲精品大片www| 欧美mv日韩mv亚洲| 一本色道久久加勒比精品| 日韩av一二三| 国产精品久久久久久久久图文区| 色婷婷综合在线| 国产综合成人久久大片91| 亚洲精品国产品国语在线app| 91精品国产91久久久久久最新毛片 | 久久9热精品视频| 自拍视频在线观看一区二区| 欧美一区二区久久| 91老司机福利 在线| 国内精品久久久久影院色| 亚洲欧洲中文日韩久久av乱码| 精品国产免费人成在线观看| 欧美做爰猛烈大尺度电影无法无天| 国内成人免费视频| 香蕉影视欧美成人| 亚洲欧洲韩国日本视频| 精品卡一卡二卡三卡四在线| 欧美综合色免费| av激情综合网| 国产一区二区三区免费| 日韩高清一区在线| 亚洲午夜在线视频| 国产精品卡一卡二|