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

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

?? uart_out.c

?? Stellaris Luminary Micro 系列之 DK-LM3S815 多個學習范例全都是基于 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一区二区三区免费野_久草精品视频
蜜桃久久久久久| 欧美日韩免费电影| 在线观看精品一区| 久久人人爽人人爽| 午夜av一区二区三区| 成人午夜激情影院| 日韩欧美一区二区免费| 一区二区三区在线观看视频 | 亚洲五码中文字幕| 丁香婷婷综合激情五月色| 日韩一区二区三区四区| 亚洲一区二区三区视频在线播放 | 国产欧美一区二区三区沐欲| 亚洲va韩国va欧美va| 99天天综合性| 国产农村妇女毛片精品久久麻豆 | 精品成人一区二区三区四区| 亚洲美女屁股眼交| 国产真实乱对白精彩久久| 欧美日韩国产成人在线免费| 亚洲欧洲精品一区二区三区不卡| 激情五月播播久久久精品| 678五月天丁香亚洲综合网| 亚洲欧美视频在线观看视频| 成人国产精品免费观看视频| 久久精品免费在线观看| 国产伦精品一区二区三区免费| 欧美日韩激情在线| 亚洲国产一区二区在线播放| 色婷婷香蕉在线一区二区| 中文字幕在线播放不卡一区| av在线这里只有精品| 中文字幕一区二区三区不卡| 成人av在线一区二区| 国产精品婷婷午夜在线观看| 国产成人精品www牛牛影视| 久久久美女艺术照精彩视频福利播放| 久久国产剧场电影| 精品精品国产高清a毛片牛牛| 日本人妖一区二区| 久久综合999| 丁香五精品蜜臀久久久久99网站| 国产精品三级久久久久三级| 盗摄精品av一区二区三区| 国产精品乱人伦| 色老汉av一区二区三区| 亚洲一区二区三区国产| 91精品国产入口| 国产美女在线观看一区| 中文无字幕一区二区三区| 99久久伊人精品| 亚洲国产精品影院| 欧美精品一区二区三区在线播放| 国产精品一区免费在线观看| 国产精品国产三级国产aⅴ入口| av资源站一区| 亚洲国产一区二区三区青草影视| 日韩欧美美女一区二区三区| 激情六月婷婷久久| 亚洲私人黄色宅男| 欧美一卡二卡三卡| eeuss鲁片一区二区三区| 五月天视频一区| 国产三级久久久| 欧美日韩成人综合| 国产一区二区成人久久免费影院| 中文字幕av免费专区久久| 欧美日韩亚洲综合| 国产在线精品一区二区夜色| 亚洲视频 欧洲视频| 日韩欧美中文一区| aaa欧美日韩| 日本视频免费一区| 亚洲欧美另类久久久精品2019| 欧美一区二区不卡视频| 91啦中文在线观看| 狠狠色狠狠色合久久伊人| 亚洲一区二区三区爽爽爽爽爽| 久久久亚洲精华液精华液精华液| 91在线高清观看| 激情图区综合网| 亚洲va欧美va人人爽午夜| 国产精品国产三级国产专播品爱网| 欧美一区二区在线视频| 97久久超碰国产精品电影| 激情丁香综合五月| 婷婷综合在线观看| 亚洲美女偷拍久久| 国产精品久久久久久久午夜片| 56国语精品自产拍在线观看| 91在线视频官网| 国产精品一二三区| 精品一区二区免费| 三级亚洲高清视频| 一级特黄大欧美久久久| 中文无字幕一区二区三区| 精品欧美一区二区久久 | 精品人在线二区三区| 欧美三级韩国三级日本一级| 99九九99九九九视频精品| 狠狠色综合播放一区二区| 美女尤物国产一区| 亚洲午夜免费视频| 亚洲午夜免费电影| 亚洲美女偷拍久久| 1024成人网| 中文字幕制服丝袜成人av| 国产区在线观看成人精品| 久久亚洲影视婷婷| 久久久久97国产精华液好用吗| 欧美成人video| 欧美大胆一级视频| 日韩一区二区在线看| 日韩欧美亚洲国产另类| 日韩免费成人网| 日韩一区二区麻豆国产| 日韩精品一区二区三区视频在线观看 | 老汉av免费一区二区三区| 捆绑调教美女网站视频一区| 六月丁香婷婷久久| 精品一区二区av| 国产精品一区二区在线播放| 国产在线视频一区二区三区| 国产精品一品二品| 白白色 亚洲乱淫| 在线观看不卡视频| 91精品麻豆日日躁夜夜躁| 日韩久久久久久| 国产午夜精品福利| 亚洲精品国产a| 午夜精品久久久久久久| 久久精品久久久精品美女| 狠狠网亚洲精品| av毛片久久久久**hd| 在线中文字幕一区二区| 91精品国产aⅴ一区二区| 国产亚洲欧美日韩在线一区| 亚洲欧美中日韩| 亚洲国产精品久久人人爱蜜臀| 免费观看久久久4p| 国产馆精品极品| 91福利在线播放| 精品日本一线二线三线不卡| 国产精品成人在线观看| 性做久久久久久免费观看 | 日韩免费观看高清完整版| 久久精品亚洲麻豆av一区二区 | 青青草成人在线观看| 国产91精品精华液一区二区三区| 91丝袜国产在线播放| 欧美一区二区三区播放老司机| 欧美激情一区三区| 婷婷中文字幕一区三区| 国产成人免费网站| 欧美精品一卡二卡| 1024成人网| 精品一区二区免费| 在线观看日韩精品| 欧美精品一区视频| 亚洲成人av免费| av在线不卡免费看| 日韩一区二区在线免费观看| ●精品国产综合乱码久久久久| 蜜臀久久99精品久久久久宅男| 91在线免费播放| 久久久精品tv| 美女脱光内衣内裤视频久久网站| 99精品视频免费在线观看| 精品久久免费看| 亚洲在线免费播放| 波多野结衣欧美| 26uuu久久天堂性欧美| 国产精品18久久久| 欧美一区二区三区四区高清 | 国产视频一区在线观看| 青青草国产精品97视觉盛宴| 91福利在线播放| 亚洲女人的天堂| 成人动漫精品一区二区| 久久久.com| 精品一区二区三区在线观看| 51精品久久久久久久蜜臀| 亚洲最色的网站| 972aa.com艺术欧美| 日本一区二区不卡视频| 韩国av一区二区| 日韩精品在线看片z| 青椒成人免费视频| 欧美女孩性生活视频| 亚洲三级免费观看| 成人精品视频一区二区三区| 久久久www免费人成精品| 国产一区二区三区四区五区美女| 日韩欧美aaaaaa| 男男成人高潮片免费网站| 欧美一级精品大片| 美女视频一区在线观看| 精品蜜桃在线看| 国产一区二区久久| 国产精品视频在线看|