mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
579 lines
27 KiB
HTML
579 lines
27 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"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.3.1"/>
|
|
<title>USB Host Shield 2.0: SPP Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="imageStyle.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">USB Host Shield 2.0
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.3.1 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<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="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</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>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</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>
|
|
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pub-attribs">Public Attributes</a> |
|
|
<a href="class_s_p_p-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">SPP Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p><code>#include <<a class="el" href="_s_p_p_8h_source.html">SPP.h</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for SPP:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="class_s_p_p__inherit__graph.png" border="0" usemap="#_s_p_p_inherit__map" alt="Inheritance graph"/></div>
|
|
<map name="_s_p_p_inherit__map" id="_s_p_p_inherit__map">
|
|
<area shape="rect" id="node2" href="class_bluetooth_service.html" title="BluetoothService" alt="" coords="5,5,88,27"/></map>
|
|
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
|
|
<div class="dynheader">
|
|
Collaboration diagram for SPP:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="class_s_p_p__coll__graph.png" border="0" usemap="#_s_p_p_coll__map" alt="Collaboration graph"/></div>
|
|
<map name="_s_p_p_coll__map" id="_s_p_p_coll__map">
|
|
<area shape="rect" id="node2" href="class_bluetooth_service.html" title="BluetoothService" alt="" coords="5,5,88,27"/></map>
|
|
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:ae5cb4167b3ab9c891398f54729c6da81"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#ae5cb4167b3ab9c891398f54729c6da81">SPP</a> (<a class="el" href="class_b_t_d.html">BTD</a> *p, const char *name="Arduino", const char *pin="1234")</td></tr>
|
|
<tr class="separator:ae5cb4167b3ab9c891398f54729c6da81"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac90f0765c478bd624cee3b8d493d8432"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#ac90f0765c478bd624cee3b8d493d8432">operator bool</a> ()</td></tr>
|
|
<tr class="separator:ac90f0765c478bd624cee3b8d493d8432"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr><td colspan="2"><div class="groupHeader">BluetoothService implementation</div></td></tr>
|
|
<tr class="memitem:abdfe9453fb82781bec53a191c2e9fb1d"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#abdfe9453fb82781bec53a191c2e9fb1d">ACLData</a> (uint8_t *ACLData)</td></tr>
|
|
<tr class="separator:abdfe9453fb82781bec53a191c2e9fb1d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2de67ee7ad1be9d2f3daf7dc08dc5f90"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#a2de67ee7ad1be9d2f3daf7dc08dc5f90">Run</a> ()</td></tr>
|
|
<tr class="separator:a2de67ee7ad1be9d2f3daf7dc08dc5f90"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae2c661bd46cd2d74bd29c4c771cd2ef0"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#ae2c661bd46cd2d74bd29c4c771cd2ef0">Reset</a> ()</td></tr>
|
|
<tr class="separator:ae2c661bd46cd2d74bd29c4c771cd2ef0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2b4b1f85f553c6a2fdd523e50c75c7b0"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#a2b4b1f85f553c6a2fdd523e50c75c7b0">disconnect</a> ()</td></tr>
|
|
<tr class="separator:a2b4b1f85f553c6a2fdd523e50c75c7b0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr><td colspan="2"><div class="groupHeader">Serial port profile (SPP) Print functions</div></td></tr>
|
|
<tr class="memitem:a731eb43856854b6a406e9cfa3f9e57a4"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#a731eb43856854b6a406e9cfa3f9e57a4">available</a> (void)</td></tr>
|
|
<tr class="separator:a731eb43856854b6a406e9cfa3f9e57a4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a235d75f40a32a5905fd8fedcc37aa350"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#a235d75f40a32a5905fd8fedcc37aa350">flush</a> (void)</td></tr>
|
|
<tr class="separator:a235d75f40a32a5905fd8fedcc37aa350"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3149d75ba4646ba5b5428c465e983144"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#a3149d75ba4646ba5b5428c465e983144">peek</a> (void)</td></tr>
|
|
<tr class="separator:a3149d75ba4646ba5b5428c465e983144"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aae8dc037e845480f582afea57b858b95"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#aae8dc037e845480f582afea57b858b95">read</a> (void)</td></tr>
|
|
<tr class="separator:aae8dc037e845480f582afea57b858b95"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6fb231316ca9b1028322d2d2188b27b0"><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#a6fb231316ca9b1028322d2d2188b27b0">write</a> (uint8_t data)</td></tr>
|
|
<tr class="separator:a6fb231316ca9b1028322d2d2188b27b0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8bb421b7d948c3ffefc23aef95813192"><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#a8bb421b7d948c3ffefc23aef95813192">write</a> (const uint8_t *data, size_t size)</td></tr>
|
|
<tr class="separator:a8bb421b7d948c3ffefc23aef95813192"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab6c20e303965056403ae5aef1d228858"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#ab6c20e303965056403ae5aef1d228858">send</a> (void)</td></tr>
|
|
<tr class="separator:ab6c20e303965056403ae5aef1d228858"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
|
Public Attributes</h2></td></tr>
|
|
<tr class="memitem:ade5d4f0ab50ddcad14f75fce4450a028"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_p.html#ade5d4f0ab50ddcad14f75fce4450a028">connected</a></td></tr>
|
|
<tr class="separator:ade5d4f0ab50ddcad14f75fce4450a028"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>This <a class="el" href="class_bluetooth_service.html">BluetoothService</a> class implements the Serial Port Protocol (<a class="el" href="class_s_p_p.html">SPP</a>). </p>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8h_source.html#l00093">93</a> of file <a class="el" href="_s_p_p_8h_source.html">SPP.h</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" id="ae5cb4167b3ab9c891398f54729c6da81"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">SPP::SPP </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="class_b_t_d.html">BTD</a> * </td>
|
|
<td class="paramname"><em>p</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>name</em> = <code>"Arduino"</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>pin</em> = <code>"1234"</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Constructor for the <a class="el" href="class_s_p_p.html">SPP</a> class. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">p</td><td>Pointer to <a class="el" href="class_b_t_d.html">BTD</a> class instance. </td></tr>
|
|
<tr><td class="paramname">name</td><td>Set the name to <a class="el" href="class_b_t_d.html#a0359c0c158c864c27319810cbd1534f9">BTD::btdName</a>. If argument is omitted, then "Arduino" will be used. </td></tr>
|
|
<tr><td class="paramname">pin</td><td>Write the pin to <a class="el" href="class_b_t_d.html#a215cb939c01ed3ff56db37841224546c">BTD::btdPin</a>. If argument is omitted, then "1234" will be used. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00045">45</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="ac90f0765c478bd624cee3b8d493d8432"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">SPP::operator bool </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Used to provide Boolean tests for the class. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Return true if <a class="el" href="class_s_p_p.html">SPP</a> communication is connected. </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8h_source.html#l00107">107</a> of file <a class="el" href="_s_p_p_8h_source.html">SPP.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="abdfe9453fb82781bec53a191c2e9fb1d"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void SPP::ACLData </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t * </td>
|
|
<td class="paramname"><em>ACLData</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Used to pass acldata to the services. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">ACLData</td><td>Incoming acldata. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Reimplemented from <a class="el" href="class_bluetooth_service.html#a8dc98310fe481357eaa86c53e49af113">BluetoothService</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00085">85</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2de67ee7ad1be9d2f3daf7dc08dc5f90"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void SPP::Run </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Used to establish the connection automatically. </p>
|
|
|
|
<p>Reimplemented from <a class="el" href="class_bluetooth_service.html#a680692ff13cb37eb81ddbb74bc9e0383">BluetoothService</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00410">410</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ae2c661bd46cd2d74bd29c4c771cd2ef0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void SPP::Reset </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Use this to reset the service. </p>
|
|
|
|
<p>Reimplemented from <a class="el" href="class_bluetooth_service.html#a1dff7caf251f1d8a5f358b368445cb48">BluetoothService</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00063">63</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2b4b1f85f553c6a2fdd523e50c75c7b0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void SPP::disconnect </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Used this to disconnect the virtual serial port. </p>
|
|
|
|
<p>Reimplemented from <a class="el" href="class_bluetooth_service.html#a66ee2f09c6087b82e3920c3d652a99b2">BluetoothService</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00073">73</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a731eb43856854b6a406e9cfa3f9e57a4"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int SPP::available </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Get number of bytes waiting to be read. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Return the number of bytes ready to be read. </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00773">773</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a235d75f40a32a5905fd8fedcc37aa350"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void SPP::flush </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Discard all the bytes in the buffer. </p>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00777">777</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a3149d75ba4646ba5b5428c465e983144"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int SPP::peek </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Used to read the next value in the buffer without advancing to the next one. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Return the byte. Will return -1 if no bytes are available. </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00781">781</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aae8dc037e845480f582afea57b858b95"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int SPP::read </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Used to read the buffer. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Return the byte. Will return -1 if no bytes are available. </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00787">787</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a6fb231316ca9b1028322d2d2188b27b0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t SPP::write </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Writes the byte to send to a buffer. The message is send when either <a class="el" href="class_s_p_p.html#ab6c20e303965056403ae5aef1d228858">send()</a> or after Usb.Task() is called. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">data</td><td>The byte to write. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Return the number of bytes written. </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00732">732</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a8bb421b7d948c3ffefc23aef95813192"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">size_t SPP::write </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const uint8_t * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>size</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Writes the bytes to send to a buffer. The message is send when either <a class="el" href="class_s_p_p.html#ab6c20e303965056403ae5aef1d228858">send()</a> or after Usb.Task() is called. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">data</td><td>The data array to send. </td></tr>
|
|
<tr><td class="paramname">size</td><td>Size of the data. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Return the number of bytes written. </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00736">736</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab6c20e303965056403ae5aef1d228858"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void SPP::send </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>This will send all the bytes in the buffer. This is called whenever Usb.Task() is called, but can also be called via this function. </p>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8cpp_source.html#l00745">745</a> of file <a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Data Documentation</h2>
|
|
<a class="anchor" id="ade5d4f0ab50ddcad14f75fce4450a028"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool SPP::connected</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Variable used to indicate if the connection is established. </p>
|
|
|
|
<p>Definition at line <a class="el" href="_s_p_p_8h_source.html#l00111">111</a> of file <a class="el" href="_s_p_p_8h_source.html">SPP.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li><a class="el" href="_s_p_p_8h_source.html">SPP.h</a></li>
|
|
<li><a class="el" href="_s_p_p_8cpp_source.html">SPP.cpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.3.1
|
|
</small></address>
|
|
</body>
|
|
</html>
|