USB_Host_Shield_2.0/class_p_s4_b_t.html
2014-01-10 18:20:37 +01:00

482 lines
26 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.6"/>
<title>USB Host Shield 2.0: PS4BT 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.6 -->
<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&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</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> &#124;
<a href="class_p_s4_b_t-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">PS4BT Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="_p_s4_b_t_8h_source.html">PS4BT.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for PS4BT:</div>
<div class="dyncontent">
<div class="center"><img src="class_p_s4_b_t__inherit__graph.png" border="0" usemap="#_p_s4_b_t_inherit__map" alt="Inheritance graph"/></div>
<map name="_p_s4_b_t_inherit__map" id="_p_s4_b_t_inherit__map">
<area shape="rect" id="node2" href="class_h_i_d_report_parser.html" title="HIDReportParser" alt="" coords="5,6,128,34"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for PS4BT:</div>
<div class="dyncontent">
<div class="center"><img src="class_p_s4_b_t__coll__graph.png" border="0" usemap="#_p_s4_b_t_coll__map" alt="Collaboration graph"/></div>
<map name="_p_s4_b_t_coll__map" id="_p_s4_b_t_coll__map">
<area shape="rect" id="node2" href="class_h_i_d_report_parser.html" title="HIDReportParser" alt="" coords="5,6,128,34"/></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:abf535806616e6cacf6707dc96279f1c1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#abf535806616e6cacf6707dc96279f1c1">PS4BT</a> (<a class="el" href="class_b_t_h_i_d.html">BTHID</a> *p)</td></tr>
<tr class="separator:abf535806616e6cacf6707dc96279f1c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d0d9b579a008f681471d595843af8d1"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#a2d0d9b579a008f681471d595843af8d1">Parse</a> (<a class="el" href="class_h_i_d.html">HID</a> *hid, bool is_rpt_id, uint8_t len, uint8_t *buf)</td></tr>
<tr class="separator:a2d0d9b579a008f681471d595843af8d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08a857b8533e59f6eb872e4c8f727405"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#a08a857b8533e59f6eb872e4c8f727405">connected</a> ()</td></tr>
<tr class="separator:a08a857b8533e59f6eb872e4c8f727405"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe83edc43707665dc9c1233d824dcae4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#abe83edc43707665dc9c1233d824dcae4">disconnect</a> ()</td></tr>
<tr class="separator:abe83edc43707665dc9c1233d824dcae4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61f45e4cc254de9f4437d3e9866a24e9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#a61f45e4cc254de9f4437d3e9866a24e9">pair</a> (void)</td></tr>
<tr class="separator:a61f45e4cc254de9f4437d3e9866a24e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60d9bd17b809303cf2840f2892698bd0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#a60d9bd17b809303cf2840f2892698bd0">Reset</a> ()</td></tr>
<tr class="separator:a60d9bd17b809303cf2840f2892698bd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63c57ecc5c678da13e7787792e385ec9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#a63c57ecc5c678da13e7787792e385ec9">attachOnInit</a> (void(*funcOnInit)(void))</td></tr>
<tr class="separator:a63c57ecc5c678da13e7787792e385ec9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">PS4 Controller functions</div></td></tr>
<tr class="memitem:a1a7935eca7794b2fb0da4a0b175a1974"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#a1a7935eca7794b2fb0da4a0b175a1974">getButtonPress</a> (<a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b)</td></tr>
<tr class="separator:a1a7935eca7794b2fb0da4a0b175a1974"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7019f43cfd9ef4860dea0ffb5b580254"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#a7019f43cfd9ef4860dea0ffb5b580254">getButtonClick</a> (<a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b)</td></tr>
<tr class="separator:a7019f43cfd9ef4860dea0ffb5b580254"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9668449b50b4e28a2f269c04f628af8"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#ad9668449b50b4e28a2f269c04f628af8">getAnalogButton</a> (<a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> a)</td></tr>
<tr class="separator:ad9668449b50b4e28a2f269c04f628af8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a889b1b544fc439b2bcc7a041272701da"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_s4_b_t.html#a889b1b544fc439b2bcc7a041272701da">getAnalogHat</a> (<a class="el" href="controller_enums_8h.html#a34dad8f0a0927471137c403216597093">AnalogHatEnum</a> a)</td></tr>
<tr class="separator:a889b1b544fc439b2bcc7a041272701da"><td class="memSeparator" colspan="2">&#160;</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 support for the PS4 controller via Bluetooth. </p>
<p>Definition at line <a class="el" href="_p_s4_b_t_8h_source.html#l00067">67</a> of file <a class="el" href="_p_s4_b_t_8h_source.html">PS4BT.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="abf535806616e6cacf6707dc96279f1c1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">PS4BT::PS4BT </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_b_t_h_i_d.html">BTHID</a> *&#160;</td>
<td class="paramname"><em>p</em></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>Constructor for the <a class="el" href="class_p_s4_b_t.html">PS4BT</a> class. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>Pointer to the <a class="el" href="class_b_t_d.html">BTD</a> class instance. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_p_s4_b_t_8h_source.html#l00073">73</a> of file <a class="el" href="_p_s4_b_t_8h_source.html">PS4BT.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a2d0d9b579a008f681471d595843af8d1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void PS4BT::Parse </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_h_i_d.html">HID</a> *&#160;</td>
<td class="paramname"><em>hid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_rpt_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>len</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>buf</em>&#160;</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>Implements <a class="el" href="class_h_i_d_report_parser.html#ad2837f3d78c7ac3f1c2b3a4815420d97">HIDReportParser</a>.</p>
<p>Definition at line <a class="el" href="_p_s4_b_t_8cpp_source.html#l00097">97</a> of file <a class="el" href="_p_s4_b_t_8cpp_source.html">PS4BT.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a1a7935eca7794b2fb0da4a0b175a1974"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool PS4BT::getButtonPress </td>
<td>(</td>
<td class="paramtype"><a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a>&#160;</td>
<td class="paramname"><em>b</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="class_p_s4_b_t.html#a1a7935eca7794b2fb0da4a0b175a1974">getButtonPress(ButtonEnum b)</a> will return true as long as the button is held down.</p>
<p>While <a class="el" href="class_p_s4_b_t.html#a7019f43cfd9ef4860dea0ffb5b580254">getButtonClick(ButtonEnum b)</a> will only return it once.</p>
<p>So you instance if you need to increase a variable once you would use <a class="el" href="class_p_s4_b_t.html#a7019f43cfd9ef4860dea0ffb5b580254">getButtonClick(ButtonEnum b)</a>, but if you need to drive a robot forward you would use <a class="el" href="class_p_s4_b_t.html#a1a7935eca7794b2fb0da4a0b175a1974">getButtonPress(ButtonEnum b)</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">b</td><td><a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> to read. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_p_s4_b_t.html#a1a7935eca7794b2fb0da4a0b175a1974">getButtonPress(ButtonEnum b)</a> will return a true as long as a button is held down, while <a class="el" href="class_p_s4_b_t.html#a7019f43cfd9ef4860dea0ffb5b580254">getButtonClick(ButtonEnum b)</a> will return true once for each button press. </dd></dl>
<p>Definition at line <a class="el" href="_p_s4_b_t_8cpp_source.html#l00060">60</a> of file <a class="el" href="_p_s4_b_t_8cpp_source.html">PS4BT.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a7019f43cfd9ef4860dea0ffb5b580254"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool PS4BT::getButtonClick </td>
<td>(</td>
<td class="paramtype"><a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a>&#160;</td>
<td class="paramname"><em>b</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="class_p_s4_b_t.html#a1a7935eca7794b2fb0da4a0b175a1974">getButtonPress(ButtonEnum b)</a> will return true as long as the button is held down.</p>
<p>While <a class="el" href="class_p_s4_b_t.html#a7019f43cfd9ef4860dea0ffb5b580254">getButtonClick(ButtonEnum b)</a> will only return it once.</p>
<p>So you instance if you need to increase a variable once you would use <a class="el" href="class_p_s4_b_t.html#a7019f43cfd9ef4860dea0ffb5b580254">getButtonClick(ButtonEnum b)</a>, but if you need to drive a robot forward you would use <a class="el" href="class_p_s4_b_t.html#a1a7935eca7794b2fb0da4a0b175a1974">getButtonPress(ButtonEnum b)</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">b</td><td><a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> to read. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_p_s4_b_t.html#a1a7935eca7794b2fb0da4a0b175a1974">getButtonPress(ButtonEnum b)</a> will return a true as long as a button is held down, while <a class="el" href="class_p_s4_b_t.html#a7019f43cfd9ef4860dea0ffb5b580254">getButtonClick(ButtonEnum b)</a> will return true once for each button press. </dd></dl>
<p>Definition at line <a class="el" href="_p_s4_b_t_8cpp_source.html#l00071">71</a> of file <a class="el" href="_p_s4_b_t_8cpp_source.html">PS4BT.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ad9668449b50b4e28a2f269c04f628af8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t PS4BT::getAnalogButton </td>
<td>(</td>
<td class="paramtype"><a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a>&#160;</td>
<td class="paramname"><em>a</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Used to get the analog value from button presses. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">a</td><td>The <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> to read. The supported buttons are: <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaba595d8bca8bc5e67c37c0a9d89becfa">UP</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaec8379af7490bb9eaaf579cf17876f38">RIGHT</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda9b0b4a95b99523966e0e34ffdadac9da">DOWN</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065">LEFT</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdae5bc7ee7d6dda5340a28f91834f10543">L1</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda0adffb24dae0c41be5b803f4d444f066">L2</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaf8d87ff07efe24755164f550526f4dac">R1</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda629d7b403cea5f826352f3aefb9a6d6a">R2</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda2fd33892864d1c342d3bead2f2d9ad56">TRIANGLE</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaa79c827759ea48f0735386c4b1188911">CIRCLE</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdad699bdf1731bd839b56c299536ba1d9d">CROSS</a>, <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda4233fbf0cafb86abcee94b38d769fc59">SQUARE</a>, and <a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda21f40778b7db9343a6ca75ec2c41ccce">T</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Analog value in the range of 0-255. </dd></dl>
<p>Definition at line <a class="el" href="_p_s4_b_t_8cpp_source.html#l00089">89</a> of file <a class="el" href="_p_s4_b_t_8cpp_source.html">PS4BT.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a889b1b544fc439b2bcc7a041272701da"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t PS4BT::getAnalogHat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="controller_enums_8h.html#a34dad8f0a0927471137c403216597093">AnalogHatEnum</a>&#160;</td>
<td class="paramname"><em>a</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Used to read the analog joystick. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">a</td><td><a class="el" href="controller_enums_8h.html#a34dad8f0a0927471137c403216597093a383cb8895dd296b7f69ce845ed16b0ca">LeftHatX</a>, <a class="el" href="controller_enums_8h.html#a34dad8f0a0927471137c403216597093af3f3925efa9762c4e9e71ac7da7a94a3">LeftHatY</a>, <a class="el" href="controller_enums_8h.html#a34dad8f0a0927471137c403216597093aaeb027a0ae5bbc6ba25e1c78a6486c7b">RightHatX</a>, and <a class="el" href="controller_enums_8h.html#a34dad8f0a0927471137c403216597093a7f1fb2db5381286691f4dec179ed5d5a">RightHatY</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return the analog value in the range of 0-255. </dd></dl>
<p>Definition at line <a class="el" href="_p_s4_b_t_8cpp_source.html#l00093">93</a> of file <a class="el" href="_p_s4_b_t_8cpp_source.html">PS4BT.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a08a857b8533e59f6eb872e4c8f727405"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool PS4BT::connected </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>True if a device is connected </p>
<p>Definition at line <a class="el" href="_p_s4_b_t_8h_source.html#l00115">115</a> of file <a class="el" href="_p_s4_b_t_8h_source.html">PS4BT.h</a>.</p>
</div>
</div>
<a class="anchor" id="abe83edc43707665dc9c1233d824dcae4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void PS4BT::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">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Used this to disconnect the devices. </p>
<p>Definition at line <a class="el" href="_p_s4_b_t_8h_source.html#l00122">122</a> of file <a class="el" href="_p_s4_b_t_8h_source.html">PS4BT.h</a>.</p>
</div>
</div>
<a class="anchor" id="a61f45e4cc254de9f4437d3e9866a24e9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void PS4BT::pair </td>
<td>(</td>
<td class="paramtype">void&#160;</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>Call this to start the paring sequence with a device </p>
<p>Definition at line <a class="el" href="_p_s4_b_t_8h_source.html#l00128">128</a> of file <a class="el" href="_p_s4_b_t_8h_source.html">PS4BT.h</a>.</p>
</div>
</div>
<a class="anchor" id="a60d9bd17b809303cf2840f2892698bd0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void PS4BT::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">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_p_s4_b_t_8h_source.html#l00133">133</a> of file <a class="el" href="_p_s4_b_t_8h_source.html">PS4BT.h</a>.</p>
</div>
</div>
<a class="anchor" id="a63c57ecc5c678da13e7787792e385ec9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void PS4BT::attachOnInit </td>
<td>(</td>
<td class="paramtype">void(*)(void)&#160;</td>
<td class="paramname"><em>funcOnInit</em></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 call your own function when the device is successfully initialized. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">funcOnInit</td><td>Function to call. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_p_s4_b_t_8h_source.html#l00153">153</a> of file <a class="el" href="_p_s4_b_t_8h_source.html">PS4BT.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_p_s4_b_t_8h_source.html">PS4BT.h</a></li>
<li><a class="el" href="_p_s4_b_t_8cpp_source.html">PS4BT.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>