<!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 Driver/Function Library (uart.c)</title>
<link href="dox.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>UART Driver/Function Library (uart.c)<br>
<small>
[<a class="el" href="group__driver__avr.html">Drivers (for AVR peripherals)</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include "<a class="code" href="uart_8h.html">uart.h</a>"</span>
</pre></div> <dl compact><dt><b>Overview</b></dt><dd>This library provides both buffered and unbuffered transmit and receive functions for the AVR processor UART. Buffered access means that the UART can transmit and receive data in the "background", while your code continues executing. Also included are functions to initialize the UART, set the baud rate, flush the buffers, and check buffer status.</dd></dl>
<dl compact><dt><b>Note:</b></dt><dd>For full text output functionality, you may wish to use the rprintf functions along with this driver.</dd></dl>
<dl compact><dt><b>About UART operations</b></dt><dd>Most Atmel AVR-series processors contain one or more hardware UARTs (aka, serial ports). UART serial ports can communicate with other serial ports of the same type, like those used on PCs. In general, UARTs are used to communicate with devices that are RS-232 compatible (RS-232 is a certain kind of serial port). </dd></dl>
<dl compact><dt><b></b></dt><dd>By far, the most common use for serial communications on AVR processors is for sending information and data to a PC running a terminal program. Here is an exmaple: <div class="fragment"><pre class="fragment"> <a class="code" href="group__uart.html#ga0">uartInit</a>(); <span class="comment">// initialize UART (serial port)</span>
<a class="code" href="group__uart.html#ga3">uartSetBaudRate</a>(9600); <span class="comment">// set UART speed to 9600 baud</span>
<a class="code" href="group__rprintf.html#ga0">rprintfInit</a>(<a class="code" href="group__uart.html#ga6">uartSendByte</a>); <span class="comment">// configure rprintf to use UART for output</span>
rprintf(<span class="stringliteral">"Hello World\r\n"</span>); <span class="comment">// send "hello world" message via serial port</span>
</pre></div></dd></dl>
<dl compact><dt><b>Warning:</b></dt><dd>The CPU frequency (F_CPU) must be set correctly in <code><a class="el" href="global_8h.html">global.h</a></code> for the UART library to calculate correct baud rates. Furthermore, certain CPU frequencies will not produce exact baud rates due to integer frequency division round-off. See your AVR processor's datasheet for full details. </dd></dl>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga14">UART_DEFAULT_BAUD_RATE</a> 9600</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga15">UART_TX_BUFFER_SIZE</a> 0x0040</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga16">UART_RX_BUFFER_SIZE</a> 0x0040</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga17">UART_INTERRUPT_HANDLER</a> SIGNAL</td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga0">uartInit</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga1">uartInitBuffers</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga2">uartSetRxHandler</a> (void(*rx_func)(unsigned char c))</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga3">uartSetBaudRate</a> (u32 baudrate)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structstruct__cBuffer.html">cBuffer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga4">uartGetRxBuffer</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structstruct__cBuffer.html">cBuffer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga5">uartGetTxBuffer</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga6">uartSendByte</a> (u08 data)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga7">uartGetByte</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">u08 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga8">uartReceiveByte</a> (u08 *data)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">u08 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga9">uartReceiveBufferIsEmpty</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga10">uartFlushReceiveBuffer</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">u08 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga11">uartAddToTxBuffer</a> (u08 data)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga12">uartSendTxBuffer</a> (void)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">u08 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__uart.html#ga13">uartSendBuffer</a> (char *buffer, u16 nBytes)</td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="ga14" doxytag="uart.h::UART_DEFAULT_BAUD_RATE"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define UART_DEFAULT_BAUD_RATE 9600 </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Default uart baud rate. This is the default speed after a <a class="el" href="group__uart.html#ga0">uartInit()</a> command, and can be changed by using <a class="el" href="group__uart.html#ga3">uartSetBaudRate()</a>.
<p>
Definition at line <a class="el" href="uart_8h-source.html#l00064">64</a> of file <a class="el" href="uart_8h-source.html">uart.h</a>. </td>
</tr>
</table>
<a class="anchor" name="ga17" doxytag="uart.h::UART_INTERRUPT_HANDLER"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define UART_INTERRUPT_HANDLER SIGNAL </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Type of interrupt handler to use for uart interrupts. Value may be SIGNAL or INTERRUPT. <dl compact><dt><b>Warning:</b></dt><dd>Do not change unless you know what you're doing. </dd></dl>
<p>
Definition at line <a class="el" href="uart_8h-source.html#l00094">94</a> of file <a class="el" href="uart_8h-source.html">uart.h</a>. </td>
</tr>
</table>
<a class="anchor" name="ga16" doxytag="uart.h::UART_RX_BUFFER_SIZE"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define UART_RX_BUFFER_SIZE 0x0040 </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Number of bytes for uart receive buffer. Do not change this value in <a class="el" href="uart_8h.html">uart.h</a>, but rather override it with the desired value defined in your project's <a class="el" href="global_8h.html">global.h</a>
<p>
Definition at line <a class="el" href="uart_8h-source.html#l00078">78</a> of file <a class="el" href="uart_8h-source.html">uart.h</a>. </td>
</tr>
</table>
<a class="anchor" name="ga15" doxytag="uart.h::UART_TX_BUFFER_SIZE"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define UART_TX_BUFFER_SIZE 0x0040 </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Number of bytes for uart transmit buffer. Do not change this value in <a class="el" href="uart_8h.html">uart.h</a>, but rather override it with the desired value defined in your project's <a class="el" href="global_8h.html">global.h</a>
<p>
Definition at line <a class="el" href="uart_8h-source.html#l00072">72</a> of file <a class="el" href="uart_8h-source.html">uart.h</a>. </td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga11" doxytag="uart.h::uartAddToTxBuffer"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">u08 uartAddToTxBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">u08 </td>
<td class="mdname1" valign="top" nowrap> <em>data</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Add byte to end of uart Tx buffer. Returns TRUE if successful, FALSE if failed (no room left in buffer).
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00183">183</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga10" doxytag="uart.h::uartFlushReceiveBuffer"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void uartFlushReceiveBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Flushes (deletes) all data from receive buffer.
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00161">161</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga7" doxytag="uart.h::uartGetByte"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int uartGetByte </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Gets a single byte from the uart receive buffer. Returns the byte, or -1 if no byte is available (getchar-style).
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00125">125</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga4" doxytag="uart.h::uartGetRxBuffer"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="structstruct__cBuffer.html">cBuffer</a>* uartGetRxBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Returns pointer to the receive buffer structure.
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00100">100</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga5" doxytag="uart.h::uartGetTxBuffer"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="structstruct__cBuffer.html">cBuffer</a>* uartGetTxBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Returns pointer to the transmit buffer structure.
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00107">107</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga0" doxytag="uart.h::uartInit"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void uartInit </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Initializes uart. <dl compact><dt><b>Note:</b></dt><dd>After running this init function, the processor I/O pins that used for uart communications (RXD, TXD) are no long available for general purpose I/O. </dd></dl>
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00044">44</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga1" doxytag="uart.h::uartInitBuffers"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void uartInitBuffers </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Initializes transmit and receive buffers. Automatically called from <a class="el" href="group__uart.html#ga0">uartInit()</a>
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00066">66</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga9" doxytag="uart.h::uartReceiveBufferIsEmpty"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">u08 uartReceiveBufferIsEmpty </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Returns TRUE/FALSE if receive buffer is empty/not-empty.
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00170">170</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga8" doxytag="uart.h::uartReceiveByte"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">u08 uartReceiveByte </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">u08 * </td>
<td class="mdname1" valign="top" nowrap> <em>data</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Gets a single byte from the uart receive buffer. Function returns TRUE if data was available, FALSE if not. Actual data is returned in variable pointed to by "data". Example usage: <div class="fragment"><pre class="fragment"> <span class="keywordtype">char</span> myReceivedByte;
<a class="code" href="group__uart.html#ga8">uartReceiveByte</a>( &myReceivedByte );
</pre></div>
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00135">135</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga13" doxytag="uart.h::uartSendBuffer"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">u08 uartSendBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">char * </td>
<td class="mdname" nowrap> <em>buffer</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u16 </td>
<td class="mdname" nowrap> <em>nBytes</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Sends a block of data via the uart using interrupt control. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>pointer to data to be sent </td></tr>
<tr><td valign="top"></td><td valign="top"><em>nBytes</em> </td><td>length of data (number of bytes to sent) </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="ga6" doxytag="uart.h::uartSendByte"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void uartSendByte </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">u08 </td>
<td class="mdname1" valign="top" nowrap> <em>data</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Sends a single byte over the uart. <dl compact><dt><b>Note:</b></dt><dd>This function waits for the uart to be ready, therefore, consecutive calls to <a class="el" href="group__uart.html#ga6">uartSendByte()</a> will go only as fast as the data can be sent over the serial port. </dd></dl>
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00114">114</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga12" doxytag="uart.h::uartSendTxBuffer"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void uartSendTxBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Begins transmission of the transmit buffer under interrupt control.
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00190">190</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga3" doxytag="uart.h::uartSetBaudRate"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void uartSetBaudRate </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">u32 </td>
<td class="mdname1" valign="top" nowrap> <em>baudrate</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Sets the uart baud rate. Argument should be in bits-per-second, like <code>uartSetBaudRate(9600)</code>;
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00089">89</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga2" doxytag="uart.h::uartSetRxHandler"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void uartSetRxHandler </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void(*)(unsigned char c) </td>
<td class="mdname1" valign="top" nowrap> <em>rx_func</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Redirects received data to a user function.
<p>
Definition at line <a class="el" href="uart_8c-source.html#l00082">82</a> of file <a class="el" href="uart_8c-source.html">uart.c</a>. </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:09 2006 for Procyon AVRlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>
|