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

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

?? uart_8h-source.html

?? ATMEL的AVR單片機庫文件
?? HTML
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Procyon AVRlib: uart.h Source File</title><link href="dox.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.6 --><div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div><h1>uart.h</h1><a href="uart_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*! \file uart.h \brief UART driver with buffer support. */</span>00002 <span class="comment">//*****************************************************************************</span>00003 <span class="comment">//</span>00004 <span class="comment">// File Name    : 'uart.h'</span>00005 <span class="comment">// Title        : UART driver with buffer support</span>00006 <span class="comment">// Author       : Pascal Stang - Copyright (C) 2000-2002</span>00007 <span class="comment">// Created      : 11/22/2000</span>00008 <span class="comment">// Revised      : 02/01/2004</span>00009 <span class="comment">// Version      : 1.3</span>00010 <span class="comment">// Target MCU   : ATMEL AVR Series</span>00011 <span class="comment">// Editor Tabs  : 4</span>00012 <span class="comment">//</span>00013 <span class="comment">// This code is distributed under the GNU Public License</span>00014 <span class="comment">//      which can be found at http://www.gnu.org/licenses/gpl.txt</span>00015 <span class="comment">//</span>00016 <span class="comment">//*****************************************************************************</span>00017 00018 <span class="preprocessor">#ifndef UART_H</span>00019 <span class="preprocessor"></span><span class="preprocessor">#define UART_H</span>00020 <span class="preprocessor"></span>00021 <span class="preprocessor">#include "<a class="code" href="global_8h.html">global.h</a>"</span>00022 <span class="preprocessor">#include "<a class="code" href="buffer_8h.html">buffer.h</a>"</span>00023 <span class="comment"></span>00024 <span class="comment">//! default baud rate</span>00025 <span class="comment">//! can be changed by using uartSetBaudRate()</span><a name="l00026"></a><a class="code" href="uart_8h.html#a0">00026</a> <span class="comment"></span><span class="preprocessor">#define UART_DEFAULT_BAUD_RATE  9600</span>00027 <span class="preprocessor"></span>00028 <span class="comment">// buffer memory allocation defines</span>00029 <span class="comment">// buffer sizes</span>00030 <span class="preprocessor">#ifndef UART_TX_BUFFER_SIZE</span><a name="l00031"></a><a class="code" href="uart_8h.html#a1">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define UART_TX_BUFFER_SIZE     0x0040  </span><span class="comment">///&lt; number of bytes for uart transmit buffer</span>00032 <span class="comment"></span>#endif00033 <span class="preprocessor">#ifndef UART_RX_BUFFER_SIZE</span><a name="l00034"></a><a class="code" href="uart_8h.html#a2">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define UART_RX_BUFFER_SIZE     0x0040  </span><span class="comment">///&lt; number of bytes for uart receive buffer</span>00035 <span class="comment"></span>#endif00036 00037 <span class="comment">// define this key if you wish to use</span>00038 <span class="comment">// external RAM for the UART buffers</span>00039 <span class="comment">//#define UART_BUFFER_EXTERNAL_RAM</span>00040 <span class="preprocessor">#ifdef UART_BUFFER_EXTERNAL_RAM</span>00041 <span class="preprocessor"></span>    <span class="comment">// absolute address of uart buffers</span>00042 <span class="preprocessor">    #define UART_TX_BUFFER_ADDR 0x1000</span>00043 <span class="preprocessor"></span><span class="preprocessor">    #define UART_RX_BUFFER_ADDR 0x1100</span>00044 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00045 <span class="preprocessor"></span>00046 <span class="comment">// type of interrupt handler to use</span>00047 <span class="comment">// *do not change unless you know what you're doing</span>00048 <span class="comment">// Value may be SIGNAL or INTERRUPT</span>00049 <span class="preprocessor">#ifndef UART_INTERRUPT_HANDLER</span>00050 <span class="preprocessor"></span><span class="preprocessor">#define UART_INTERRUPT_HANDLER  SIGNAL</span>00051 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00052 <span class="preprocessor"></span>00053 <span class="comment">// compatibility with most newer processors</span>00054 <span class="preprocessor">#ifdef UCSRB</span>00055 <span class="preprocessor"></span><span class="preprocessor">    #define UCR                 UCSRB</span>00056 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00057 <span class="preprocessor"></span><span class="comment">// compatibility with old Mega processors</span>00058 <span class="preprocessor">#if defined(UBRR) &amp;&amp; !defined(UBRRL)</span>00059 <span class="preprocessor"></span><span class="preprocessor">    #define UBRRL               UBRR</span>00060 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00061 <span class="preprocessor"></span><span class="comment">// compatibility with dual-uart processors</span>00062 <span class="comment">// (if you need to use both uarts, please use the uart2 library)</span>00063 <span class="preprocessor">#if defined(__AVR_ATmega128__)</span>00064 <span class="preprocessor"></span><span class="preprocessor">    #define UDR                 UDR0</span>00065 <span class="preprocessor"></span><span class="preprocessor">    #define UCR                 UCSR0B</span>00066 <span class="preprocessor"></span><span class="preprocessor">    #define UBRRL               UBRR0L</span>00067 <span class="preprocessor"></span><span class="preprocessor">    #define UBRRH               UBRR0H</span>00068 <span class="preprocessor"></span><span class="preprocessor">    #define SIG_UART_TRANS      SIG_UART0_TRANS</span>00069 <span class="preprocessor"></span><span class="preprocessor">    #define SIG_UART_RECV       SIG_UART0_RECV</span>00070 <span class="preprocessor"></span><span class="preprocessor">    #define SIG_UART_DATA       SIG_UART0_DATA</span>00071 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00072 <span class="preprocessor"></span><span class="preprocessor">#if defined(__AVR_ATmega161__)</span>00073 <span class="preprocessor"></span><span class="preprocessor">    #define UDR                 UDR0</span>00074 <span class="preprocessor"></span><span class="preprocessor">    #define UCR                 UCSR0B</span>00075 <span class="preprocessor"></span><span class="preprocessor">    #define UBRRL               UBRR0</span>00076 <span class="preprocessor"></span><span class="preprocessor">    #define SIG_UART_TRANS      SIG_UART0_TRANS</span>00077 <span class="preprocessor"></span><span class="preprocessor">    #define SIG_UART_RECV       SIG_UART0_RECV</span>00078 <span class="preprocessor"></span><span class="preprocessor">    #define SIG_UART_DATA       SIG_UART0_DATA</span>00079 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00080 <span class="preprocessor"></span>00081 <span class="comment">// functions</span>00082 <span class="comment"></span>00083 <span class="comment">//! initializes transmit and receive buffers</span>00084 <span class="comment"></span><span class="comment">// called from uartInit()</span>00085 <span class="keywordtype">void</span> <a class="code" href="uart_8c.html#a10">uartInitBuffers</a>(<span class="keywordtype">void</span>);00086 <span class="comment"></span>00087 <span class="comment">//! initializes uart</span>00088 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="uart_8c.html#a9">uartInit</a>(<span class="keywordtype">void</span>);00089 <span class="comment"></span>00090 <span class="comment">//! redirects received data to a user function</span>00091 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="uart2_8h.html#a22">uartSetRxHandler</a>(<span class="keywordtype">void</span> (*rx_func)(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> c));00092 <span class="comment"></span>00093 <span class="comment">//! sets the uart baud rate</span>00094 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="uart2_8h.html#a23">uartSetBaudRate</a>(u32 baudrate);00095 <span class="comment"></span>00096 <span class="comment">//! returns pointer to the receive buffer structure</span>00097 <span class="comment"></span>cBuffer* <a class="code" href="uart_8c.html#a13">uartGetRxBuffer</a>(<span class="keywordtype">void</span>);00098 <span class="comment"></span>00099 <span class="comment">//! returns pointer to the transmit buffer structure</span>00100 <span class="comment"></span>cBuffer* <a class="code" href="uart_8c.html#a14">uartGetTxBuffer</a>(<span class="keywordtype">void</span>);00101 <span class="comment"></span>00102 <span class="comment">//! sends a single byte over the uart</span>00103 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="uart2_8h.html#a26">uartSendByte</a>(u08 data);00104 <span class="comment"></span>00105 <span class="comment">//! gets a single byte from the uart receive buffer (getchar-style)</span>00106 <span class="comment"></span><span class="comment">// returns the byte, or -1 if no byte is available</span>00107 <span class="keywordtype">int</span> <a class="code" href="uart_8c.html#a16">uartGetByte</a>(<span class="keywordtype">void</span>);00108 <span class="comment"></span>00109 <span class="comment">//! gets a single byte from the uart receive buffer</span>00110 <span class="comment"></span><span class="comment">// Function returns TRUE if data was available, FALSE if not.</span>00111 <span class="comment">// Actual data is returned in variable pointed to by "data".</span>00112 <span class="comment">// example usage:</span>00113 <span class="comment">// char myReceivedByte;</span>00114 <span class="comment">// uartReceiveByte( &amp;myReceivedByte );</span>00115 u08 <a class="code" href="uart2_8h.html#a31">uartReceiveByte</a>(u08* data);00116 <span class="comment"></span>00117 <span class="comment">//! returns TRUE/FALSE if receive buffer is empty/not-empty</span>00118 <span class="comment"></span>u08 <a class="code" href="uart_8c.html#a19">uartReceiveBufferIsEmpty</a>(<span class="keywordtype">void</span>);00119 <span class="comment"></span>00120 <span class="comment">//! flushes (deletes) all data from receive buffer</span>00121 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="uart_8c.html#a18">uartFlushReceiveBuffer</a>(<span class="keywordtype">void</span>);00122 <span class="comment"></span>00123 <span class="comment">//! add byte to end of uart Tx buffer</span>00124 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="uart2_8h.html#a34">uartAddToTxBuffer</a>(u08 data);00125 <span class="comment"></span>00126 <span class="comment">//! begins transmission of the transmit buffer under interrupt control</span>00127 <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="uart_8c.html#a21">uartSendTxBuffer</a>(<span class="keywordtype">void</span>);00128 <span class="comment"></span>00129 <span class="comment">//! sends a buffer of length nBytes via the uart using interrupt control</span>00130 <span class="comment"></span>u08  <a class="code" href="uart2_8h.html#a38">uartSendBuffer</a>(<span class="keywordtype">char</span> *buffer, u16 nBytes);00131 00132 <span class="preprocessor">#endif</span>00133 <span class="preprocessor"></span>00134 </pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 15 03:50:22 2004 for Procyon AVRlib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6 </small></address></body></html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久免费视频一区| 欧美日韩综合在线| 亚洲国产乱码最新视频 | 精品久久国产97色综合| 国产精品综合二区| 亚洲午夜羞羞片| 国产精品美女久久久久久久| 欧美一区二区三区四区五区| 色综合久久综合网欧美综合网 | 日本不卡视频在线| 悠悠色在线精品| 国产午夜精品一区二区三区四区 | 欧美色综合网站| 91在线视频在线| 国产成人在线视频播放| 免费成人结看片| 天天影视色香欲综合网老头| 一区二区三区四区蜜桃| 中文字幕色av一区二区三区| 久久精品人人爽人人爽| 精品国产伦理网| 91精品国产入口| 91精品国产色综合久久不卡电影| 日本韩国欧美在线| 色综合久久天天| 91尤物视频在线观看| 成人午夜激情片| 午夜婷婷国产麻豆精品| 国产精品乱人伦中文| 久久视频一区二区| 亚洲精品在线免费播放| 日韩精品在线一区二区| 日韩视频在线永久播放| 日韩欧美一区在线| 欧美一级理论片| 精品国产成人系列| 久久久亚洲高清| 中文在线资源观看网站视频免费不卡 | 久久成人麻豆午夜电影| 日韩二区三区在线观看| 日韩精品一二三四| 日本成人在线视频网站| 免费观看91视频大全| 麻豆91在线观看| 国产在线精品视频| 成人午夜视频网站| 91浏览器在线视频| 精品视频在线免费| 91精品国产综合久久久蜜臀粉嫩| 日韩一区二区三区在线视频| 日本不卡视频在线| 日韩一级片在线播放| 欧美亚洲禁片免费| 欧美日韩国产中文| 欧美日韩一区在线| 91麻豆精品国产综合久久久久久| 欧美电视剧在线看免费| 久久影院电视剧免费观看| 欧美激情一区二区三区蜜桃视频| 国产精品第一页第二页第三页| 17c精品麻豆一区二区免费| 一区二区三区在线观看动漫| 天堂va蜜桃一区二区三区漫画版| 久久精品国产一区二区三| 国产成人精品免费一区二区| 91一区一区三区| 欧美一区二区三区视频在线观看| 久久久久免费观看| 亚洲乱码国产乱码精品精98午夜| 水野朝阳av一区二区三区| 狠狠色丁香久久婷婷综合丁香| av在线不卡电影| 欧美日韩国产在线观看| 久久精品男人的天堂| 亚洲精品免费看| 国产主播一区二区| 欧洲一区二区三区在线| 欧美日韩午夜在线视频| 成人小视频在线观看| 91蜜桃在线免费视频| 欧美久久一区二区| 国产欧美一区二区三区鸳鸯浴| 亚洲另类春色校园小说| 九一久久久久久| 在线视频观看一区| 国产日产欧美一区| 丝袜脚交一区二区| 91在线你懂得| 精品嫩草影院久久| 亚洲一区二区av电影| 国产一区二区三区不卡在线观看| 欧美色图在线观看| 国产日产精品一区| 蜜桃av一区二区在线观看| 色综合久久综合网97色综合| 精品国产乱子伦一区| 图片区日韩欧美亚洲| 99riav久久精品riav| 欧美va在线播放| 三级欧美韩日大片在线看| 91亚洲精品久久久蜜桃网站 | 日韩欧美成人一区二区| 日韩理论片在线| 国产乱码字幕精品高清av| 亚洲一区在线观看视频| 国产精品自拍三区| 欧美一区二区三区白人| 亚洲黄一区二区三区| 成人av资源下载| 久久精品一区二区三区av| 日韩国产欧美在线视频| 91国产免费看| 亚洲欧美日韩在线不卡| 成人动漫精品一区二区| 国产日韩欧美综合在线| 韩日精品视频一区| 欧美变态tickle挠乳网站| 五月婷婷综合网| 欧美性色黄大片| 樱花影视一区二区| 91伊人久久大香线蕉| 国产欧美精品区一区二区三区 | 91精品久久久久久蜜臀| 亚洲一线二线三线久久久| av电影一区二区| 中文字幕高清一区| 成人av在线播放网站| 中国色在线观看另类| 成人精品gif动图一区| 国产欧美一区二区三区鸳鸯浴| 日韩欧美区一区二| 久久色中文字幕| 久久er精品视频| 欧美一区二区三区四区高清| 婷婷成人激情在线网| 欧美精品一二三| 首页国产欧美久久| 欧美一级二级三级蜜桃| 久久精品国产网站| 26uuu亚洲综合色欧美| 国产综合色视频| 欧美国产精品v| 97久久精品人人做人人爽50路 | 一区二区三区四区亚洲| 欧美在线一二三四区| 亚洲第一电影网| 在线91免费看| 奇米一区二区三区av| 久久女同精品一区二区| 国产一区二区0| 国产精品看片你懂得| 色婷婷综合久久久久中文 | www.亚洲国产| 麻豆精品新av中文字幕| 中文字幕精品综合| 精品sm捆绑视频| 欧美午夜精品电影| 色诱视频网站一区| 国产成人精品在线看| 韩国午夜理伦三级不卡影院| 激情成人午夜视频| 国产精品77777竹菊影视小说| 色美美综合视频| 日本在线不卡视频| 国产香蕉久久精品综合网| 91免费精品国自产拍在线不卡| 亚洲中国最大av网站| 日韩欧美中文字幕精品| 国产91高潮流白浆在线麻豆| 成人欧美一区二区三区在线播放| 欧美午夜精品免费| 国产精品一二三四五| 亚洲精品v日韩精品| 91精品国产综合久久久蜜臀图片| 福利一区福利二区| 亚洲.国产.中文慕字在线| 精品国产一区二区在线观看| 亚洲美腿欧美偷拍| 亚洲一区二区高清| 精品美女在线播放| 97久久久精品综合88久久| 美女性感视频久久| 亚洲色图制服诱惑| 26uuu欧美日本| 欧美丝袜第三区| 成人福利视频在线| 婷婷丁香久久五月婷婷| 中文字幕一区免费在线观看 | 国产精品小仙女| 亚洲香肠在线观看| 国产精品网站在线| 精品对白一区国产伦| 在线视频中文字幕一区二区| 国产不卡视频在线观看| 奇米精品一区二区三区在线观看一 | 色欧美88888久久久久久影院| 九九精品一区二区| 亚洲高清在线精品| 亚洲天堂久久久久久久| 久久伊人中文字幕|