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

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

?? uart_out.c

?? Stellaris Luminary Micro 系列之 DK-LM3S301 多個學習范例全都是基于 Keil 工程版的范例, 而范例內容列舉如下: 1.BitBand 2.Comparator
?? 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一区二区三区免费野_久草精品视频
成人免费毛片aaaaa**| 欧美高清视频不卡网| 在线观看一区日韩| 精品国产亚洲在线| 日日摸夜夜添夜夜添亚洲女人| 风间由美性色一区二区三区| 欧美一卡在线观看| 亚洲自拍偷拍av| 91老司机福利 在线| 久久综合成人精品亚洲另类欧美 | 欧美一区三区四区| 国产精品福利电影一区二区三区四区| 青娱乐精品视频| 日本韩国一区二区三区| 欧美国产乱子伦| 国产一区欧美一区| 精品区一区二区| 日韩激情视频网站| 国产精品三级av在线播放| 秋霞午夜av一区二区三区| 在线视频一区二区免费| 亚洲老司机在线| 99精品黄色片免费大全| 国产精品不卡一区| 99国产精品视频免费观看| 国产精品久久久久四虎| 国产成人精品一区二区三区四区| 欧美一级理论片| 日本欧美一区二区| 日韩一级黄色片| 麻豆国产91在线播放| 亚洲午夜在线视频| 91成人免费在线视频| 亚洲愉拍自拍另类高清精品| 91国偷自产一区二区开放时间 | 国产精品成人免费精品自在线观看| 国产麻豆精品theporn| 国产亚洲午夜高清国产拍精品 | 日韩欧美一级二级三级久久久| 亚洲午夜激情av| 欧美理论在线播放| 人人爽香蕉精品| 国产夜色精品一区二区av| 成人精品免费看| 亚洲欧美一区二区久久| 欧美性受极品xxxx喷水| 午夜国产精品一区| 精品蜜桃在线看| 国产99一区视频免费| 一区二区三区四区乱视频| 国产精品久久久久久久浪潮网站| eeuss鲁片一区二区三区| 亚洲男人的天堂一区二区| 日本乱人伦aⅴ精品| 日韩中文字幕区一区有砖一区 | 欧美日本一道本在线视频| 蜜臀av性久久久久蜜臀aⅴ四虎| 精品国产乱码久久久久久久久| 国产精品亚洲综合一区在线观看| 18成人在线观看| 日韩一级片网址| av午夜精品一区二区三区| 国产精品69久久久久水密桃| 国产精品久久777777| 欧美久久一二三四区| 国产伦理精品不卡| 一区二区视频在线看| 欧美成人一级视频| 99re视频精品| 国产一区二区0| 亚洲国产成人av网| 国产精品视频免费| 91精品国产一区二区| 99热在这里有精品免费| 免费欧美高清视频| 自拍av一区二区三区| 亚洲精品国产高清久久伦理二区| 欧美精品日韩综合在线| 成人三级伦理片| 老司机精品视频导航| 亚洲美女免费视频| 久久影院电视剧免费观看| 精品视频在线免费观看| 成人午夜电影网站| 另类专区欧美蜜桃臀第一页| 亚洲激情在线激情| 国产精品丝袜一区| 久久久久久免费毛片精品| 欧美日韩精品一区二区三区蜜桃| 成人动漫av在线| 欧美性生活影院| 成年人网站91| 国产不卡在线一区| 久久精品噜噜噜成人av农村| 亚洲国产成人av| 一区二区三区美女| 亚洲欧洲在线观看av| 国产欧美日韩综合| 精品国产乱码久久久久久1区2区| 欧美男女性生活在线直播观看| 91免费精品国自产拍在线不卡| 国产aⅴ精品一区二区三区色成熟| 久久精品久久99精品久久| 亚洲高清免费视频| 一区二区三区在线视频免费| 麻豆精品一二三| 婷婷一区二区三区| 日日噜噜夜夜狠狠视频欧美人| 一区二区日韩av| 亚洲精品中文字幕在线观看| 国产视频一区不卡| 国产亚洲成aⅴ人片在线观看| 精品少妇一区二区三区视频免付费| 欧美情侣在线播放| 日韩无一区二区| 日韩你懂的电影在线观看| 欧美tickling网站挠脚心| 欧美精品18+| 在线播放中文字幕一区| 777久久久精品| 亚洲免费观看高清完整版在线| 国产精品久久一级| 国产精品久久久久久亚洲毛片 | 免费在线观看一区二区三区| 天天色综合成人网| 久久99精品久久久久婷婷| 乱一区二区av| 不卡在线视频中文字幕| 91亚洲精品乱码久久久久久蜜桃| 99久久久免费精品国产一区二区| 日本道免费精品一区二区三区| 欧美亚洲国产一区二区三区| 日韩伦理av电影| 亚洲另类在线制服丝袜| 日日夜夜精品视频免费| 精品一区二区三区的国产在线播放 | 国产欧美日本一区视频| 国产精品久久久久影院老司| 亚洲最大的成人av| 久久精品国产亚洲a| 福利视频网站一区二区三区| 91在线丨porny丨国产| 欧美日韩成人综合| 久久久一区二区三区捆绑**| 综合久久国产九一剧情麻豆| 亚洲aaa精品| 欧美军同video69gay| 久久免费午夜影院| 亚洲一区二区视频在线观看| 久久99国产精品免费| 成av人片一区二区| 91精品欧美一区二区三区综合在| 国产欧美一区二区三区在线老狼 | 欧美国产精品专区| 亚洲国产一区二区三区青草影视| 国产真实乱偷精品视频免| 色天天综合色天天久久| 精品国产乱码久久久久久图片| 亚洲欧洲日本在线| 久久99热国产| 欧美日韩成人高清| 中文字幕制服丝袜成人av| 成人一区二区视频| 日韩午夜在线播放| 亚洲精品欧美激情| 国产成人精品一区二| 欧美一区二区三区免费视频| 日韩毛片精品高清免费| 国产精品影音先锋| 555夜色666亚洲国产免| 亚洲精品乱码久久久久久| 国产成人综合在线观看| 日韩一二三区视频| 亚洲国产一区二区在线播放| 91色婷婷久久久久合中文| 久久久高清一区二区三区| 奇米综合一区二区三区精品视频| 91免费精品国自产拍在线不卡| 国产欧美精品一区二区色综合朱莉| 国产精品自拍毛片| 日韩情涩欧美日韩视频| 亚洲不卡一区二区三区| 色婷婷av一区二区三区大白胸 | 久久久噜噜噜久久中文字幕色伊伊| 亚洲一区二区三区四区五区中文| 国产成人在线视频免费播放| 欧美刺激午夜性久久久久久久| 视频精品一区二区| 欧美性猛片aaaaaaa做受| 亚洲男同性视频| 99国产精品99久久久久久| 中文字幕一区av| 99精品视频在线观看免费| 亚洲欧美一区二区三区国产精品 | 精品中文字幕一区二区| 日韩一区二区在线看| 日韩电影一区二区三区| 欧美日韩不卡一区二区| 日日摸夜夜添夜夜添亚洲女人| 欧美人牲a欧美精品|