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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? uart_out.c

?? Stellaris Luminary Micro 系列之 EV-LM3S811 多個(gè)學(xué)習(xí)范例全都是基于 Keil 工程版的范例, 而范例內(nèi)容列舉如下: 1.BitBand 2.PWMgen3.GPI
?? 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 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 "../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);
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区在线电影| 亚洲天天做日日做天天谢日日欢| 亚洲成人中文在线| 欧美日韩一级二级| 免费一级片91| 久久久久久久国产精品影院| 成人av免费在线观看| 一区二区三区高清| 欧美久久一二区| 国产一区在线观看麻豆| 中文字幕欧美三区| 欧美日韩在线免费视频| 免费成人在线网站| 国产精品嫩草久久久久| 国产精品日韩精品欧美在线| 成人av先锋影音| 亚洲精品成人少妇| 日韩一级片在线播放| 成人精品视频.| 一区二区三区久久久| 日韩视频在线你懂得| 粉嫩欧美一区二区三区高清影视| 亚洲精品久久嫩草网站秘色| 欧美一区二区精品久久911| 国产成人精品网址| 日日摸夜夜添夜夜添精品视频| 欧美xxxxx牲另类人与| 一本大道av伊人久久综合| 美国毛片一区二区三区| 亚洲人成网站色在线观看| 日韩欧美成人午夜| 色欧美乱欧美15图片| 精品一区二区三区视频在线观看| 日韩毛片一二三区| 久久亚洲捆绑美女| 欧美精品久久天天躁| av不卡免费在线观看| 紧缚奴在线一区二区三区| 亚洲人成影院在线观看| 久久久久国产一区二区三区四区| 欧美久久久久久蜜桃| 白白色 亚洲乱淫| 九一九一国产精品| 亚洲成人福利片| 亚洲欧美另类图片小说| 久久久久久久精| 日韩一区二区免费电影| 欧美在线观看18| 成人精品免费视频| 国产一区二区看久久| 日韩中文字幕亚洲一区二区va在线| 中文字幕在线不卡| 国产亚洲欧美一区在线观看| 日韩一区二区精品| 欧美精品久久一区| 欧美日韩三级在线| 在线一区二区三区四区五区 | 91精品国产91久久综合桃花| 波多野洁衣一区| 国产精品99久久久| 国产乱子伦一区二区三区国色天香| 亚洲国产va精品久久久不卡综合| 依依成人综合视频| 亚洲另类在线制服丝袜| 中文字幕一区二区三区四区| 国产精品你懂的| 日韩一区中文字幕| 亚洲免费av高清| 一区二区三区在线影院| 亚洲视频中文字幕| 亚洲精品国产一区二区三区四区在线| 中文字幕一区二区在线观看| 亚洲欧洲一区二区在线播放| 亚洲色图欧美在线| 一区二区三区中文字幕精品精品| 亚洲免费在线观看视频| 一区二区免费在线播放| 亚洲成人免费电影| 日本一道高清亚洲日美韩| 美女一区二区三区| 国产制服丝袜一区| 成人永久免费视频| 一本大道久久a久久精二百| 在线看不卡av| 欧美精品一二三| 欧美一级xxx| 亚洲精品一区二区在线观看| 国产亚洲一区二区三区四区 | 欧美中文字幕一区| 欧美日韩国产精品成人| 日韩一区二区三区四区| 久久久亚洲国产美女国产盗摄| 国产视频一区二区在线观看| 国产精品麻豆视频| 亚洲自拍偷拍av| 久久精品国产亚洲aⅴ| 国产盗摄女厕一区二区三区| 91香蕉视频mp4| 制服丝袜av成人在线看| 久久亚洲精精品中文字幕早川悠里| 欧美激情在线一区二区三区| 一区二区三区在线视频观看58| 午夜婷婷国产麻豆精品| 国产一区在线观看麻豆| 99国产精品久久久久久久久久| 欧美日韩一区二区欧美激情| 欧美变态tickling挠脚心| 亚洲国产电影在线观看| 亚洲第一久久影院| 国产一区二区三区精品视频| 一本到不卡免费一区二区| 欧美丰满高潮xxxx喷水动漫| 精品久久一二三区| 一二三区精品福利视频| 久久99精品国产麻豆婷婷| 91蜜桃在线免费视频| 欧美zozozo| 亚洲国产精品一区二区尤物区| 国产在线视频不卡二| 欧美日韩在线精品一区二区三区激情 | 理论片日本一区| 精东粉嫩av免费一区二区三区| 91美女视频网站| 久久亚洲精精品中文字幕早川悠里| 亚洲精品伦理在线| 国产aⅴ综合色| 欧美一区二区三区播放老司机| 国产精品你懂的在线欣赏| 日本午夜一本久久久综合| 色综合中文综合网| 91精品欧美久久久久久动漫| 国产精品三级久久久久三级| 日韩高清欧美激情| 在线视频综合导航| 欧美韩日一区二区三区| 老司机精品视频导航| 欧美蜜桃一区二区三区| 中文字幕一区二区三区av| 国产麻豆成人精品| 欧美精品 日韩| 亚洲综合小说图片| 91在线视频18| 欧美国产精品中文字幕| 精品午夜久久福利影院 | 日韩精品中文字幕一区二区三区| 亚洲乱码日产精品bd | 色婷婷狠狠综合| 国产精品蜜臀av| 国产成人精品1024| 久久伊人蜜桃av一区二区| 美女mm1313爽爽久久久蜜臀| 正在播放一区二区| 亚洲国产视频一区二区| 欧美天堂亚洲电影院在线播放| 中文字幕一区二区不卡| 99麻豆久久久国产精品免费优播| 久久久久久久综合狠狠综合| 国内精品免费在线观看| 日韩一区二区免费电影| 麻豆成人av在线| 日韩精品一区二区三区在线| 美女任你摸久久| 精品久久人人做人人爰| 韩国av一区二区三区在线观看| 日韩亚洲欧美在线观看| 免费成人美女在线观看| 欧美成人a∨高清免费观看| 毛片不卡一区二区| 精品国产乱码久久久久久图片| 蜜桃一区二区三区四区| 精品国产一区二区精华| 狠狠v欧美v日韩v亚洲ⅴ| 久久伊99综合婷婷久久伊| 国产成人综合在线播放| 国产精品传媒视频| 91久久奴性调教| 性欧美大战久久久久久久久| 日韩午夜激情免费电影| 韩国女主播成人在线观看| 欧美激情一区二区三区蜜桃视频| 国产69精品久久777的优势| 国产精品国产三级国产a| 91高清视频免费看| 日本女人一区二区三区| 久久久影院官网| 高清成人免费视频| 一区二区三区蜜桃| 日韩欧美成人午夜| 播五月开心婷婷综合| 亚洲一区二区精品视频| 日韩精品自拍偷拍| 成人一区二区三区视频在线观看| 亚洲精选一二三| 精品欧美乱码久久久久久1区2区| 国产精品99久久久久久有的能看| 国产精品无圣光一区二区| 欧美色图片你懂的| 国产在线不卡一区| 一区二区成人在线| 精品少妇一区二区三区日产乱码|