mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
deploy: 3f61d9af2a
This commit is contained in:
parent
ed596583c7
commit
af21161c6b
5 changed files with 213 additions and 211 deletions
|
@ -144,8 +144,8 @@ $(function() {
|
|||
<div class="ttc" id="aclass_b_t_h_i_d_html"><div class="ttname"><a href="class_b_t_h_i_d.html">BTHID</a></div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8h_source.html#l00029">BTHID.h:29</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_b_t_html_aeeb574cc4eaf359c4715245309da71bf"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_b_t.html#aeeb574cc4eaf359c4715245309da71bf">XBOXONESBT::ResetBTHID</a></div><div class="ttdeci">virtual void ResetBTHID()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_b_t_8h_source.html#l00070">XBOXONESBT.h:70</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_b_t_html_ac75cd4c7f8283c8b101c7ec3f3e588aa"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_b_t.html#ac75cd4c7f8283c8b101c7ec3f3e588aa">XBOXONESBT::OnInitBTHID</a></div><div class="ttdeci">virtual void OnInitBTHID()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_b_t_8h_source.html#l00065">XBOXONESBT.h:65</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ab738326926b13d4f40d5bbed34640054"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ab738326926b13d4f40d5bbed34640054">XBOXONESParser::Parse</a></div><div class="ttdeci">void Parse(uint8_t len, uint8_t *buf)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00120">XBOXONESParser.cpp:120</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ac71c0a2e5e6e61f3bb57409c991c7bcb"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ac71c0a2e5e6e61f3bb57409c991c7bcb">XBOXONESParser::Reset</a></div><div class="ttdeci">void Reset()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00179">XBOXONESParser.cpp:179</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ab738326926b13d4f40d5bbed34640054"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ab738326926b13d4f40d5bbed34640054">XBOXONESParser::Parse</a></div><div class="ttdeci">void Parse(uint8_t len, uint8_t *buf)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00121">XBOXONESParser.cpp:121</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ac71c0a2e5e6e61f3bb57409c991c7bcb"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ac71c0a2e5e6e61f3bb57409c991c7bcb">XBOXONESParser::Reset</a></div><div class="ttdeci">void Reset()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00180">XBOXONESParser.cpp:180</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_b_t_html_a37ad6e18637b003e2ee39eae7d6f1949"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_b_t.html#a37ad6e18637b003e2ee39eae7d6f1949">XBOXONESBT::connected</a></div><div class="ttdeci">bool connected()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_b_t_8h_source.html#l00045">XBOXONESBT.h:45</a></div></div>
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
|
|
|
@ -171,7 +171,7 @@ Variables</h2></td></tr>
|
|||
<tr><td class="fieldname"><a id="a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743"></a>DPAD_LEFT_UP </td><td class="fielddoc"></td></tr>
|
||||
</table>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00045">45</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00046">46</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -206,6 +206,7 @@ Variables</h2></td></tr>
|
|||
<div class="line"> 0x08, </div>
|
||||
<div class="line"> 0x0A, </div>
|
||||
<div class="line"> 0x0B, </div>
|
||||
<div class="line"> 0, </div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>Buttons on the controller </p>
|
||||
|
||||
|
|
|
@ -107,220 +107,221 @@ $(function() {
|
|||
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  0x08, <span class="comment">// A</span></div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  0x0A, <span class="comment">// X</span></div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  0x0B, <span class="comment">// Y</span></div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> };</div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62"> 45</a></span> <span class="keyword">enum</span> <a class="code" href="_p_s4_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62">DPADEnum</a> {</div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044"> 46</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044">DPAD_OFF</a> = 0x0,</div>
|
||||
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aafb58dc961545afb332266b117e4a332"> 47</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aafb58dc961545afb332266b117e4a332">DPAD_UP</a> = 0x1,</div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0"> 48</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0">DPAD_UP_RIGHT</a> = 0x2,</div>
|
||||
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62af0f91a0468a0f49170b119f7de0d5cec"> 49</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62af0f91a0468a0f49170b119f7de0d5cec">DPAD_RIGHT</a> = 0x3,</div>
|
||||
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0"> 50</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0">DPAD_RIGHT_DOWN</a> = 0x4,</div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ab5e7d62ac3dfe6a925d1d6be3c756faa"> 51</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ab5e7d62ac3dfe6a925d1d6be3c756faa">DPAD_DOWN</a> = 0x5,</div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66"> 52</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66">DPAD_DOWN_LEFT</a> = 0x6,</div>
|
||||
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62afe9bfbd6550b91f6640b74a155000cba"> 53</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62afe9bfbd6550b91f6640b74a155000cba">DPAD_LEFT</a> = 0x7,</div>
|
||||
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743"> 54</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743">DPAD_LEFT_UP</a> = 0x8,</div>
|
||||
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> };</div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  </div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> int8_t XBOXONESParser::getButtonIndexXboxOneS(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b) {</div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">const</span> int8_t index = <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(b);</div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keywordflow">if</span> ((uint8_t) index >= (<span class="keyword">sizeof</span>(<a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#afe96a451aa400a754c28b9bedb7c7ef8">XBOX_ONE_S_BUTTONS</a>) / <span class="keyword">sizeof</span>(<a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#afe96a451aa400a754c28b9bedb7c7ef8">XBOX_ONE_S_BUTTONS</a>[0]))) <span class="keywordflow">return</span> -1;</div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">return</span> index;</div>
|
||||
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> }</div>
|
||||
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  </div>
|
||||
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="keywordtype">bool</span> XBOXONESParser::checkDpad(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b) {</div>
|
||||
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">switch</span> (b) {</div>
|
||||
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordflow">case</span> <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaba595d8bca8bc5e67c37c0a9d89becfa">UP</a>:</div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743">DPAD_LEFT_UP</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aafb58dc961545afb332266b117e4a332">DPAD_UP</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0">DPAD_UP_RIGHT</a>;</div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">case</span> <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaec8379af7490bb9eaaf579cf17876f38">RIGHT</a>:</div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0">DPAD_UP_RIGHT</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62af0f91a0468a0f49170b119f7de0d5cec">DPAD_RIGHT</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0">DPAD_RIGHT_DOWN</a>;</div>
|
||||
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">case</span> <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda9b0b4a95b99523966e0e34ffdadac9da">DOWN</a>:</div>
|
||||
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0">DPAD_RIGHT_DOWN</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ab5e7d62ac3dfe6a925d1d6be3c756faa">DPAD_DOWN</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66">DPAD_DOWN_LEFT</a>;</div>
|
||||
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keywordflow">case</span> <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065">LEFT</a>:</div>
|
||||
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66">DPAD_DOWN_LEFT</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62afe9bfbd6550b91f6640b74a155000cba">DPAD_LEFT</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743">DPAD_LEFT_UP</a>;</div>
|
||||
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  }</div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  0, <span class="comment">// XBOX - this is sent in another report</span></div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> };</div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  </div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62"> 46</a></span> <span class="keyword">enum</span> <a class="code" href="_p_s4_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62">DPADEnum</a> {</div>
|
||||
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044"> 47</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044">DPAD_OFF</a> = 0x0,</div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aafb58dc961545afb332266b117e4a332"> 48</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aafb58dc961545afb332266b117e4a332">DPAD_UP</a> = 0x1,</div>
|
||||
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0"> 49</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0">DPAD_UP_RIGHT</a> = 0x2,</div>
|
||||
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62af0f91a0468a0f49170b119f7de0d5cec"> 50</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62af0f91a0468a0f49170b119f7de0d5cec">DPAD_RIGHT</a> = 0x3,</div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0"> 51</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0">DPAD_RIGHT_DOWN</a> = 0x4,</div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ab5e7d62ac3dfe6a925d1d6be3c756faa"> 52</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ab5e7d62ac3dfe6a925d1d6be3c756faa">DPAD_DOWN</a> = 0x5,</div>
|
||||
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66"> 53</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66">DPAD_DOWN_LEFT</a> = 0x6,</div>
|
||||
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62afe9bfbd6550b91f6640b74a155000cba"> 54</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62afe9bfbd6550b91f6640b74a155000cba">DPAD_LEFT</a> = 0x7,</div>
|
||||
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743"> 55</a></span>  <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743">DPAD_LEFT_UP</a> = 0x8,</div>
|
||||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> };</div>
|
||||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  </div>
|
||||
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> int8_t XBOXONESParser::getButtonIndexXboxOneS(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b) {</div>
|
||||
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keyword">const</span> int8_t index = <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(b);</div>
|
||||
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">if</span> ((uint8_t) index >= (<span class="keyword">sizeof</span>(<a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#afe96a451aa400a754c28b9bedb7c7ef8">XBOX_ONE_S_BUTTONS</a>) / <span class="keyword">sizeof</span>(<a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#afe96a451aa400a754c28b9bedb7c7ef8">XBOX_ONE_S_BUTTONS</a>[0]))) <span class="keywordflow">return</span> -1;</div>
|
||||
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">return</span> index;</div>
|
||||
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> }</div>
|
||||
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  </div>
|
||||
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="keywordtype">bool</span> XBOXONESParser::checkDpad(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b) {</div>
|
||||
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordflow">switch</span> (b) {</div>
|
||||
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">case</span> <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaba595d8bca8bc5e67c37c0a9d89becfa">UP</a>:</div>
|
||||
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743">DPAD_LEFT_UP</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aafb58dc961545afb332266b117e4a332">DPAD_UP</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0">DPAD_UP_RIGHT</a>;</div>
|
||||
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">case</span> <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaec8379af7490bb9eaaf579cf17876f38">RIGHT</a>:</div>
|
||||
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0">DPAD_UP_RIGHT</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62af0f91a0468a0f49170b119f7de0d5cec">DPAD_RIGHT</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0">DPAD_RIGHT_DOWN</a>;</div>
|
||||
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">case</span> <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda9b0b4a95b99523966e0e34ffdadac9da">DOWN</a>:</div>
|
||||
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0">DPAD_RIGHT_DOWN</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ab5e7d62ac3dfe6a925d1d6be3c756faa">DPAD_DOWN</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66">DPAD_DOWN_LEFT</a>;</div>
|
||||
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">case</span> <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065">LEFT</a>:</div>
|
||||
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66">DPAD_DOWN_LEFT</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62afe9bfbd6550b91f6640b74a155000cba">DPAD_LEFT</a> || xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> == <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743">DPAD_LEFT_UP</a>;</div>
|
||||
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  }</div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#acede7059d30d10f7276336be8d2dec63"> 78</a></span> uint16_t <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#acede7059d30d10f7276336be8d2dec63">XBOXONESParser::getButtonPress</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b) {</div>
|
||||
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keyword">const</span> int8_t index = getButtonIndexXboxOneS(b); <span class="keywordflow">if</span> (index < 0) <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">if</span> (index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda0adffb24dae0c41be5b803f4d444f066">L2</a>))</div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[0];</div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda629d7b403cea5f826352f3aefb9a6d6a">R2</a>))</div>
|
||||
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[1];</div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (index <= <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065">LEFT</a>) <span class="comment">// Dpad</span></div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keywordflow">return</span> checkDpad(b);</div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdad4689acdcdf0e61373d52de14ff07eae">XBOX</a>))</div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">return</span> xboxButtonState;</div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> & (1UL << <a class="code" href="version__helper_8h.html#a48c60b057902adf805797f183286728d">pgm_read_byte</a>(&<a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#afe96a451aa400a754c28b9bedb7c7ef8">XBOX_ONE_S_BUTTONS</a>[index]));</div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> }</div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  </div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#aec1240938df5c0f3415d3e81eb12b4b7"> 91</a></span> <span class="keywordtype">bool</span> <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#aec1240938df5c0f3415d3e81eb12b4b7">XBOXONESParser::getButtonClick</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b) {</div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keyword">const</span> int8_t index = getButtonIndexXboxOneS(b); <span class="keywordflow">if</span> (index < 0) <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">if</span>(index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda0adffb24dae0c41be5b803f4d444f066">L2</a>)) {</div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordflow">if</span>(L2Clicked) {</div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  L2Clicked = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  }</div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda629d7b403cea5f826352f3aefb9a6d6a">R2</a>)) {</div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordflow">if</span>(R2Clicked) {</div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  R2Clicked = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  }</div>
|
||||
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdad4689acdcdf0e61373d52de14ff07eae">XBOX</a>)) {</div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordtype">bool</span> click = xboxbuttonClickState;</div>
|
||||
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  xboxbuttonClickState = 0; <span class="comment">// Clear "click" event</span></div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keywordflow">return</span> click;</div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  uint32_t mask = 1UL << <a class="code" href="version__helper_8h.html#a48c60b057902adf805797f183286728d">pgm_read_byte</a>(&<a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#afe96a451aa400a754c28b9bedb7c7ef8">XBOX_ONE_S_BUTTONS</a>[index]);</div>
|
||||
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordtype">bool</span> click = buttonClickState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> & mask;</div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  buttonClickState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> &= ~mask; <span class="comment">// Clear "click" event</span></div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keywordflow">return</span> click;</div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> }</div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  </div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#aa9d2ab519ae22786e4218c96539925d6"> 116</a></span> int16_t <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#aa9d2ab519ae22786e4218c96539925d6">XBOXONESParser::getAnalogHat</a>(<a class="code" href="controller_enums_8h.html#a34dad8f0a0927471137c403216597093">AnalogHatEnum</a> a) {</div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a0a0bb5c4f7cfffd5c97b6b8ed95bcad9">hatValue</a>[(uint8_t)a] - 32768; <span class="comment">// Convert to signed integer</span></div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> }</div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  </div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#ab738326926b13d4f40d5bbed34640054"> 120</a></span> <span class="keywordtype">void</span> <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#ab738326926b13d4f40d5bbed34640054">XBOXONESParser::Parse</a>(uint8_t len, uint8_t *buf) {</div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordflow">if</span> (len > 1 && buf) {</div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="preprocessor">#ifdef PRINTREPORT</span></div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <a class="code" href="message_8h.html#a27117e124c5d66d5512fe8d494fe6338">Notify</a>(<a class="code" href="version__helper_8h.html#a73809107539df84eaf01f6a4dea4fbff">PSTR</a>(<span class="stringliteral">"\r\n"</span>), 0x80);</div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">for</span> (uint8_t i = 0; i < len; i++) {</div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  D_PrintHex<uint8_t > (buf[i], 0x80);</div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <a class="code" href="message_8h.html#a27117e124c5d66d5512fe8d494fe6338">Notify</a>(<a class="code" href="version__helper_8h.html#a73809107539df84eaf01f6a4dea4fbff">PSTR</a>(<span class="stringliteral">" "</span>), 0x80);</div>
|
||||
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  }</div>
|
||||
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  </div>
|
||||
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">if</span> (buf[0] == 0x01) <span class="comment">// Check report ID</span></div>
|
||||
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  memcpy(&xboxOneSData, buf + 1, min((uint8_t)(len - 1), <a class="code" href="settings_8h.html#ab5a06671af5c2f1154fb653956959838">MFK_CASTUINT8T</a> <span class="keyword">sizeof</span>(xboxOneSData)));</div>
|
||||
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (buf[0] == 0x02) { <span class="comment">// This report contains the Xbox button</span></div>
|
||||
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  xboxButtonState = buf[1];</div>
|
||||
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordflow">if</span>(xboxButtonState != xboxOldButtonState) {</div>
|
||||
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  xboxbuttonClickState = xboxButtonState & ~xboxOldButtonState; <span class="comment">// Update click state variable</span></div>
|
||||
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  xboxOldButtonState = xboxButtonState;</div>
|
||||
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  }</div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (buf[0] == 0x04) <span class="comment">// Heartbeat</span></div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="preprocessor">#ifdef DEBUG_USB_HOST</span></div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <a class="code" href="message_8h.html#a27117e124c5d66d5512fe8d494fe6338">Notify</a>(<a class="code" href="version__helper_8h.html#a73809107539df84eaf01f6a4dea4fbff">PSTR</a>(<span class="stringliteral">"\r\nUnknown report id: "</span>), 0x80);</div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  D_PrintHex<uint8_t > (buf[0], 0x80);</div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  }</div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  </div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordflow">if</span> (xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> != oldButtonState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a>) { <span class="comment">// Check if anything has changed</span></div>
|
||||
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  buttonClickState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> = xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> & ~oldButtonState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a>; <span class="comment">// Update click state variable</span></div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  oldButtonState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> = xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a>;</div>
|
||||
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  </div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="comment">// The DPAD buttons does not set the different bits, but set a value corresponding to the buttons pressed, we will simply set the bits ourself</span></div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  uint8_t newDpad = 0;</div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keywordflow">if</span> (checkDpad(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaba595d8bca8bc5e67c37c0a9d89becfa">UP</a>))</div>
|
||||
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  newDpad |= 1 << <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaba595d8bca8bc5e67c37c0a9d89becfa">UP</a>;</div>
|
||||
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">if</span> (checkDpad(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaec8379af7490bb9eaaf579cf17876f38">RIGHT</a>))</div>
|
||||
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  newDpad |= 1 << <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaec8379af7490bb9eaaf579cf17876f38">RIGHT</a>;</div>
|
||||
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">if</span> (checkDpad(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda9b0b4a95b99523966e0e34ffdadac9da">DOWN</a>))</div>
|
||||
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  newDpad |= 1 << <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda9b0b4a95b99523966e0e34ffdadac9da">DOWN</a>;</div>
|
||||
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keywordflow">if</span> (checkDpad(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065">LEFT</a>))</div>
|
||||
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  newDpad |= 1 << <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065">LEFT</a>;</div>
|
||||
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordflow">if</span> (newDpad != oldDpad) {</div>
|
||||
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  buttonClickState.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> = newDpad & ~oldDpad; <span class="comment">// Override values</span></div>
|
||||
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  oldDpad = newDpad;</div>
|
||||
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  }</div>
|
||||
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> }</div>
|
||||
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  </div>
|
||||
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#acede7059d30d10f7276336be8d2dec63"> 79</a></span> uint16_t <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#acede7059d30d10f7276336be8d2dec63">XBOXONESParser::getButtonPress</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b) {</div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keyword">const</span> int8_t index = getButtonIndexXboxOneS(b); <span class="keywordflow">if</span> (index < 0) <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">if</span> (index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda0adffb24dae0c41be5b803f4d444f066">L2</a>))</div>
|
||||
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[0];</div>
|
||||
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda629d7b403cea5f826352f3aefb9a6d6a">R2</a>))</div>
|
||||
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[1];</div>
|
||||
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (index <= <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065">LEFT</a>) <span class="comment">// Dpad</span></div>
|
||||
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">return</span> checkDpad(b);</div>
|
||||
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdad4689acdcdf0e61373d52de14ff07eae">XBOX</a>))</div>
|
||||
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">return</span> xboxButtonState;</div>
|
||||
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> & (1UL << <a class="code" href="version__helper_8h.html#a48c60b057902adf805797f183286728d">pgm_read_byte</a>(&<a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#afe96a451aa400a754c28b9bedb7c7ef8">XBOX_ONE_S_BUTTONS</a>[index]));</div>
|
||||
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> }</div>
|
||||
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  </div>
|
||||
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#aec1240938df5c0f3415d3e81eb12b4b7"> 92</a></span> <span class="keywordtype">bool</span> <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#aec1240938df5c0f3415d3e81eb12b4b7">XBOXONESParser::getButtonClick</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a> b) {</div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keyword">const</span> int8_t index = getButtonIndexXboxOneS(b); <span class="keywordflow">if</span> (index < 0) <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordflow">if</span>(index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda0adffb24dae0c41be5b803f4d444f066">L2</a>)) {</div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordflow">if</span>(L2Clicked) {</div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  L2Clicked = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  }</div>
|
||||
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda629d7b403cea5f826352f3aefb9a6d6a">R2</a>)) {</div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">if</span>(R2Clicked) {</div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  R2Clicked = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  }</div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (index == <a class="code" href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a>(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdad4689acdcdf0e61373d52de14ff07eae">XBOX</a>)) {</div>
|
||||
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordtype">bool</span> click = xboxbuttonClickState;</div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  xboxbuttonClickState = 0; <span class="comment">// Clear "click" event</span></div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">return</span> click;</div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</div>
|
||||
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  uint32_t mask = 1UL << <a class="code" href="version__helper_8h.html#a48c60b057902adf805797f183286728d">pgm_read_byte</a>(&<a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#afe96a451aa400a754c28b9bedb7c7ef8">XBOX_ONE_S_BUTTONS</a>[index]);</div>
|
||||
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordtype">bool</span> click = buttonClickState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> & mask;</div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  buttonClickState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> &= ~mask; <span class="comment">// Clear "click" event</span></div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">return</span> click;</div>
|
||||
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> }</div>
|
||||
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  </div>
|
||||
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#aa9d2ab519ae22786e4218c96539925d6"> 117</a></span> int16_t <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#aa9d2ab519ae22786e4218c96539925d6">XBOXONESParser::getAnalogHat</a>(<a class="code" href="controller_enums_8h.html#a34dad8f0a0927471137c403216597093">AnalogHatEnum</a> a) {</div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">return</span> xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a0a0bb5c4f7cfffd5c97b6b8ed95bcad9">hatValue</a>[(uint8_t)a] - 32768; <span class="comment">// Convert to signed integer</span></div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> }</div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  </div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#ab738326926b13d4f40d5bbed34640054"> 121</a></span> <span class="keywordtype">void</span> <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#ab738326926b13d4f40d5bbed34640054">XBOXONESParser::Parse</a>(uint8_t len, uint8_t *buf) {</div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">if</span> (len > 1 && buf) {</div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="preprocessor">#ifdef PRINTREPORT</span></div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="message_8h.html#a27117e124c5d66d5512fe8d494fe6338">Notify</a>(<a class="code" href="version__helper_8h.html#a73809107539df84eaf01f6a4dea4fbff">PSTR</a>(<span class="stringliteral">"\r\n"</span>), 0x80);</div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">for</span> (uint8_t i = 0; i < len; i++) {</div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  D_PrintHex<uint8_t > (buf[i], 0x80);</div>
|
||||
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <a class="code" href="message_8h.html#a27117e124c5d66d5512fe8d494fe6338">Notify</a>(<a class="code" href="version__helper_8h.html#a73809107539df84eaf01f6a4dea4fbff">PSTR</a>(<span class="stringliteral">" "</span>), 0x80);</div>
|
||||
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  }</div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  </div>
|
||||
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">if</span> (buf[0] == 0x01) <span class="comment">// Check report ID</span></div>
|
||||
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  memcpy(&xboxOneSData, buf + 1, min((uint8_t)(len - 1), <a class="code" href="settings_8h.html#ab5a06671af5c2f1154fb653956959838">MFK_CASTUINT8T</a> <span class="keyword">sizeof</span>(xboxOneSData)));</div>
|
||||
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (buf[0] == 0x02) { <span class="comment">// This report contains the Xbox button</span></div>
|
||||
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  xboxButtonState = buf[1];</div>
|
||||
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">if</span>(xboxButtonState != xboxOldButtonState) {</div>
|
||||
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  xboxbuttonClickState = xboxButtonState & ~xboxOldButtonState; <span class="comment">// Update click state variable</span></div>
|
||||
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  xboxOldButtonState = xboxButtonState;</div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  }</div>
|
||||
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (buf[0] == 0x04) <span class="comment">// Heartbeat</span></div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="preprocessor">#ifdef DEBUG_USB_HOST</span></div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <a class="code" href="message_8h.html#a27117e124c5d66d5512fe8d494fe6338">Notify</a>(<a class="code" href="version__helper_8h.html#a73809107539df84eaf01f6a4dea4fbff">PSTR</a>(<span class="stringliteral">"\r\nUnknown report id: "</span>), 0x80);</div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  D_PrintHex<uint8_t > (buf[0], 0x80);</div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  }</div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  </div>
|
||||
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">if</span> (xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> != oldButtonState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a>) { <span class="comment">// Check if anything has changed</span></div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  buttonClickState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> = xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> & ~oldButtonState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a>; <span class="comment">// Update click state variable</span></div>
|
||||
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  oldButtonState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> = xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a>;</div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  </div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="comment">// The DPAD buttons does not set the different bits, but set a value corresponding to the buttons pressed, we will simply set the bits ourself</span></div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  uint8_t newDpad = 0;</div>
|
||||
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordflow">if</span> (checkDpad(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaba595d8bca8bc5e67c37c0a9d89becfa">UP</a>))</div>
|
||||
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  newDpad |= 1 << <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaba595d8bca8bc5e67c37c0a9d89becfa">UP</a>;</div>
|
||||
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">if</span> (checkDpad(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaec8379af7490bb9eaaf579cf17876f38">RIGHT</a>))</div>
|
||||
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  newDpad |= 1 << <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaec8379af7490bb9eaaf579cf17876f38">RIGHT</a>;</div>
|
||||
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">if</span> (checkDpad(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda9b0b4a95b99523966e0e34ffdadac9da">DOWN</a>))</div>
|
||||
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  newDpad |= 1 << <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda9b0b4a95b99523966e0e34ffdadac9da">DOWN</a>;</div>
|
||||
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keywordflow">if</span> (checkDpad(<a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065">LEFT</a>))</div>
|
||||
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  newDpad |= 1 << <a class="code" href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065">LEFT</a>;</div>
|
||||
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keywordflow">if</span> (newDpad != oldDpad) {</div>
|
||||
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  buttonClickState.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> = newDpad & ~oldDpad; <span class="comment">// Override values</span></div>
|
||||
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  oldDpad = newDpad;</div>
|
||||
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  }</div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  </div>
|
||||
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="comment">// Handle click detection for triggers</span></div>
|
||||
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keywordflow">if</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[0] != 0 && triggerOld[0] == 0)</div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  L2Clicked = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  triggerOld[0] = xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[0];</div>
|
||||
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keywordflow">if</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[1] != 0 && triggerOld[1] == 0)</div>
|
||||
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  R2Clicked = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  triggerOld[1] = xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[1];</div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  }</div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  }</div>
|
||||
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  </div>
|
||||
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="comment">// Handle click detection for triggers</span></div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordflow">if</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[0] != 0 && triggerOld[0] == 0)</div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  L2Clicked = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  triggerOld[0] = xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[0];</div>
|
||||
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">if</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[1] != 0 && triggerOld[1] == 0)</div>
|
||||
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  R2Clicked = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  triggerOld[1] = xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[1];</div>
|
||||
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  }</div>
|
||||
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  </div>
|
||||
<div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#ac71c0a2e5e6e61f3bb57409c991c7bcb"> 179</a></span> <span class="keywordtype">void</span> <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#ac71c0a2e5e6e61f3bb57409c991c7bcb">XBOXONESParser::Reset</a>() {</div>
|
||||
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  uint8_t i;</div>
|
||||
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordflow">for</span> (i = 0; i < <span class="keyword">sizeof</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a0a0bb5c4f7cfffd5c97b6b8ed95bcad9">hatValue</a>) / <span class="keyword">sizeof</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a0a0bb5c4f7cfffd5c97b6b8ed95bcad9">hatValue</a>[0]); i++)</div>
|
||||
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a0a0bb5c4f7cfffd5c97b6b8ed95bcad9">hatValue</a>[i] = 32768; <span class="comment">// Center value</span></div>
|
||||
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> = 0;</div>
|
||||
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  oldButtonState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> = 0;</div>
|
||||
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  for (i = 0; i < <span class="keyword">sizeof</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>) / <span class="keyword">sizeof</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[0]); i++)</div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[i] = 0;</div>
|
||||
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  </div>
|
||||
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> = <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044">DPAD_OFF</a>;</div>
|
||||
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  oldButtonState.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> = <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044">DPAD_OFF</a>;</div>
|
||||
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  buttonClickState.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> = 0;</div>
|
||||
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  oldDpad = 0;</div>
|
||||
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span> };</div>
|
||||
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  </div>
|
||||
<div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#ada0aa0450e0a944d2b5dae6a5c237ee6"> 194</a></span> <span class="keywordtype">void</span> <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#ada0aa0450e0a944d2b5dae6a5c237ee6">XBOXONESParser::setRumbleOff</a>() {</div>
|
||||
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="comment">// See: https://lore.kernel.org/patchwork/patch/973394/</span></div>
|
||||
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  uint8_t buf[8];</div>
|
||||
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  buf[0] = 0x0F; <span class="comment">// Disable all rumble motors</span></div>
|
||||
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  buf[1] = 0;</div>
|
||||
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  buf[2] = 0;</div>
|
||||
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  buf[3] = 0;</div>
|
||||
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  buf[4] = 0;</div>
|
||||
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  buf[5] = 0; <span class="comment">// Duration of effect in 10 ms</span></div>
|
||||
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  buf[6] = 0; <span class="comment">// Start delay in 10 ms</span></div>
|
||||
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  buf[7] = 0; <span class="comment">// Loop count</span></div>
|
||||
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#a32c251e7a51d9192e94f81f6a6f79247">sendOutputReport</a>(buf, <span class="keyword">sizeof</span>(buf));</div>
|
||||
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span> }</div>
|
||||
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  </div>
|
||||
<div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#a2b36b55703d44f1e6302633f1965923f"> 208</a></span> <span class="keywordtype">void</span> <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#a2b36b55703d44f1e6302633f1965923f">XBOXONESParser::setRumbleOn</a>(uint8_t leftTrigger, uint8_t rightTrigger, uint8_t leftMotor, uint8_t rightMotor) {</div>
|
||||
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="comment">// See: https://lore.kernel.org/patchwork/patch/973394/</span></div>
|
||||
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  uint8_t buf[8];</div>
|
||||
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  buf[0] = 1 << 3 <span class="comment">/* Left trigger */</span> | 1 << 2 <span class="comment">/* Right trigger */</span> | 1 << 1 <span class="comment">/* Left motor */</span> | 1 << 0 <span class="comment">/* Right motor */</span>;</div>
|
||||
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  buf[1] = leftTrigger;</div>
|
||||
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  buf[2] = rightTrigger;</div>
|
||||
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  buf[3] = leftMotor;</div>
|
||||
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  buf[4] = rightMotor;</div>
|
||||
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  buf[5] = 255; <span class="comment">// Duration of effect in 10 ms</span></div>
|
||||
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  buf[6] = 0; <span class="comment">// Start delay in 10 ms</span></div>
|
||||
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  buf[7] = 255; <span class="comment">// Loop count</span></div>
|
||||
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#a32c251e7a51d9192e94f81f6a6f79247">sendOutputReport</a>(buf, <span class="keyword">sizeof</span>(buf));</div>
|
||||
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span> }</div>
|
||||
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> }</div>
|
||||
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  </div>
|
||||
<div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#ac71c0a2e5e6e61f3bb57409c991c7bcb"> 180</a></span> <span class="keywordtype">void</span> <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#ac71c0a2e5e6e61f3bb57409c991c7bcb">XBOXONESParser::Reset</a>() {</div>
|
||||
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  uint8_t i;</div>
|
||||
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">for</span> (i = 0; i < <span class="keyword">sizeof</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a0a0bb5c4f7cfffd5c97b6b8ed95bcad9">hatValue</a>) / <span class="keyword">sizeof</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a0a0bb5c4f7cfffd5c97b6b8ed95bcad9">hatValue</a>[0]); i++)</div>
|
||||
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a0a0bb5c4f7cfffd5c97b6b8ed95bcad9">hatValue</a>[i] = 32768; <span class="comment">// Center value</span></div>
|
||||
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> = 0;</div>
|
||||
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  oldButtonState.<a class="code" href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">val</a> = 0;</div>
|
||||
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  for (i = 0; i < <span class="keyword">sizeof</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>) / <span class="keyword">sizeof</span>(xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[0]); i++)</div>
|
||||
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">trigger</a>[i] = 0;</div>
|
||||
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  </div>
|
||||
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  xboxOneSData.<a class="code" href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">btn</a>.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> = <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044">DPAD_OFF</a>;</div>
|
||||
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  oldButtonState.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> = <a class="code" href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044">DPAD_OFF</a>;</div>
|
||||
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  buttonClickState.<a class="code" href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">dpad</a> = 0;</div>
|
||||
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  oldDpad = 0;</div>
|
||||
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span> };</div>
|
||||
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  </div>
|
||||
<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#ada0aa0450e0a944d2b5dae6a5c237ee6"> 195</a></span> <span class="keywordtype">void</span> <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#ada0aa0450e0a944d2b5dae6a5c237ee6">XBOXONESParser::setRumbleOff</a>() {</div>
|
||||
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="comment">// See: https://lore.kernel.org/patchwork/patch/973394/</span></div>
|
||||
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  uint8_t buf[8];</div>
|
||||
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  buf[0] = 0x0F; <span class="comment">// Disable all rumble motors</span></div>
|
||||
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  buf[1] = 0;</div>
|
||||
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  buf[2] = 0;</div>
|
||||
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  buf[3] = 0;</div>
|
||||
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  buf[4] = 0;</div>
|
||||
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  buf[5] = 0; <span class="comment">// Duration of effect in 10 ms</span></div>
|
||||
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  buf[6] = 0; <span class="comment">// Start delay in 10 ms</span></div>
|
||||
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  buf[7] = 0; <span class="comment">// Loop count</span></div>
|
||||
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#a32c251e7a51d9192e94f81f6a6f79247">sendOutputReport</a>(buf, <span class="keyword">sizeof</span>(buf));</div>
|
||||
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span> }</div>
|
||||
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  </div>
|
||||
<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="class_x_b_o_x_o_n_e_s_parser.html#a2b36b55703d44f1e6302633f1965923f"> 209</a></span> <span class="keywordtype">void</span> <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#a2b36b55703d44f1e6302633f1965923f">XBOXONESParser::setRumbleOn</a>(uint8_t leftTrigger, uint8_t rightTrigger, uint8_t leftMotor, uint8_t rightMotor) {</div>
|
||||
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="comment">// See: https://lore.kernel.org/patchwork/patch/973394/</span></div>
|
||||
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  uint8_t buf[8];</div>
|
||||
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  buf[0] = 1 << 3 <span class="comment">/* Left trigger */</span> | 1 << 2 <span class="comment">/* Right trigger */</span> | 1 << 1 <span class="comment">/* Left motor */</span> | 1 << 0 <span class="comment">/* Right motor */</span>;</div>
|
||||
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  buf[1] = leftTrigger;</div>
|
||||
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  buf[2] = rightTrigger;</div>
|
||||
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  buf[3] = leftMotor;</div>
|
||||
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  buf[4] = rightMotor;</div>
|
||||
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  buf[5] = 255; <span class="comment">// Duration of effect in 10 ms</span></div>
|
||||
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  buf[6] = 0; <span class="comment">// Start delay in 10 ms</span></div>
|
||||
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  buf[7] = 255; <span class="comment">// Loop count</span></div>
|
||||
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <a class="code" href="class_x_b_o_x_o_n_e_s_parser.html#a32c251e7a51d9192e94f81f6a6f79247">sendOutputReport</a>(buf, <span class="keyword">sizeof</span>(buf));</div>
|
||||
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span> }</div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<div class="ttc" id="asettings_8h_html_ab5a06671af5c2f1154fb653956959838"><div class="ttname"><a href="settings_8h.html#ab5a06671af5c2f1154fb653956959838">MFK_CASTUINT8T</a></div><div class="ttdeci">#define MFK_CASTUINT8T</div><div class="ttdef"><b>Definition:</b> <a href="settings_8h_source.html#l00199">settings.h:199</a></div></div>
|
||||
<div class="ttc" id="astruct_xbox_one_s_data_html_a35f7baba4b94f6c131dd7bcc0ec1fd26"><div class="ttname"><a href="struct_xbox_one_s_data.html#a35f7baba4b94f6c131dd7bcc0ec1fd26">XboxOneSData::btn</a></div><div class="ttdeci">XboxOneSButtons btn</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00050">XBOXONESParser.h:50</a></div></div>
|
||||
<div class="ttc" id="acontroller_enums_8h_html_a114f266591a03b0eff0f1e6b67d94f85"><div class="ttname"><a href="controller_enums_8h.html#a114f266591a03b0eff0f1e6b67d94f85">ButtonIndex</a></div><div class="ttdeci">constexpr int8_t ButtonIndex(ButtonEnum key)</div><div class="ttdef"><b>Definition:</b> <a href="controller_enums_8h_source.html#l00186">controllerEnums.h:186</a></div></div>
|
||||
<div class="ttc" id="amessage_8h_html_a27117e124c5d66d5512fe8d494fe6338"><div class="ttname"><a href="message_8h.html#a27117e124c5d66d5512fe8d494fe6338">Notify</a></div><div class="ttdeci">#define Notify(...)</div><div class="ttdef"><b>Definition:</b> <a href="message_8h_source.html#l00051">message.h:51</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62af0f91a0468a0f49170b119f7de0d5cec"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62af0f91a0468a0f49170b119f7de0d5cec">DPAD_RIGHT</a></div><div class="ttdeci">@ DPAD_RIGHT</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00049">XBOXONESParser.cpp:49</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62af0f91a0468a0f49170b119f7de0d5cec"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62af0f91a0468a0f49170b119f7de0d5cec">DPAD_RIGHT</a></div><div class="ttdeci">@ DPAD_RIGHT</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00050">XBOXONESParser.cpp:50</a></div></div>
|
||||
<div class="ttc" id="acontroller_enums_8h_html_a94f7389d205c78830a5441370d7870fdaba595d8bca8bc5e67c37c0a9d89becfa"><div class="ttname"><a href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaba595d8bca8bc5e67c37c0a9d89becfa">UP</a></div><div class="ttdeci">@ UP</div><div class="ttdef"><b>Definition:</b> <a href="controller_enums_8h_source.html#l00081">controllerEnums.h:81</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044">DPAD_OFF</a></div><div class="ttdeci">@ DPAD_OFF</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00046">XBOXONESParser.cpp:46</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aeb5da32679ab2abc4001f04d5f8c7044">DPAD_OFF</a></div><div class="ttdeci">@ DPAD_OFF</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00047">XBOXONESParser.cpp:47</a></div></div>
|
||||
<div class="ttc" id="a_p_s4_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62"><div class="ttname"><a href="_p_s4_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62">DPADEnum</a></div><div class="ttdeci">DPADEnum</div><div class="ttdef"><b>Definition:</b> <a href="_p_s4_parser_8cpp_source.html#l00020">PS4Parser.cpp:20</a></div></div>
|
||||
<div class="ttc" id="acontroller_enums_8h_html_a94f7389d205c78830a5441370d7870fdaec8379af7490bb9eaaf579cf17876f38"><div class="ttname"><a href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdaec8379af7490bb9eaaf579cf17876f38">RIGHT</a></div><div class="ttdeci">@ RIGHT</div><div class="ttdef"><b>Definition:</b> <a href="controller_enums_8h_source.html#l00082">controllerEnums.h:82</a></div></div>
|
||||
<div class="ttc" id="acontroller_enums_8h_html_a94f7389d205c78830a5441370d7870fda9b0b4a95b99523966e0e34ffdadac9da"><div class="ttname"><a href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda9b0b4a95b99523966e0e34ffdadac9da">DOWN</a></div><div class="ttdeci">@ DOWN</div><div class="ttdef"><b>Definition:</b> <a href="controller_enums_8h_source.html#l00083">controllerEnums.h:83</a></div></div>
|
||||
<div class="ttc" id="aunion_xbox_one_s_buttons_html_afb149a3a1f26501a5b8270c635777c93"><div class="ttname"><a href="union_xbox_one_s_buttons.html#afb149a3a1f26501a5b8270c635777c93">XboxOneSButtons::dpad</a></div><div class="ttdeci">uint8_t dpad</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00026">XBOXONESParser.h:26</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0">DPAD_RIGHT_DOWN</a></div><div class="ttdeci">@ DPAD_RIGHT_DOWN</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00050">XBOXONESParser.cpp:50</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62aafb58dc961545afb332266b117e4a332"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aafb58dc961545afb332266b117e4a332">DPAD_UP</a></div><div class="ttdeci">@ DPAD_UP</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00047">XBOXONESParser.cpp:47</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62afe9bfbd6550b91f6640b74a155000cba"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62afe9bfbd6550b91f6640b74a155000cba">DPAD_LEFT</a></div><div class="ttdeci">@ DPAD_LEFT</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00053">XBOXONESParser.cpp:53</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a352a732e4f7a41d4a92ab99e661094d0">DPAD_RIGHT_DOWN</a></div><div class="ttdeci">@ DPAD_RIGHT_DOWN</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00051">XBOXONESParser.cpp:51</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62aafb58dc961545afb332266b117e4a332"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62aafb58dc961545afb332266b117e4a332">DPAD_UP</a></div><div class="ttdeci">@ DPAD_UP</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00048">XBOXONESParser.cpp:48</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62afe9bfbd6550b91f6640b74a155000cba"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62afe9bfbd6550b91f6640b74a155000cba">DPAD_LEFT</a></div><div class="ttdeci">@ DPAD_LEFT</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00054">XBOXONESParser.cpp:54</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8h_html"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8h.html">XBOXONESParser.h</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_aa9d2ab519ae22786e4218c96539925d6"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#aa9d2ab519ae22786e4218c96539925d6">XBOXONESParser::getAnalogHat</a></div><div class="ttdeci">int16_t getAnalogHat(AnalogHatEnum a)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00116">XBOXONESParser.cpp:116</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_acede7059d30d10f7276336be8d2dec63"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#acede7059d30d10f7276336be8d2dec63">XBOXONESParser::getButtonPress</a></div><div class="ttdeci">uint16_t getButtonPress(ButtonEnum b)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00078">XBOXONESParser.cpp:78</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_aa9d2ab519ae22786e4218c96539925d6"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#aa9d2ab519ae22786e4218c96539925d6">XBOXONESParser::getAnalogHat</a></div><div class="ttdeci">int16_t getAnalogHat(AnalogHatEnum a)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00117">XBOXONESParser.cpp:117</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_acede7059d30d10f7276336be8d2dec63"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#acede7059d30d10f7276336be8d2dec63">XBOXONESParser::getButtonPress</a></div><div class="ttdeci">uint16_t getButtonPress(ButtonEnum b)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00079">XBOXONESParser.cpp:79</a></div></div>
|
||||
<div class="ttc" id="acontroller_enums_8h_html_a94f7389d205c78830a5441370d7870fda0adffb24dae0c41be5b803f4d444f066"><div class="ttname"><a href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda0adffb24dae0c41be5b803f4d444f066">L2</a></div><div class="ttdeci">@ L2</div><div class="ttdef"><b>Definition:</b> <a href="controller_enums_8h_source.html#l00102">controllerEnums.h:102</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_afe96a451aa400a754c28b9bedb7c7ef8"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#afe96a451aa400a754c28b9bedb7c7ef8">XBOX_ONE_S_BUTTONS</a></div><div class="ttdeci">const uint8_t XBOX_ONE_S_BUTTONS[]</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00024">XBOXONESParser.cpp:24</a></div></div>
|
||||
<div class="ttc" id="astruct_xbox_one_s_data_html_a1c56d0f053f086569518658d827ec77b"><div class="ttname"><a href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">XboxOneSData::trigger</a></div><div class="ttdeci">uint16_t trigger[2]</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00049">XBOXONESParser.h:49</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ada0aa0450e0a944d2b5dae6a5c237ee6"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ada0aa0450e0a944d2b5dae6a5c237ee6">XBOXONESParser::setRumbleOff</a></div><div class="ttdeci">void setRumbleOff()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00194">XBOXONESParser.cpp:194</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ada0aa0450e0a944d2b5dae6a5c237ee6"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ada0aa0450e0a944d2b5dae6a5c237ee6">XBOXONESParser::setRumbleOff</a></div><div class="ttdeci">void setRumbleOff()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00195">XBOXONESParser.cpp:195</a></div></div>
|
||||
<div class="ttc" id="aversion__helper_8h_html_a48c60b057902adf805797f183286728d"><div class="ttname"><a href="version__helper_8h.html#a48c60b057902adf805797f183286728d">pgm_read_byte</a></div><div class="ttdeci">#define pgm_read_byte(addr)</div><div class="ttdef"><b>Definition:</b> <a href="version__helper_8h_source.html#l00161">version_helper.h:161</a></div></div>
|
||||
<div class="ttc" id="acontroller_enums_8h_html_a94f7389d205c78830a5441370d7870fdad4689acdcdf0e61373d52de14ff07eae"><div class="ttname"><a href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdad4689acdcdf0e61373d52de14ff07eae">XBOX</a></div><div class="ttdeci">@ XBOX</div><div class="ttdef"><b>Definition:</b> <a href="controller_enums_8h_source.html#l00151">controllerEnums.h:151</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ab738326926b13d4f40d5bbed34640054"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ab738326926b13d4f40d5bbed34640054">XBOXONESParser::Parse</a></div><div class="ttdeci">void Parse(uint8_t len, uint8_t *buf)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00120">XBOXONESParser.cpp:120</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_a2b36b55703d44f1e6302633f1965923f"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#a2b36b55703d44f1e6302633f1965923f">XBOXONESParser::setRumbleOn</a></div><div class="ttdeci">void setRumbleOn(uint8_t leftTrigger, uint8_t rightTrigger, uint8_t leftMotor, uint8_t rightMotor)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00208">XBOXONESParser.cpp:208</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ac71c0a2e5e6e61f3bb57409c991c7bcb"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ac71c0a2e5e6e61f3bb57409c991c7bcb">XBOXONESParser::Reset</a></div><div class="ttdeci">void Reset()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00179">XBOXONESParser.cpp:179</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0">DPAD_UP_RIGHT</a></div><div class="ttdeci">@ DPAD_UP_RIGHT</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00048">XBOXONESParser.cpp:48</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66">DPAD_DOWN_LEFT</a></div><div class="ttdeci">@ DPAD_DOWN_LEFT</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00052">XBOXONESParser.cpp:52</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ab738326926b13d4f40d5bbed34640054"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ab738326926b13d4f40d5bbed34640054">XBOXONESParser::Parse</a></div><div class="ttdeci">void Parse(uint8_t len, uint8_t *buf)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00121">XBOXONESParser.cpp:121</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_a2b36b55703d44f1e6302633f1965923f"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#a2b36b55703d44f1e6302633f1965923f">XBOXONESParser::setRumbleOn</a></div><div class="ttdeci">void setRumbleOn(uint8_t leftTrigger, uint8_t rightTrigger, uint8_t leftMotor, uint8_t rightMotor)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00209">XBOXONESParser.cpp:209</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ac71c0a2e5e6e61f3bb57409c991c7bcb"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ac71c0a2e5e6e61f3bb57409c991c7bcb">XBOXONESParser::Reset</a></div><div class="ttdeci">void Reset()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00180">XBOXONESParser.cpp:180</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62abc09f2a57c77693c05e8d52917d2bac0">DPAD_UP_RIGHT</a></div><div class="ttdeci">@ DPAD_UP_RIGHT</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00049">XBOXONESParser.cpp:49</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62a1b679be7217f73f03393bb379b218d66">DPAD_DOWN_LEFT</a></div><div class="ttdeci">@ DPAD_DOWN_LEFT</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00053">XBOXONESParser.cpp:53</a></div></div>
|
||||
<div class="ttc" id="aversion__helper_8h_html_a73809107539df84eaf01f6a4dea4fbff"><div class="ttname"><a href="version__helper_8h.html#a73809107539df84eaf01f6a4dea4fbff">PSTR</a></div><div class="ttdeci">#define PSTR(str)</div><div class="ttdef"><b>Definition:</b> <a href="version__helper_8h_source.html#l00054">version_helper.h:54</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743">DPAD_LEFT_UP</a></div><div class="ttdeci">@ DPAD_LEFT_UP</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00054">XBOXONESParser.cpp:54</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ac6b9de0c407333a7161ca1efe6e30743">DPAD_LEFT_UP</a></div><div class="ttdeci">@ DPAD_LEFT_UP</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00055">XBOXONESParser.cpp:55</a></div></div>
|
||||
<div class="ttc" id="acontroller_enums_8h_html_a94f7389d205c78830a5441370d7870fda629d7b403cea5f826352f3aefb9a6d6a"><div class="ttname"><a href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fda629d7b403cea5f826352f3aefb9a6d6a">R2</a></div><div class="ttdeci">@ R2</div><div class="ttdef"><b>Definition:</b> <a href="controller_enums_8h_source.html#l00103">controllerEnums.h:103</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_aec1240938df5c0f3415d3e81eb12b4b7"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#aec1240938df5c0f3415d3e81eb12b4b7">XBOXONESParser::getButtonClick</a></div><div class="ttdeci">bool getButtonClick(ButtonEnum b)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00091">XBOXONESParser.cpp:91</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_aec1240938df5c0f3415d3e81eb12b4b7"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#aec1240938df5c0f3415d3e81eb12b4b7">XBOXONESParser::getButtonClick</a></div><div class="ttdeci">bool getButtonClick(ButtonEnum b)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00092">XBOXONESParser.cpp:92</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_a32c251e7a51d9192e94f81f6a6f79247"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#a32c251e7a51d9192e94f81f6a6f79247">XBOXONESParser::sendOutputReport</a></div><div class="ttdeci">virtual void sendOutputReport(uint8_t *data, uint8_t nbytes)=0</div></div>
|
||||
<div class="ttc" id="aunion_xbox_one_s_buttons_html_a34cdd34d6a1056ff7226e2160af6ac1d"><div class="ttname"><a href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">XboxOneSButtons::val</a></div><div class="ttdeci">uint32_t val</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00043">XBOXONESParser.h:43</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62ab5e7d62ac3dfe6a925d1d6be3c756faa"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ab5e7d62ac3dfe6a925d1d6be3c756faa">DPAD_DOWN</a></div><div class="ttdeci">@ DPAD_DOWN</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00051">XBOXONESParser.cpp:51</a></div></div>
|
||||
<div class="ttc" id="a_x_b_o_x_o_n_e_s_parser_8cpp_html_a3eca256e8b59574c290177d7df302a62ab5e7d62ac3dfe6a925d1d6be3c756faa"><div class="ttname"><a href="_x_b_o_x_o_n_e_s_parser_8cpp.html#a3eca256e8b59574c290177d7df302a62ab5e7d62ac3dfe6a925d1d6be3c756faa">DPAD_DOWN</a></div><div class="ttdeci">@ DPAD_DOWN</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00052">XBOXONESParser.cpp:52</a></div></div>
|
||||
<div class="ttc" id="acontroller_enums_8h_html_a94f7389d205c78830a5441370d7870fd"><div class="ttname"><a href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a></div><div class="ttdeci">ButtonEnum</div><div class="ttdef"><b>Definition:</b> <a href="controller_enums_8h_source.html#l00078">controllerEnums.h:78</a></div></div>
|
||||
<div class="ttc" id="acontroller_enums_8h_html_a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065"><div class="ttname"><a href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fdadb45120aafd37a973140edee24708065">LEFT</a></div><div class="ttdeci">@ LEFT</div><div class="ttdef"><b>Definition:</b> <a href="controller_enums_8h_source.html#l00084">controllerEnums.h:84</a></div></div>
|
||||
<div class="ttc" id="astruct_xbox_one_s_data_html_a0a0bb5c4f7cfffd5c97b6b8ed95bcad9"><div class="ttname"><a href="struct_xbox_one_s_data.html#a0a0bb5c4f7cfffd5c97b6b8ed95bcad9">XboxOneSData::hatValue</a></div><div class="ttdeci">uint16_t hatValue[4]</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00048">XBOXONESParser.h:48</a></div></div>
|
||||
|
|
|
@ -170,20 +170,20 @@ $(function() {
|
|||
<div class="ttc" id="acontroller_enums_8h_html"><div class="ttname"><a href="controller_enums_8h.html">controllerEnums.h</a></div></div>
|
||||
<div class="ttc" id="aunion_xbox_one_s_buttons_html_a15d0132ac257469157f43745af37c5b5"><div class="ttname"><a href="union_xbox_one_s_buttons.html#a15d0132ac257469157f43745af37c5b5">XboxOneSButtons::r3</a></div><div class="ttdeci">uint8_t r3</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00040">XBOXONESParser.h:40</a></div></div>
|
||||
<div class="ttc" id="aunion_xbox_one_s_buttons_html_af4814d979cf79511aeddd119487806dc"><div class="ttname"><a href="union_xbox_one_s_buttons.html#af4814d979cf79511aeddd119487806dc">XboxOneSButtons::l1</a></div><div class="ttdeci">uint8_t l1</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00034">XBOXONESParser.h:34</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_aa9d2ab519ae22786e4218c96539925d6"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#aa9d2ab519ae22786e4218c96539925d6">XBOXONESParser::getAnalogHat</a></div><div class="ttdeci">int16_t getAnalogHat(AnalogHatEnum a)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00116">XBOXONESParser.cpp:116</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_acede7059d30d10f7276336be8d2dec63"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#acede7059d30d10f7276336be8d2dec63">XBOXONESParser::getButtonPress</a></div><div class="ttdeci">uint16_t getButtonPress(ButtonEnum b)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00078">XBOXONESParser.cpp:78</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_aa9d2ab519ae22786e4218c96539925d6"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#aa9d2ab519ae22786e4218c96539925d6">XBOXONESParser::getAnalogHat</a></div><div class="ttdeci">int16_t getAnalogHat(AnalogHatEnum a)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00117">XBOXONESParser.cpp:117</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_acede7059d30d10f7276336be8d2dec63"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#acede7059d30d10f7276336be8d2dec63">XBOXONESParser::getButtonPress</a></div><div class="ttdeci">uint16_t getButtonPress(ButtonEnum b)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00079">XBOXONESParser.cpp:79</a></div></div>
|
||||
<div class="ttc" id="aunion_xbox_one_s_buttons_html_a7340abde1fb7867c35c9ee7fbbc0b537"><div class="ttname"><a href="union_xbox_one_s_buttons.html#a7340abde1fb7867c35c9ee7fbbc0b537">XboxOneSButtons::menu</a></div><div class="ttdeci">uint8_t menu</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00037">XBOXONESParser.h:37</a></div></div>
|
||||
<div class="ttc" id="astruct_xbox_one_s_data_html_a1c56d0f053f086569518658d827ec77b"><div class="ttname"><a href="struct_xbox_one_s_data.html#a1c56d0f053f086569518658d827ec77b">XboxOneSData::trigger</a></div><div class="ttdeci">uint16_t trigger[2]</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00049">XBOXONESParser.h:49</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ada0aa0450e0a944d2b5dae6a5c237ee6"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ada0aa0450e0a944d2b5dae6a5c237ee6">XBOXONESParser::setRumbleOff</a></div><div class="ttdeci">void setRumbleOff()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00194">XBOXONESParser.cpp:194</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ada0aa0450e0a944d2b5dae6a5c237ee6"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ada0aa0450e0a944d2b5dae6a5c237ee6">XBOXONESParser::setRumbleOff</a></div><div class="ttdeci">void setRumbleOff()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00195">XBOXONESParser.cpp:195</a></div></div>
|
||||
<div class="ttc" id="aunion_xbox_one_s_buttons_html_a2c372291d4f6dd4c8a42414a72f792a3"><div class="ttname"><a href="union_xbox_one_s_buttons.html#a2c372291d4f6dd4c8a42414a72f792a3">XboxOneSButtons::reserved2</a></div><div class="ttdeci">uint8_t reserved2</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00041">XBOXONESParser.h:41</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ab738326926b13d4f40d5bbed34640054"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ab738326926b13d4f40d5bbed34640054">XBOXONESParser::Parse</a></div><div class="ttdeci">void Parse(uint8_t len, uint8_t *buf)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00120">XBOXONESParser.cpp:120</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_a2b36b55703d44f1e6302633f1965923f"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#a2b36b55703d44f1e6302633f1965923f">XBOXONESParser::setRumbleOn</a></div><div class="ttdeci">void setRumbleOn(uint8_t leftTrigger, uint8_t rightTrigger, uint8_t leftMotor, uint8_t rightMotor)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00208">XBOXONESParser.cpp:208</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ac71c0a2e5e6e61f3bb57409c991c7bcb"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ac71c0a2e5e6e61f3bb57409c991c7bcb">XBOXONESParser::Reset</a></div><div class="ttdeci">void Reset()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00179">XBOXONESParser.cpp:179</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ab738326926b13d4f40d5bbed34640054"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ab738326926b13d4f40d5bbed34640054">XBOXONESParser::Parse</a></div><div class="ttdeci">void Parse(uint8_t len, uint8_t *buf)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00121">XBOXONESParser.cpp:121</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_a2b36b55703d44f1e6302633f1965923f"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#a2b36b55703d44f1e6302633f1965923f">XBOXONESParser::setRumbleOn</a></div><div class="ttdeci">void setRumbleOn(uint8_t leftTrigger, uint8_t rightTrigger, uint8_t leftMotor, uint8_t rightMotor)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00209">XBOXONESParser.cpp:209</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_ac71c0a2e5e6e61f3bb57409c991c7bcb"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#ac71c0a2e5e6e61f3bb57409c991c7bcb">XBOXONESParser::Reset</a></div><div class="ttdeci">void Reset()</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00180">XBOXONESParser.cpp:180</a></div></div>
|
||||
<div class="ttc" id="aunion_xbox_one_s_buttons_html_a461a969454844afc31875e430b8f27eb"><div class="ttname"><a href="union_xbox_one_s_buttons.html#a461a969454844afc31875e430b8f27eb">XboxOneSButtons::reserved</a></div><div class="ttdeci">uint8_t reserved</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00027">XBOXONESParser.h:27</a></div></div>
|
||||
<div class="ttc" id="aunion_xbox_one_s_buttons_html_aed6ae49e0bed25b89cf190950bce0684"><div class="ttname"><a href="union_xbox_one_s_buttons.html#aed6ae49e0bed25b89cf190950bce0684">XboxOneSButtons::y</a></div><div class="ttdeci">uint8_t y</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00032">XBOXONESParser.h:32</a></div></div>
|
||||
<div class="ttc" id="a_usb_8h_html"><div class="ttname"><a href="_usb_8h.html">Usb.h</a></div></div>
|
||||
<div class="ttc" id="aunion_xbox_one_s_buttons_html"><div class="ttname"><a href="union_xbox_one_s_buttons.html">XboxOneSButtons</a></div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00024">XBOXONESParser.h:24</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_aec1240938df5c0f3415d3e81eb12b4b7"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#aec1240938df5c0f3415d3e81eb12b4b7">XBOXONESParser::getButtonClick</a></div><div class="ttdeci">bool getButtonClick(ButtonEnum b)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00091">XBOXONESParser.cpp:91</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_aec1240938df5c0f3415d3e81eb12b4b7"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#aec1240938df5c0f3415d3e81eb12b4b7">XBOXONESParser::getButtonClick</a></div><div class="ttdeci">bool getButtonClick(ButtonEnum b)</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00092">XBOXONESParser.cpp:92</a></div></div>
|
||||
<div class="ttc" id="aclass_x_b_o_x_o_n_e_s_parser_html_a32c251e7a51d9192e94f81f6a6f79247"><div class="ttname"><a href="class_x_b_o_x_o_n_e_s_parser.html#a32c251e7a51d9192e94f81f6a6f79247">XBOXONESParser::sendOutputReport</a></div><div class="ttdeci">virtual void sendOutputReport(uint8_t *data, uint8_t nbytes)=0</div></div>
|
||||
<div class="ttc" id="aunion_xbox_one_s_buttons_html_a34cdd34d6a1056ff7226e2160af6ac1d"><div class="ttname"><a href="union_xbox_one_s_buttons.html#a34cdd34d6a1056ff7226e2160af6ac1d">XboxOneSButtons::val</a></div><div class="ttdeci">uint32_t val</div><div class="ttdef"><b>Definition:</b> <a href="_x_b_o_x_o_n_e_s_parser_8h_source.html#l00043">XBOXONESParser.h:43</a></div></div>
|
||||
<div class="ttc" id="acontroller_enums_8h_html_a94f7389d205c78830a5441370d7870fd"><div class="ttname"><a href="controller_enums_8h.html#a94f7389d205c78830a5441370d7870fd">ButtonEnum</a></div><div class="ttdeci">ButtonEnum</div><div class="ttdef"><b>Definition:</b> <a href="controller_enums_8h_source.html#l00078">controllerEnums.h:78</a></div></div>
|
||||
|
|
|
@ -166,7 +166,7 @@ Protected Member Functions</h2></td></tr>
|
|||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_x_b_o_x_o_n_e_s_parser.html#acede7059d30d10f7276336be8d2dec63">getButtonPress(ButtonEnum b)</a> will return a true as long as a button is held down, while <a class="el" href="class_x_b_o_x_o_n_e_s_parser.html#aec1240938df5c0f3415d3e81eb12b4b7">getButtonClick(ButtonEnum b)</a> will return true once for each button press. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00078">78</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00079">79</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -195,7 +195,7 @@ Protected Member Functions</h2></td></tr>
|
|||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_x_b_o_x_o_n_e_s_parser.html#acede7059d30d10f7276336be8d2dec63">getButtonPress(ButtonEnum b)</a> will return a true as long as a button is held down, while <a class="el" href="class_x_b_o_x_o_n_e_s_parser.html#aec1240938df5c0f3415d3e81eb12b4b7">getButtonClick(ButtonEnum b)</a> will return true once for each button press. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00091">91</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00092">92</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -222,7 +222,7 @@ Protected Member Functions</h2></td></tr>
|
|||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Return the analog value as a 16-bit signed integer. </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00116">116</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00117">117</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -242,7 +242,7 @@ Protected Member Functions</h2></td></tr>
|
|||
</div><div class="memdoc">
|
||||
<p>Used to set the rumble off. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00194">194</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00195">195</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -293,7 +293,7 @@ Protected Member Functions</h2></td></tr>
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00208">208</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00209">209</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -338,7 +338,7 @@ Protected Member Functions</h2></td></tr>
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00120">120</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00121">121</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -366,7 +366,7 @@ Protected Member Functions</h2></td></tr>
|
|||
</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="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00179">179</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html#l00180">180</a> of file <a class="el" href="_x_b_o_x_o_n_e_s_parser_8cpp_source.html">XBOXONESParser.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue