697 lines
35 KiB
HTML
697 lines
35 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<title>Serial Port: Arduino/libraries/SerialPort/SerialPort.h File Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body onload='searchBox.OnSelectItem(0);'>
|
|
<!-- Generated by Doxygen 1.7.4 -->
|
|
<script type="text/javascript"><!--
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
--></script>
|
|
<div id="top">
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">Serial Port</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li id="searchli">
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Classes</a> |
|
|
<a href="#define-members">Defines</a> |
|
|
<a href="#func-members">Functions</a> |
|
|
<a href="#var-members">Variables</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Arduino/libraries/SerialPort/SerialPort.h File Reference</div> </div>
|
|
</div>
|
|
<div class="contents">
|
|
|
|
<p>Serial Port class.
|
|
<a href="#details">More...</a></p>
|
|
<div class="textblock"><code>#include <avr/io.h></code><br/>
|
|
<code>#include <avr/pgmspace.h></code><br/>
|
|
<code>#include <Arduino.h></code><br/>
|
|
</div>
|
|
<p><a href="a00005_source.html">Go to the source code of this file.</a></p>
|
|
<table class="memberdecls">
|
|
<tr><td colspan="2"><h2><a name="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00001.html">SerialPort< PortNumber, RxBufSize, TxBufSize ></a></td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class for avr hardware USART ports. <a href="a00001.html#details">More...</a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00002.html">SerialRingBuffer</a></td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Ring buffer for RX and TX data. <a href="a00002.html#details">More...</a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00003.html">UsartRegister</a></td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Addresses of USART registers. <a href="a00003.html#details">More...</a><br/></td></tr>
|
|
<tr><td colspan="2"><h2><a name="define-members"></a>
|
|
Defines</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a0a18cb484aedac7af838a4cf5080406f">ALLOW_LARGE_BUFFERS</a>   1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a492b740c6f5dfa881640261970c21e82">BUFFERED_RX</a>   1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#ab9814b492800e7e722e5c4c47c4e7d6a">BUFFERED_TX</a>   1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#aa347a5f07ca656ebbf07f0df83eb34b3">ENABLE_RX_ERROR_CHECKING</a>   1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a44e23de08452d49d4b2dcb57570222ce">SERIAL_PORT_VERSION</a>   20130222</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a7966cb9ae597cfc98175b3330e336c50">USE_NEW_SERIAL</a>   <a class="el" href="a00001.html">SerialPort</a><0, 63, 63> NewSerial</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a6d27f04ec011a817c44ef9a0898c0570">USE_NEW_SERIAL1</a>   <a class="el" href="a00001.html">SerialPort</a><1, 63, 63> NewSerial1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a6f0dbd3bdf75bd4aaec5d1f9aa02fff3">USE_NEW_SERIAL2</a>   <a class="el" href="a00001.html">SerialPort</a><2, 63, 63> NewSerial2</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a03e12542dc110fbc675676bd7ddb6c8a">USE_NEW_SERIAL3</a>   <a class="el" href="a00001.html">SerialPort</a><3, 63, 63> NewSerial3</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a460c9e53d7d709cf8f90ba98d901dd80">USE_WRITE_OVERRIDES</a>   1</td></tr>
|
|
<tr><td colspan="2"><h2><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#afba54bf68161da2539416c1c79079322">badPortNumber</a> (void)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#ae0695a8a8d72f8b8d99505fe349cace9">badRxBufSize</a> (void)</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a3e34f6fae0601bde1dc223e1dae0461c">badTxBufSize</a> (void)</td></tr>
|
|
<tr><td colspan="2"><h2><a name="var-members"></a>
|
|
Variables</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a122aa87d6d517cf6fef0ac595ade2a3b">rxErrorBits</a> []</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00002.html">SerialRingBuffer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a9357d415ed299b0aa00c9333c7d1cf7f">rxRingBuf</a> []</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#aa52e1ab0a02b31e608e2f789d0f21515">SP_1_STOP_BIT</a> = 0</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a0caf477e5dd815acc9c3496d31e78040">SP_2_STOP_BIT</a> = M_USBS</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a7fceca316014ed58d8a6bf003d56af5a">SP_5_BIT_CHAR</a> = 0</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a5cb767bae10b9aa5a02be00c5b570967">SP_6_BIT_CHAR</a> = M_UCSZ0</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a66e3e7fbd73f8b499b7062e3d9ac4981">SP_7_BIT_CHAR</a> = M_UCSZ1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#aaacdef21e05f2054cef451d4f840317b">SP_8_BIT_CHAR</a> = M_UCSZ0 | M_UCSZ1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#ac2c5b2c5c91965edc51ab6e12b1cf604">SP_EVEN_PARITY</a> = M_UPM1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a2a7a0989d2d7a5f27a0eef14b4052f5e">SP_FRAMING_ERROR</a> = M_FE</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a1408abd4630ac1b2a5432f07636fb2ba">SP_NO_PARITY</a> = 0</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a9625f0899cb845451b46f3aff94ffe01">SP_ODD_PARITY</a> = M_UPM0 | M_UPM1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#ac81a11e48b532ac5ab752e866e5e51e6">SP_OPT_MASK</a> = M_USBS | M_UPM0 | M_UPM1 |M_UCSZ0 | M_UCSZ1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a2ea2d7ccb17a58a56c0726bf21e12b61">SP_PARITY_ERROR</a> = M_UPE</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a2ad06f836f28d76e35006eabe2a70f53">SP_RX_BUF_OVERRUN</a> = 1</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#aba276deb6f876a8cf7e0f895cfbb37c8">SP_RX_DATA_OVERRUN</a> = M_DOR</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a672521fec83294e7cd4e2061bfb5765c">SP_UCSRA_ERROR_MASK</a> = M_FE | M_DOR | M_UPE</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00002.html">SerialRingBuffer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#ad658e906f050f38e4de63e1ad7664b30">txRingBuf</a> []</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="a00003.html">UsartRegister</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00005.html#a2ca8ac27d295096da3a374bd1ef99492">usart</a> []</td></tr>
|
|
</table>
|
|
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
|
<div class="textblock"><p>Serial Port class. </p>
|
|
|
|
<p>Definition in file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
</div><hr/><h2>Define Documentation</h2>
|
|
<a class="anchor" id="a0a18cb484aedac7af838a4cf5080406f"></a><!-- doxytag: member="SerialPort.h::ALLOW_LARGE_BUFFERS" ref="a0a18cb484aedac7af838a4cf5080406f" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define ALLOW_LARGE_BUFFERS   1</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Set ALLOW_LARGE_BUFFERS to zero to limit buffer sizes to 254 bytes.</p>
|
|
<p>ALLOW_LARGE_BUFFERS controls whether uint16_t or uint8_t will be used for buffer indices. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00036">36</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a492b740c6f5dfa881640261970c21e82"></a><!-- doxytag: member="SerialPort.h::BUFFERED_RX" ref="a492b740c6f5dfa881640261970c21e82" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define BUFFERED_RX   1</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Set BUFFERED_RX zero to save flash and RAM if no RX buffering is used.</p>
|
|
<p>RxBufSize must be zero in all <a class="el" href="a00001.html" title="Class for avr hardware USART ports.">SerialPort</a> constructors if BUFFERED_RX is zero. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00052">52</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab9814b492800e7e722e5c4c47c4e7d6a"></a><!-- doxytag: member="SerialPort.h::BUFFERED_TX" ref="ab9814b492800e7e722e5c4c47c4e7d6a" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define BUFFERED_TX   1</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Set BUFFERED_TX zero to save flash and RAM if no TX buffering is used.</p>
|
|
<p>TxBufSize must be zero in all <a class="el" href="a00001.html" title="Class for avr hardware USART ports.">SerialPort</a> constructors if BUFFERED_TX is zero. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00060">60</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa347a5f07ca656ebbf07f0df83eb34b3"></a><!-- doxytag: member="SerialPort.h::ENABLE_RX_ERROR_CHECKING" ref="aa347a5f07ca656ebbf07f0df83eb34b3" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define ENABLE_RX_ERROR_CHECKING   1</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Set ENABLE_RX_ERROR_CHECKING zero to disable RX error checking. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00065">65</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a44e23de08452d49d4b2dcb57570222ce"></a><!-- doxytag: member="SerialPort.h::SERIAL_PORT_VERSION" ref="a44e23de08452d49d4b2dcb57570222ce" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define SERIAL_PORT_VERSION   20130222</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p><a class="el" href="a00001.html" title="Class for avr hardware USART ports.">SerialPort</a> version YYYYMMDD </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00028">28</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a7966cb9ae597cfc98175b3330e336c50"></a><!-- doxytag: member="SerialPort.h::USE_NEW_SERIAL" ref="a7966cb9ae597cfc98175b3330e336c50" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define USE_NEW_SERIAL   <a class="el" href="a00001.html">SerialPort</a><0, 63, 63> NewSerial</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Define NewSerial with buffering like Arduino 1.0. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00069">69</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a6d27f04ec011a817c44ef9a0898c0570"></a><!-- doxytag: member="SerialPort.h::USE_NEW_SERIAL1" ref="a6d27f04ec011a817c44ef9a0898c0570" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define USE_NEW_SERIAL1   <a class="el" href="a00001.html">SerialPort</a><1, 63, 63> NewSerial1</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Define NewSerial1 with buffering like Arduino 1.0. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00071">71</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a6f0dbd3bdf75bd4aaec5d1f9aa02fff3"></a><!-- doxytag: member="SerialPort.h::USE_NEW_SERIAL2" ref="a6f0dbd3bdf75bd4aaec5d1f9aa02fff3" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define USE_NEW_SERIAL2   <a class="el" href="a00001.html">SerialPort</a><2, 63, 63> NewSerial2</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Define NewSerial2 with buffering like Arduino 1.0. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00073">73</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a03e12542dc110fbc675676bd7ddb6c8a"></a><!-- doxytag: member="SerialPort.h::USE_NEW_SERIAL3" ref="a03e12542dc110fbc675676bd7ddb6c8a" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define USE_NEW_SERIAL3   <a class="el" href="a00001.html">SerialPort</a><3, 63, 63> NewSerial3</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Define NewSerial3 with buffering like Arduino 1.0. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00075">75</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a460c9e53d7d709cf8f90ba98d901dd80"></a><!-- doxytag: member="SerialPort.h::USE_WRITE_OVERRIDES" ref="a460c9e53d7d709cf8f90ba98d901dd80" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">#define USE_WRITE_OVERRIDES   1</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Set USE_WRITE_OVERRIDES to zero to use the Arduino Print version of write(const char*) and write(const uint8_t*, size_t).</p>
|
|
<p>This will save some flash but is much slower. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00044">44</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Function Documentation</h2>
|
|
<a class="anchor" id="afba54bf68161da2539416c1c79079322"></a><!-- doxytag: member="SerialPort.h::badPortNumber" ref="afba54bf68161da2539416c1c79079322" args="(void)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint8_t badPortNumber </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Cause error message for bad port number. </p>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>Never returns since it is never called. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ae0695a8a8d72f8b8d99505fe349cace9"></a><!-- doxytag: member="SerialPort.h::badRxBufSize" ref="ae0695a8a8d72f8b8d99505fe349cace9" args="(void)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint8_t badRxBufSize </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Cause error message for bad port number. </p>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>Never returns since it is never called. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a3e34f6fae0601bde1dc223e1dae0461c"></a><!-- doxytag: member="SerialPort.h::badTxBufSize" ref="a3e34f6fae0601bde1dc223e1dae0461c" args="(void)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint8_t badTxBufSize </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Cause error message for bad port number. </p>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>Never returns since it is never called. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Variable Documentation</h2>
|
|
<a class="anchor" id="a122aa87d6d517cf6fef0ac595ade2a3b"></a><!-- doxytag: member="SerialPort.h::rxErrorBits" ref="a122aa87d6d517cf6fef0ac595ade2a3b" args="[]" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">uint8_t <a class="el" href="a00005.html#a122aa87d6d517cf6fef0ac595ade2a3b">rxErrorBits</a>[]</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>RX error bits. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a9357d415ed299b0aa00c9333c7d1cf7f"></a><!-- doxytag: member="SerialPort.h::rxRingBuf" ref="a9357d415ed299b0aa00c9333c7d1cf7f" args="[]" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="a00002.html">SerialRingBuffer</a> <a class="el" href="a00005.html#a9357d415ed299b0aa00c9333c7d1cf7f">rxRingBuf</a>[]</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>RX ring buffers. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aa52e1ab0a02b31e608e2f789d0f21515"></a><!-- doxytag: member="SerialPort.h::SP_1_STOP_BIT" ref="aa52e1ab0a02b31e608e2f789d0f21515" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#aa52e1ab0a02b31e608e2f789d0f21515">SP_1_STOP_BIT</a> = 0<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Use one stop bit. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00161">161</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a0caf477e5dd815acc9c3496d31e78040"></a><!-- doxytag: member="SerialPort.h::SP_2_STOP_BIT" ref="a0caf477e5dd815acc9c3496d31e78040" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#a0caf477e5dd815acc9c3496d31e78040">SP_2_STOP_BIT</a> = M_USBS<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Use two stop bits. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00163">163</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a7fceca316014ed58d8a6bf003d56af5a"></a><!-- doxytag: member="SerialPort.h::SP_5_BIT_CHAR" ref="a7fceca316014ed58d8a6bf003d56af5a" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#a7fceca316014ed58d8a6bf003d56af5a">SP_5_BIT_CHAR</a> = 0<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Use 5-bit character size. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00173">173</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a5cb767bae10b9aa5a02be00c5b570967"></a><!-- doxytag: member="SerialPort.h::SP_6_BIT_CHAR" ref="a5cb767bae10b9aa5a02be00c5b570967" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#a5cb767bae10b9aa5a02be00c5b570967">SP_6_BIT_CHAR</a> = M_UCSZ0<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Use 6-bit character size. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00175">175</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a66e3e7fbd73f8b499b7062e3d9ac4981"></a><!-- doxytag: member="SerialPort.h::SP_7_BIT_CHAR" ref="a66e3e7fbd73f8b499b7062e3d9ac4981" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#a66e3e7fbd73f8b499b7062e3d9ac4981">SP_7_BIT_CHAR</a> = M_UCSZ1<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Use 7-bit character size. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00177">177</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aaacdef21e05f2054cef451d4f840317b"></a><!-- doxytag: member="SerialPort.h::SP_8_BIT_CHAR" ref="aaacdef21e05f2054cef451d4f840317b" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#aaacdef21e05f2054cef451d4f840317b">SP_8_BIT_CHAR</a> = M_UCSZ0 | M_UCSZ1<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Use 8-bit character size. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00179">179</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac2c5b2c5c91965edc51ab6e12b1cf604"></a><!-- doxytag: member="SerialPort.h::SP_EVEN_PARITY" ref="ac2c5b2c5c91965edc51ab6e12b1cf604" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#ac2c5b2c5c91965edc51ab6e12b1cf604">SP_EVEN_PARITY</a> = M_UPM1<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Use even parity. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00168">168</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2a7a0989d2d7a5f27a0eef14b4052f5e"></a><!-- doxytag: member="SerialPort.h::SP_FRAMING_ERROR" ref="a2a7a0989d2d7a5f27a0eef14b4052f5e" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#a2a7a0989d2d7a5f27a0eef14b4052f5e">SP_FRAMING_ERROR</a> = M_FE<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>USART framing error bit. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00184">184</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a1408abd4630ac1b2a5432f07636fb2ba"></a><!-- doxytag: member="SerialPort.h::SP_NO_PARITY" ref="a1408abd4630ac1b2a5432f07636fb2ba" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#a1408abd4630ac1b2a5432f07636fb2ba">SP_NO_PARITY</a> = 0<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>No parity bit. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00166">166</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a9625f0899cb845451b46f3aff94ffe01"></a><!-- doxytag: member="SerialPort.h::SP_ODD_PARITY" ref="a9625f0899cb845451b46f3aff94ffe01" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#a9625f0899cb845451b46f3aff94ffe01">SP_ODD_PARITY</a> = M_UPM0 | M_UPM1<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Use odd parity. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00170">170</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac81a11e48b532ac5ab752e866e5e51e6"></a><!-- doxytag: member="SerialPort.h::SP_OPT_MASK" ref="ac81a11e48b532ac5ab752e866e5e51e6" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#ac81a11e48b532ac5ab752e866e5e51e6">SP_OPT_MASK</a> = M_USBS | M_UPM0 | M_UPM1 |M_UCSZ0 | M_UCSZ1<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Mask for all options bits. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00181">181</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2ea2d7ccb17a58a56c0726bf21e12b61"></a><!-- doxytag: member="SerialPort.h::SP_PARITY_ERROR" ref="a2ea2d7ccb17a58a56c0726bf21e12b61" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#a2ea2d7ccb17a58a56c0726bf21e12b61">SP_PARITY_ERROR</a> = M_UPE<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>USART parity error bit. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00188">188</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2ad06f836f28d76e35006eabe2a70f53"></a><!-- doxytag: member="SerialPort.h::SP_RX_BUF_OVERRUN" ref="a2ad06f836f28d76e35006eabe2a70f53" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#a2ad06f836f28d76e35006eabe2a70f53">SP_RX_BUF_OVERRUN</a> = 1<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>RX ring buffer full overrun. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00192">192</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aba276deb6f876a8cf7e0f895cfbb37c8"></a><!-- doxytag: member="SerialPort.h::SP_RX_DATA_OVERRUN" ref="aba276deb6f876a8cf7e0f895cfbb37c8" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#aba276deb6f876a8cf7e0f895cfbb37c8">SP_RX_DATA_OVERRUN</a> = M_DOR<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>USART RX data overrun error bit. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00186">186</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a672521fec83294e7cd4e2061bfb5765c"></a><!-- doxytag: member="SerialPort.h::SP_UCSRA_ERROR_MASK" ref="a672521fec83294e7cd4e2061bfb5765c" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const uint8_t <a class="el" href="a00005.html#a672521fec83294e7cd4e2061bfb5765c">SP_UCSRA_ERROR_MASK</a> = M_FE | M_DOR | M_UPE<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Mask for all error bits in UCSRA. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00190">190</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ad658e906f050f38e4de63e1ad7664b30"></a><!-- doxytag: member="SerialPort.h::txRingBuf" ref="ad658e906f050f38e4de63e1ad7664b30" args="[]" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="a00002.html">SerialRingBuffer</a> <a class="el" href="a00005.html#ad658e906f050f38e4de63e1ad7664b30">txRingBuf</a>[]</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>TX ring buffers. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2ca8ac27d295096da3a374bd1ef99492"></a><!-- doxytag: member="SerialPort.h::usart" ref="a2ca8ac27d295096da3a374bd1ef99492" args="[]" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const <a class="el" href="a00003.html">UsartRegister</a> <a class="el" href="a00005.html#a2ca8ac27d295096da3a374bd1ef99492">usart</a>[]<code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<b>Initial value:</b><div class="fragment"><pre class="fragment"> {
|
|
|
|
|
|
|
|
|
|
|
|
{0, 0, 0, 0, 0, 0},
|
|
|
|
|
|
|
|
|
|
|
|
{0, 0, 0, 0, 0, 0},
|
|
|
|
|
|
|
|
|
|
|
|
{0, 0, 0, 0, 0, 0},
|
|
|
|
|
|
|
|
|
|
|
|
{0, 0, 0, 0, 0, 0}
|
|
|
|
}
|
|
</pre></div><p>Pointers to USART registers. This static const array allows the compiler to generate very efficient code if the array index is a constant. </p>
|
|
|
|
<p>Definition at line <a class="el" href="a00005_source.html#l00214">214</a> of file <a class="el" href="a00005_source.html">SerialPort.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Defines</a></div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<hr class="footer"/><address class="footer"><small>Generated on Fri Feb 22 2013 11:38:19 for Serial Port by 
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
|
</body>
|
|
</html>
|