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

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

?? uart_out.c

?? Stellaris Luminary Micro 系列之 DK-LM3S811 多個學習范例全都是基于 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一区二区三区免费野_久草精品视频
久久久国产一区二区三区四区小说 | 亚洲国产欧美在线| 欧美精品在线观看播放| 国产麻豆精品在线观看| 午夜精品爽啪视频| 综合久久久久久久| 国产欧美精品区一区二区三区 | 欧美成人vps| 欧美男男青年gay1069videost| av资源网一区| 成人激情动漫在线观看| 国产在线国偷精品产拍免费yy| 五月婷婷综合网| 一区二区三区色| 国产精品卡一卡二| 国产精品久久夜| 欧美激情艳妇裸体舞| 精品国精品自拍自在线| 日韩一区二区三区高清免费看看| 欧美日韩国产美女| 欧美在线影院一区二区| 色中色一区二区| 欧美自拍丝袜亚洲| 欧美亚洲禁片免费| 欧美日韩久久久一区| 欧美三级在线看| 欧美亚洲免费在线一区| 欧美视频日韩视频在线观看| 91成人在线精品| 精品视频999| 在线播放国产精品二区一二区四区| 日本高清视频一区二区| 在线观看亚洲精品| 国产福利精品一区二区| 成人av免费网站| 不卡在线视频中文字幕| 91免费版在线看| 丁香婷婷综合色啪| 91麻豆高清视频| 国产a级毛片一区| 99视频一区二区三区| 国产丶欧美丶日本不卡视频| 成人黄色大片在线观看| 99国产欧美另类久久久精品| 成人黄色在线网站| 在线亚洲高清视频| 日韩视频一区二区在线观看| 国产日产欧美一区| 亚洲精品视频在线| 日韩国产欧美三级| 风间由美中文字幕在线看视频国产欧美| av一二三不卡影片| 91福利视频在线| 精品对白一区国产伦| 成人欧美一区二区三区1314 | 久久久国产精品午夜一区ai换脸| 欧美午夜不卡在线观看免费| 欧美一级精品大片| 欧美大片一区二区| 亚洲妇熟xx妇色黄| 成人av网站免费| 日韩免费观看高清完整版在线观看| 亚洲欧美日本韩国| 成人av综合一区| 欧美—级在线免费片| 韩国精品免费视频| 精品国产免费人成在线观看| 日韩不卡一二三区| 欧美日韩一区三区| 亚洲成人av免费| 欧美日韩一卡二卡三卡| 亚洲精品欧美综合四区| 99re66热这里只有精品3直播| 国产网红主播福利一区二区| 国内外成人在线| 久久综合99re88久久爱| 激情文学综合插| 亚洲精品一区在线观看| 国产在线精品一区二区三区不卡| 欧美精品一区二区三区一线天视频| 日韩激情av在线| 日韩西西人体444www| 日本一道高清亚洲日美韩| 欧美久久一区二区| 免费成人在线观看视频| 精品日本一线二线三线不卡| 国内国产精品久久| 久久精品男人天堂av| 成人精品gif动图一区| 国产精品久久午夜| 91电影在线观看| 日日夜夜免费精品视频| 欧美va亚洲va在线观看蝴蝶网| 精品中文字幕一区二区小辣椒| 亚洲精品在线免费观看视频| 成人免费毛片片v| 亚洲男同1069视频| 欧美一个色资源| 高清不卡在线观看av| 亚洲日本va午夜在线电影| 欧美日韩国产精品成人| 国产在线不卡一区| 亚洲视频狠狠干| 91精品国产日韩91久久久久久| 久久国产尿小便嘘嘘| 国产精品国产三级国产有无不卡| 欧美专区在线观看一区| 精品一区二区三区蜜桃| 亚洲少妇30p| 欧美不卡一二三| 97久久精品人人做人人爽50路| 午夜欧美视频在线观看| 国产日韩欧美精品一区| 欧美色视频在线| 国产成人在线视频播放| 亚洲第一av色| 国产精品天美传媒| 日韩视频一区二区三区在线播放| 成人av午夜影院| 久久国产婷婷国产香蕉| 一卡二卡三卡日韩欧美| 国产午夜亚洲精品理论片色戒| 欧美日韩亚洲综合一区二区三区| 国产精一品亚洲二区在线视频| 性久久久久久久久| 国产精品久久久久久久第一福利| 欧美一区二区三区视频在线 | 亚洲永久精品国产| 国产精品私人影院| 精品处破学生在线二十三| 欧美日韩色综合| 91女人视频在线观看| 国产激情视频一区二区三区欧美 | 秋霞成人午夜伦在线观看| 日韩伦理免费电影| 国产亚洲欧美日韩日本| 在线播放视频一区| 欧美综合久久久| 色综合天天综合狠狠| 亚洲欧美日韩国产一区二区三区| 日韩免费观看高清完整版| 一本一本大道香蕉久在线精品| 国产精品夜夜爽| 激情五月激情综合网| 蜜臀av一级做a爰片久久| 一区二区久久久久| 亚洲伦在线观看| 自拍偷拍亚洲欧美日韩| 亚洲色欲色欲www在线观看| 国产精品久久毛片av大全日韩| 国产欧美精品一区| 中文字幕av资源一区| 欧美国产激情一区二区三区蜜月| 久久亚洲精品小早川怜子| 欧美成人综合网站| 欧美成人在线直播| 久久嫩草精品久久久久| 久久综合色一综合色88| 久久亚洲一级片| 国产亚洲美州欧州综合国| 国产三级一区二区三区| 日本一区二区三区四区 | 不卡电影一区二区三区| 91天堂素人约啪| 91激情在线视频| 欧美日韩国产精品成人| 日韩欧美色综合| 国产人成亚洲第一网站在线播放 | 欧美色中文字幕| 欧美一三区三区四区免费在线看| 日韩一区二区三区高清免费看看| 欧美电视剧免费观看| 国产精品丝袜久久久久久app| 国产精品久久久久久久久免费桃花| 亚洲视频在线一区二区| 视频在线观看国产精品| 国产精品资源在线观看| 一本久久a久久免费精品不卡| 欧美色涩在线第一页| 欧美电影免费观看高清完整版在线 | 色综合久久久久| 欧美喷潮久久久xxxxx| 久久久精品一品道一区| 亚洲视频免费观看| 美女免费视频一区| 白白色 亚洲乱淫| 欧美疯狂性受xxxxx喷水图片| 久久久久亚洲综合| 亚洲午夜在线视频| 国产真实精品久久二三区| 91福利国产精品| 久久亚洲欧美国产精品乐播| 一区二区三区四区精品在线视频| 精品在线观看视频| 91片黄在线观看| 久久久美女艺术照精彩视频福利播放| 国产精品初高中害羞小美女文| 日韩精品一级二级 | 欧美一级理论片| 亚洲人xxxx|