USB_Host_Shield_2.0/class_switch_pro_parser.html
2021-05-09 20:48:09 +00:00

1120 lines
54 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>USB Host Shield 2.0: SwitchProParser 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/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></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 id="projectalign" 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.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</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_switch_pro_parser-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">SwitchProParser Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for SwitchProParser:</div>
<div class="dyncontent">
<div class="center"><img src="class_switch_pro_parser__inherit__graph.png" border="0" usemap="#_switch_pro_parser_inherit__map" alt="Inheritance graph"/></div>
<map name="_switch_pro_parser_inherit__map" id="_switch_pro_parser_inherit__map">
<area shape="rect" title=" " alt="" coords="59,5,185,32"/>
<area shape="rect" href="class_switch_pro_b_t.html" title=" " alt="" coords="5,80,108,107"/>
<area shape="rect" href="class_switch_pro_u_s_b.html" title=" " alt="" coords="132,80,245,107"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for SwitchProParser:</div>
<div class="dyncontent">
<div class="center"><img src="class_switch_pro_parser__coll__graph.png" border="0" usemap="#_switch_pro_parser_coll__map" alt="Collaboration graph"/></div>
<map name="_switch_pro_parser_coll__map" id="_switch_pro_parser_coll__map">
<area shape="rect" title=" " alt="" coords="7,95,134,121"/>
<area shape="rect" href="struct_switch_pro_output.html" title=" " alt="" coords="5,5,136,32"/>
</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:a85db48692252c7f28c91c5582ed022c3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a85db48692252c7f28c91c5582ed022c3">SwitchProParser</a> ()</td></tr>
<tr class="separator:a85db48692252c7f28c91c5582ed022c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Switch Pro Controller functions</h2></td></tr>
<tr class="memitem:af381fc1fc4eccfac00e628786d8b7092"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_switch_pro_output.html">SwitchProOutput</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#af381fc1fc4eccfac00e628786d8b7092">switchProOutput</a></td></tr>
<tr class="separator:af381fc1fc4eccfac00e628786d8b7092"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a292e664f95d4c5b410ca79a9450c46a3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a292e664f95d4c5b410ca79a9450c46a3">getButtonPress</a> (<a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b)</td></tr>
<tr class="separator:a292e664f95d4c5b410ca79a9450c46a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a163612831c3f1f9327f085a3104ed0d4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a163612831c3f1f9327f085a3104ed0d4">getButtonClick</a> (<a class="el" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b)</td></tr>
<tr class="separator:a163612831c3f1f9327f085a3104ed0d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f87ee43a2313148f9e8376406b0d563"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a0f87ee43a2313148f9e8376406b0d563">getAnalogHat</a> (<a class="el" href="controller_enums_8h.html#a34dad8f0a0927471137c403216597093">AnalogHatEnum</a> a)</td></tr>
<tr class="separator:a0f87ee43a2313148f9e8376406b0d563"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3877333d3c4c8407d10351b759835e01"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a3877333d3c4c8407d10351b759835e01">enableImu</a> (bool enable)</td></tr>
<tr class="separator:a3877333d3c4c8407d10351b759835e01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ef4f1ea633a25ac736cbd86b5fdeb27"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a1ef4f1ea633a25ac736cbd86b5fdeb27">getAngle</a> (<a class="el" href="controller_enums_8h.html#a7c7824a10a9ffa8fea85602fcf4d84e6">AngleEnum</a> a)</td></tr>
<tr class="separator:a1ef4f1ea633a25ac736cbd86b5fdeb27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40e2e73968f611b9eda6f7fb51cd69e1"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a40e2e73968f611b9eda6f7fb51cd69e1">getSensor</a> (<a class="el" href="controller_enums_8h.html#a00d5030559c481763282483889597d51">SensorEnum</a> s)</td></tr>
<tr class="separator:a40e2e73968f611b9eda6f7fb51cd69e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a610f4352736e66dd771bdf861d0c15ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a610f4352736e66dd771bdf861d0c15ea">setAllOff</a> ()</td></tr>
<tr class="separator:a610f4352736e66dd771bdf861d0c15ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa53fdd73be6381ed34b679e8a22d40fd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#aa53fdd73be6381ed34b679e8a22d40fd">setRumbleOff</a> ()</td></tr>
<tr class="separator:aa53fdd73be6381ed34b679e8a22d40fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae728c5d688da18e88a33262ed2badb8b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#ae728c5d688da18e88a33262ed2badb8b">setRumbleToggle</a> ()</td></tr>
<tr class="separator:ae728c5d688da18e88a33262ed2badb8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cf06c32c5c5ae134a1575311ce5bd2c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a1cf06c32c5c5ae134a1575311ce5bd2c">setRumble</a> (bool leftRumbleOn, bool rightRumbleOn)</td></tr>
<tr class="separator:a1cf06c32c5c5ae134a1575311ce5bd2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af438f8f06fadfd270b525b0b83b7ef6e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#af438f8f06fadfd270b525b0b83b7ef6e">setRumbleLeft</a> (bool on)</td></tr>
<tr class="separator:af438f8f06fadfd270b525b0b83b7ef6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90b47bca515de4f3909dfb841e3817d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a90b47bca515de4f3909dfb841e3817d6">setRumbleRight</a> (bool on)</td></tr>
<tr class="separator:a90b47bca515de4f3909dfb841e3817d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bcc2cf9e69e4f90d81cb0869f55ca05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a4bcc2cf9e69e4f90d81cb0869f55ca05">setLedRaw</a> (uint8_t mask)</td></tr>
<tr class="separator:a4bcc2cf9e69e4f90d81cb0869f55ca05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17f1aef8f55bb2845edb2a255037b76b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a17f1aef8f55bb2845edb2a255037b76b">setLedOff</a> ()</td></tr>
<tr class="separator:a17f1aef8f55bb2845edb2a255037b76b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e8f055fe136eb9c3b646ff12b2b261a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a2e8f055fe136eb9c3b646ff12b2b261a">setLedOff</a> (<a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a> a)</td></tr>
<tr class="separator:a2e8f055fe136eb9c3b646ff12b2b261a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7956f6c328bdf5113c57b56d235572a7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a7956f6c328bdf5113c57b56d235572a7">setLedOn</a> (<a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a> a)</td></tr>
<tr class="separator:a7956f6c328bdf5113c57b56d235572a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6216e3f43b17e84226c95ef0b1f8e69b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a6216e3f43b17e84226c95ef0b1f8e69b">setLedToggle</a> (<a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a> a)</td></tr>
<tr class="separator:a6216e3f43b17e84226c95ef0b1f8e69b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a23a1d822f97a3502502854dc8e2f8a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a2a23a1d822f97a3502502854dc8e2f8a">setLedHomeOff</a> ()</td></tr>
<tr class="separator:a2a23a1d822f97a3502502854dc8e2f8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4d90c6a9e1b275beb6982d834874cae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#af4d90c6a9e1b275beb6982d834874cae">setLedHomeOn</a> ()</td></tr>
<tr class="separator:af4d90c6a9e1b275beb6982d834874cae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3656bc02dc69dd62549f72084991ba6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#ab3656bc02dc69dd62549f72084991ba6">setLedHomeToggle</a> ()</td></tr>
<tr class="separator:ab3656bc02dc69dd62549f72084991ba6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9afb7a6557642cfc71d8f70f3e2d1c25"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a9afb7a6557642cfc71d8f70f3e2d1c25">getMessageCounter</a> ()</td></tr>
<tr class="separator:a9afb7a6557642cfc71d8f70f3e2d1c25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11c576f9a670ce43956a00e83b38e87e"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a11c576f9a670ce43956a00e83b38e87e">getBatteryLevel</a> ()</td></tr>
<tr class="separator:a11c576f9a670ce43956a00e83b38e87e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a89147ec13b27bd368240c7ee8a92b2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a3a89147ec13b27bd368240c7ee8a92b2">isCharging</a> ()</td></tr>
<tr class="separator:a3a89147ec13b27bd368240c7ee8a92b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae367fa9a7d7246765230473bac09b101"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#ae367fa9a7d7246765230473bac09b101">Parse</a> (uint8_t len, uint8_t *buf)</td></tr>
<tr class="separator:ae367fa9a7d7246765230473bac09b101"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2f27f3be01e18845d102bd6f24c87fa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#ac2f27f3be01e18845d102bd6f24c87fa">Reset</a> ()</td></tr>
<tr class="separator:ac2f27f3be01e18845d102bd6f24c87fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cb8e11033817f3e8eb968bd8541c052"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a0cb8e11033817f3e8eb968bd8541c052">sendOutputReport</a> (uint8_t *data, uint8_t len)=0</td></tr>
<tr class="separator:a0cb8e11033817f3e8eb968bd8541c052"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1a55bb91dff131b50eb3a7ea4543470"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#ac1a55bb91dff131b50eb3a7ea4543470">sendHandshake</a> ()</td></tr>
<tr class="separator:ac1a55bb91dff131b50eb3a7ea4543470"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e853cd5d73f424610f0e78fcbd65b1a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_switch_pro_parser.html#a4e853cd5d73f424610f0e78fcbd65b1a">disableTimeout</a> ()</td></tr>
<tr class="separator:a4e853cd5d73f424610f0e78fcbd65b1a"><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 class parses all the data sent by the Switch Pro controller </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00141">141</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a85db48692252c7f28c91c5582ed022c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85db48692252c7f28c91c5582ed022c3">&#9670;&nbsp;</a></span>SwitchProParser()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">SwitchProParser::SwitchProParser </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>Constructor for the <a class="el" href="class_switch_pro_parser.html">SwitchProParser</a> class. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00144">144</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a292e664f95d4c5b410ca79a9450c46a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a292e664f95d4c5b410ca79a9450c46a3">&#9670;&nbsp;</a></span>getButtonPress()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SwitchProParser::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_switch_pro_parser.html#a292e664f95d4c5b410ca79a9450c46a3">getButtonPress(ButtonEnum b)</a> will return true as long as the button is held down.</p>
<p>While <a class="el" href="class_switch_pro_parser.html#a163612831c3f1f9327f085a3104ed0d4">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_switch_pro_parser.html#a163612831c3f1f9327f085a3104ed0d4">getButtonClick(ButtonEnum b)</a>, but if you need to drive a robot forward you would use <a class="el" href="class_switch_pro_parser.html#a292e664f95d4c5b410ca79a9450c46a3">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_switch_pro_parser.html#a292e664f95d4c5b410ca79a9450c46a3">getButtonPress(ButtonEnum b)</a> will return a true as long as a button is held down, while <a class="el" href="class_switch_pro_parser.html#a163612831c3f1f9327f085a3104ed0d4">getButtonClick(ButtonEnum b)</a> will return true once for each button press. </dd></dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8cpp_source.html#l00029">29</a> of file <a class="el" href="_switch_pro_parser_8cpp_source.html">SwitchProParser.cpp</a>.</p>
</div>
</div>
<a id="a163612831c3f1f9327f085a3104ed0d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a163612831c3f1f9327f085a3104ed0d4">&#9670;&nbsp;</a></span>getButtonClick()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SwitchProParser::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>Allow derived classes to access the output variables. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8cpp_source.html#l00034">34</a> of file <a class="el" href="_switch_pro_parser_8cpp_source.html">SwitchProParser.cpp</a>.</p>
</div>
</div>
<a id="a0f87ee43a2313148f9e8376406b0d563"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f87ee43a2313148f9e8376406b0d563">&#9670;&nbsp;</a></span>getAnalogHat()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int16_t SwitchProParser::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 as a signed 16-bit value. </dd></dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8cpp_source.html#l00042">42</a> of file <a class="el" href="_switch_pro_parser_8cpp_source.html">SwitchProParser.cpp</a>.</p>
</div>
</div>
<a id="a3877333d3c4c8407d10351b759835e01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3877333d3c4c8407d10351b759835e01">&#9670;&nbsp;</a></span>enableImu()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::enableImu </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>enable</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 enable/disable the IMU. By default it is disabled. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">enable</td><td>Enable/disable the IMU. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00174">174</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a1ef4f1ea633a25ac736cbd86b5fdeb27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ef4f1ea633a25ac736cbd86b5fdeb27">&#9670;&nbsp;</a></span>getAngle()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">float SwitchProParser::getAngle </td>
<td>(</td>
<td class="paramtype"><a class="el" href="controller_enums_8h.html#a7c7824a10a9ffa8fea85602fcf4d84e6">AngleEnum</a>&#160;</td>
<td class="paramname"><em>a</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>Get the angle of the controller calculated using the accelerometer. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">a</td><td>Either <a class="el" href="controller_enums_8h.html#a7c7824a10a9ffa8fea85602fcf4d84e6ae3a34b760fa4a6854f28852e91d8bb47">Pitch</a> or <a class="el" href="controller_enums_8h.html#a7c7824a10a9ffa8fea85602fcf4d84e6a9d80e5f030503ccac779c6491826a173">Roll</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return the angle in the range of 0-360. </dd></dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00184">184</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a40e2e73968f611b9eda6f7fb51cd69e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40e2e73968f611b9eda6f7fb51cd69e1">&#9670;&nbsp;</a></span>getSensor()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int16_t SwitchProParser::getSensor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="controller_enums_8h.html#a00d5030559c481763282483889597d51">SensorEnum</a>&#160;</td>
<td class="paramname"><em>s</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 get the raw values from the 3-axis gyroscope and 3-axis accelerometer inside the PS5 controller. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">s</td><td>The sensor to read. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the raw sensor reading. </dd></dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00196">196</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a610f4352736e66dd771bdf861d0c15ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a610f4352736e66dd771bdf861d0c15ea">&#9670;&nbsp;</a></span>setAllOff()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setAllOff </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>Turn both rumble and the LEDs off. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00216">216</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="aa53fdd73be6381ed34b679e8a22d40fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa53fdd73be6381ed34b679e8a22d40fd">&#9670;&nbsp;</a></span>setRumbleOff()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setRumbleOff </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>Set rumble off. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00223">223</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="ae728c5d688da18e88a33262ed2badb8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae728c5d688da18e88a33262ed2badb8b">&#9670;&nbsp;</a></span>setRumbleToggle()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setRumbleToggle </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>Toggle rumble. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00228">228</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a1cf06c32c5c5ae134a1575311ce5bd2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cf06c32c5c5ae134a1575311ce5bd2c">&#9670;&nbsp;</a></span>setRumble()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setRumble </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>leftRumbleOn</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>rightRumbleOn</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">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Turn on/off rumble. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">leftRumbleOn</td><td>Turn on/off left rumble motor. </td></tr>
<tr><td class="paramname">rightRumbleOn</td><td>Turn on/off right rumble motor. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00237">237</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="af438f8f06fadfd270b525b0b83b7ef6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af438f8f06fadfd270b525b0b83b7ef6e">&#9670;&nbsp;</a></span>setRumbleLeft()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setRumbleLeft </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>on</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>Turn on/off the left rumble. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">on</td><td>Turn on/off left rumble motor. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00247">247</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a90b47bca515de4f3909dfb841e3817d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90b47bca515de4f3909dfb841e3817d6">&#9670;&nbsp;</a></span>setRumbleRight()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setRumbleRight </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>on</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>Turn on/off the right rumble. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">on</td><td>Turn on/off right rumble motor. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00256">256</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a4bcc2cf9e69e4f90d81cb0869f55ca05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bcc2cf9e69e4f90d81cb0869f55ca05">&#9670;&nbsp;</a></span>setLedRaw()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setLedRaw </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>mask</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>Set LED value without using the <a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a>. This can also be used to flash the LEDs by setting the high 4-bits of the mask. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">value</td><td>See: <a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a>. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00266">266</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a17f1aef8f55bb2845edb2a255037b76b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17f1aef8f55bb2845edb2a255037b76b">&#9670;&nbsp;</a></span>setLedOff() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setLedOff </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>Turn all LEDs off. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00272">272</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a2e8f055fe136eb9c3b646ff12b2b261a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e8f055fe136eb9c3b646ff12b2b261a">&#9670;&nbsp;</a></span>setLedOff() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setLedOff </td>
<td>(</td>
<td class="paramtype"><a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a>&#160;</td>
<td class="paramname"><em>a</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>Turn the specific <a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a> off. </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#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a> to turn off. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00280">280</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a7956f6c328bdf5113c57b56d235572a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7956f6c328bdf5113c57b56d235572a7">&#9670;&nbsp;</a></span>setLedOn()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setLedOn </td>
<td>(</td>
<td class="paramtype"><a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a>&#160;</td>
<td class="paramname"><em>a</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>Turn the specific <a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a> on. </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#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a> to turn on. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00289">289</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a6216e3f43b17e84226c95ef0b1f8e69b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6216e3f43b17e84226c95ef0b1f8e69b">&#9670;&nbsp;</a></span>setLedToggle()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setLedToggle </td>
<td>(</td>
<td class="paramtype"><a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a>&#160;</td>
<td class="paramname"><em>a</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>Toggle the specific <a class="el" href="controller_enums_8h.html#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a>. </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#a70df64e026046bc352983127b7ae2cf0">LEDEnum</a> to toggle. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00298">298</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a2a23a1d822f97a3502502854dc8e2f8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a23a1d822f97a3502502854dc8e2f8a">&#9670;&nbsp;</a></span>setLedHomeOff()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setLedHomeOff </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>Turn home LED off. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00304">304</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="af4d90c6a9e1b275beb6982d834874cae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4d90c6a9e1b275beb6982d834874cae">&#9670;&nbsp;</a></span>setLedHomeOn()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setLedHomeOn </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>Turn home LED on. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00310">310</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="ab3656bc02dc69dd62549f72084991ba6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3656bc02dc69dd62549f72084991ba6">&#9670;&nbsp;</a></span>setLedHomeToggle()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::setLedHomeToggle </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>Toggle home LED. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00316">316</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a9afb7a6557642cfc71d8f70f3e2d1c25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9afb7a6557642cfc71d8f70f3e2d1c25">&#9670;&nbsp;</a></span>getMessageCounter()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint16_t SwitchProParser::getMessageCounter </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>Get the incoming message count. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00322">322</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a11c576f9a670ce43956a00e83b38e87e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11c576f9a670ce43956a00e83b38e87e">&#9670;&nbsp;</a></span>getBatteryLevel()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint8_t SwitchProParser::getBatteryLevel </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>Return the battery level of the Switch Pro Controller. </p><dl class="section return"><dt>Returns</dt><dd>The battery level as a bit mask according to ::SwitchProBatteryLevel: 4=full, 3=medium, 2=low, 1=critical, 0=empty. </dd></dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00331">331</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a3a89147ec13b27bd368240c7ee8a92b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a89147ec13b27bd368240c7ee8a92b2">&#9670;&nbsp;</a></span>isCharging()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool SwitchProParser::isCharging </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>Returns whenever the controller is plugged in and charging. </p><dl class="section return"><dt>Returns</dt><dd>Returns True if the controller is charging. </dd></dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00339">339</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="ae367fa9a7d7246765230473bac09b101"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae367fa9a7d7246765230473bac09b101">&#9670;&nbsp;</a></span>Parse()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::Parse </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">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Used to parse data sent from the Switch Pro controller. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">len</td><td>Length of the data. </td></tr>
<tr><td class="paramname">buf</td><td>Pointer to the data buffer. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8cpp_source.html#l00055">55</a> of file <a class="el" href="_switch_pro_parser_8cpp_source.html">SwitchProParser.cpp</a>.</p>
</div>
</div>
<a id="ac2f27f3be01e18845d102bd6f24c87fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2f27f3be01e18845d102bd6f24c87fa">&#9670;&nbsp;</a></span>Reset()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SwitchProParser::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">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Used to reset the different buffers to their default values </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8cpp_source.html#l00231">231</a> of file <a class="el" href="_switch_pro_parser_8cpp_source.html">SwitchProParser.cpp</a>.</p>
</div>
</div>
<a id="a0cb8e11033817f3e8eb968bd8541c052"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0cb8e11033817f3e8eb968bd8541c052">&#9670;&nbsp;</a></span>sendOutputReport()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void SwitchProParser::sendOutputReport </td>
<td>(</td>
<td class="paramtype">uint8_t *&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>len</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">protected</span><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Send the output to the Switch Pro controller. This is implemented in <a class="el" href="_switch_pro_b_t_8h.html">SwitchProBT.h</a> and <a class="el" href="_switch_pro_u_s_b_8h.html">SwitchProUSB.h</a>. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data</td><td>Pointer to buffer to send by the derived class. </td></tr>
<tr><td class="paramname">len</td><td>Length of buffer. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="class_switch_pro_u_s_b.html#a7c29494aae157c4e268247b02132f54f">SwitchProUSB</a>, and <a class="el" href="class_switch_pro_b_t.html#a7b394d6ccc473f158d19e5354a257fdd">SwitchProBT</a>.</p>
</div>
</div>
<a id="ac1a55bb91dff131b50eb3a7ea4543470"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1a55bb91dff131b50eb3a7ea4543470">&#9670;&nbsp;</a></span>sendHandshake()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void SwitchProParser::sendHandshake </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 class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Used to send a handshake command via <a class="el" href="class_u_s_b.html">USB</a> before disabling the timeout. </p>
<p>Reimplemented in <a class="el" href="class_switch_pro_u_s_b.html#abbeb301f7638c60bde9e183d7229fca9">SwitchProUSB</a>.</p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00362">362</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<a id="a4e853cd5d73f424610f0e78fcbd65b1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e853cd5d73f424610f0e78fcbd65b1a">&#9670;&nbsp;</a></span>disableTimeout()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void SwitchProParser::disableTimeout </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 class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Needed to disable <a class="el" href="class_u_s_b.html">USB</a> timeout for the controller, so it sends out data without the host having to send data continuously. </p>
<p>Reimplemented in <a class="el" href="class_switch_pro_u_s_b.html#a2019333fe0252d0911037762fd69856e">SwitchProUSB</a>.</p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00368">368</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="af381fc1fc4eccfac00e628786d8b7092"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af381fc1fc4eccfac00e628786d8b7092">&#9670;&nbsp;</a></span>switchProOutput</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="struct_switch_pro_output.html">SwitchProOutput</a> SwitchProParser::switchProOutput</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Allow derived classes to access the output variables. </p>
<p class="definition">Definition at line <a class="el" href="_switch_pro_parser_8h_source.html#l00371">371</a> of file <a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_switch_pro_parser_8h_source.html">SwitchProParser.h</a></li>
<li><a class="el" href="_switch_pro_parser_8cpp_source.html">SwitchProParser.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.17
</small></address>
</body>
</html>