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

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

?? uart_out.c

?? Stellaris Luminary Micro 系列之 DK-LM3S101 多個學習范例全都是基于 Keil 工程版的范例, 附 LM3S101_Kit 原理圖,而范例內容列舉如下: 1.Bit
?? 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 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);
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内久久婷婷综合| 亚洲成人激情社区| 国产精品一色哟哟哟| 26uuu欧美| 国产suv一区二区三区88区| 国产三级精品三级在线专区| 成人激情午夜影院| 亚洲视频在线一区| 欧美色网站导航| 日产国产欧美视频一区精品| 久久综合色婷婷| 成人黄色a**站在线观看| 亚洲免费观看高清完整版在线观看 | 国产精品亚洲综合一区在线观看| 久久久99免费| 欧美刺激脚交jootjob| 美女性感视频久久| 国产日韩欧美高清| 欧美亚洲国产一卡| 国产精品香蕉一区二区三区| 亚洲区小说区图片区qvod| 欧美日韩成人一区二区| 国产在线精品免费av| 亚洲精品乱码久久久久久黑人| 欧美日韩免费电影| 国产精品乡下勾搭老头1| 亚洲一区在线看| 亚洲精品在线一区二区| 日本韩国一区二区| 精品一二线国产| 亚洲欧美日韩久久| 337p日本欧洲亚洲大胆精品| 色视频一区二区| 国产麻豆午夜三级精品| 一区二区三区免费在线观看| 精品国精品自拍自在线| 欧美午夜影院一区| 成人av影院在线| 久久国内精品自在自线400部| 亚洲欧洲三级电影| 欧美成人bangbros| 欧美日本高清视频在线观看| av亚洲精华国产精华精| 麻豆精品一二三| 亚洲电影激情视频网站| 中文字幕佐山爱一区二区免费| 欧美成人vps| 欧美丰满少妇xxxbbb| 色哟哟一区二区| 成人免费视频视频| 国产在线精品一区二区三区不卡| 亚洲mv大片欧洲mv大片精品| 亚洲色图视频网| 国产日韩欧美a| 精品福利一二区| 日韩一区二区三区视频在线观看| 91福利精品第一导航| av电影在线不卡| 国产盗摄一区二区三区| 激情综合五月天| 日本不卡中文字幕| 五月激情六月综合| 亚洲综合色成人| 亚洲一区在线视频观看| 亚洲免费观看在线观看| 亚洲另类中文字| 亚洲精品高清在线| 亚洲男人的天堂网| 亚洲欧美一区二区三区极速播放| 国产精品视频你懂的| 国产午夜亚洲精品羞羞网站| 精品第一国产综合精品aⅴ| 欧美一卡在线观看| 日韩精品综合一本久道在线视频| 欧美女孩性生活视频| 欧美日韩成人一区| 91精品国产91久久综合桃花| 欧美乱妇23p| 这里只有精品99re| 欧美一级久久久久久久大片| 91精品国产一区二区三区蜜臀| 欧美一区二区在线播放| 日韩欧美一卡二卡| 精品国产凹凸成av人网站| 精品国产乱码久久久久久牛牛 | 欧美日韩中文字幕一区二区| 色爱区综合激月婷婷| 在线观看视频一区二区 | 成人中文字幕在线| 成人一级片在线观看| 成人激情开心网| 在线亚洲一区二区| 欧美午夜影院一区| 精品日韩av一区二区| 久久久久免费观看| 亚洲欧美日韩一区二区| 亚洲成人手机在线| 国模无码大尺度一区二区三区| 丁香亚洲综合激情啪啪综合| 91啪在线观看| 666欧美在线视频| 久久久精品影视| 亚洲免费在线看| 男男视频亚洲欧美| 国产99精品国产| 欧美三级蜜桃2在线观看| 日韩欧美一区在线观看| 亚洲国产精品传媒在线观看| 亚洲国产色一区| 乱一区二区av| 色又黄又爽网站www久久| 日韩欧美在线网站| 亚洲视频综合在线| 久久精品噜噜噜成人88aⅴ| 成人丝袜视频网| 欧美麻豆精品久久久久久| 国产色爱av资源综合区| 亚洲国产视频a| 丁香啪啪综合成人亚洲小说| 欧美性受极品xxxx喷水| 欧美tickle裸体挠脚心vk| 亚洲另类一区二区| 国产一区二区三区不卡在线观看| 在线这里只有精品| 国产人妖乱国产精品人妖| 午夜免费欧美电影| av电影在线观看一区| 欧美成人精品福利| 一区二区在线看| 国产成人精品三级麻豆| 欧美乱妇23p| 玉米视频成人免费看| 粉嫩绯色av一区二区在线观看| 欧美一区日本一区韩国一区| 亚洲精品久久7777| 国产suv精品一区二区三区| 日韩色视频在线观看| 夜色激情一区二区| 成人av手机在线观看| 26uuu国产电影一区二区| 视频一区中文字幕| 欧美亚洲一区二区在线观看| 日本一区二区成人在线| 精品一二三四在线| 日韩精品一区二区三区在线播放| 亚洲一二三区在线观看| 不卡av免费在线观看| 国产欧美精品一区二区色综合朱莉 | 99久久国产综合色|国产精品| 日韩视频不卡中文| 日韩av二区在线播放| 欧美日韩亚洲综合在线| 国产精品久久久久久久久免费相片| 美日韩一区二区| 91精品国产色综合久久不卡电影| 亚洲风情在线资源站| 91网站在线播放| 亚洲精品网站在线观看| 99国产精品视频免费观看| 中文字幕精品一区二区精品绿巨人 | 顶级嫩模精品视频在线看| 337p粉嫩大胆色噜噜噜噜亚洲| 蜜桃传媒麻豆第一区在线观看| 在线观看91av| 日本欧美在线观看| 欧美一区二区精品久久911| 日韩av不卡一区二区| 欧美一区二区播放| 精品中文字幕一区二区| 欧美va亚洲va| 国产乱理伦片在线观看夜一区| 欧美tk—视频vk| 国产成人丝袜美腿| 国产精品免费av| av不卡在线播放| 亚洲欧美国产毛片在线| 欧美性做爰猛烈叫床潮| 三级亚洲高清视频| 日韩免费性生活视频播放| 激情六月婷婷久久| 国产欧美日韩三级| 99久久久久久| 一个色在线综合| 91精品国产综合久久福利软件| 美女尤物国产一区| 久久―日本道色综合久久| 国产sm精品调教视频网站| 亚洲欧美日韩国产一区二区三区| 91福利视频在线| 秋霞av亚洲一区二区三| 久久这里都是精品| av一二三不卡影片| 天天综合网天天综合色| 精品国产乱码久久久久久老虎| 国产九色sp调教91| 亚洲人精品一区| 欧美精品在线视频| 国产激情精品久久久第一区二区| 最近日韩中文字幕| 欧美一二三区在线观看|