This commit is contained in:
Lauszus 2021-10-20 11:46:34 +00:00
parent 3f77ae9a4c
commit 09a5161ae3

View file

@ -592,7 +592,7 @@ $(function() {
<div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160; D_PrintHex&lt;uint8_t &gt; (classOfDevice[0], 0x80);</div>
<div class="line"><a name="l00525"></a><span class="lineno"> 525</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00526"></a><span class="lineno"> 526</span>&#160; </div>
<div class="line"><a name="l00527"></a><span class="lineno"> 527</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="class_b_t_d.html#a0c8cc2a2dd2cda3e760b8b4c1a2d169c">pairWithWii</a> &amp;&amp; classOfDevice[2] == 0x00 &amp;&amp; (classOfDevice[1] == 0x05) &amp;&amp; (classOfDevice[0] &amp; 0x0C)) { <span class="comment">// See http://wiibrew.org/wiki/Wiimote#SDP_information</span></div>
<div class="line"><a name="l00527"></a><span class="lineno"> 527</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="class_b_t_d.html#a0c8cc2a2dd2cda3e760b8b4c1a2d169c">pairWithWii</a> &amp;&amp; (classOfDevice[2] == 0x00) &amp;&amp; ((classOfDevice[1] &amp; 0x0F) == 0x05) &amp;&amp; (classOfDevice[0] &amp; 0x0C)) { <span class="comment">// See http://wiibrew.org/wiki/Wiimote#SDP_information</span></div>
<div class="line"><a name="l00528"></a><span class="lineno"> 528</span>&#160; checkRemoteName = <span class="keyword">true</span>; <span class="comment">// Check remote name to distinguish between the different controllers</span></div>
<div class="line"><a name="l00529"></a><span class="lineno"> 529</span>&#160; </div>
<div class="line"><a name="l00530"></a><span class="lineno"> 530</span>&#160; <span class="keywordflow">for</span>(uint8_t j = 0; j &lt; 6; j++)</div>
@ -600,7 +600,7 @@ $(function() {
<div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160; </div>
<div class="line"><a name="l00533"></a><span class="lineno"> 533</span>&#160; <a class="code" href="_b_t_d_8h.html#ada46cc57bb9134769989b1b18bdac525">hci_set_flag</a>(<a class="code" href="_b_t_d_8h.html#a5ac3c55b54eff968d2327185a7e644ba">HCI_FLAG_DEVICE_FOUND</a>);</div>
<div class="line"><a name="l00534"></a><span class="lineno"> 534</span>&#160; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00535"></a><span class="lineno"> 535</span>&#160; } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="class_b_t_d.html#a2aa418d820fb6b877ea079e0436a518e">pairWithHIDDevice</a> &amp;&amp; (classOfDevice[1] &amp; 0x0F) == 0x05 &amp;&amp; (classOfDevice[0] &amp; 0xC8)) { <span class="comment">// Check if it is a mouse, keyboard or a gamepad - see: http://bluetooth-pentest.narod.ru/software/bluetooth_class_of_device-service_generator.html</span></div>
<div class="line"><a name="l00535"></a><span class="lineno"> 535</span>&#160; } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="class_b_t_d.html#a2aa418d820fb6b877ea079e0436a518e">pairWithHIDDevice</a> &amp;&amp; ((classOfDevice[1] &amp; 0x0F) == 0x05) &amp;&amp; (classOfDevice[0] &amp; 0xC8)) { <span class="comment">// Check if it is a mouse, keyboard or a gamepad - see: http://bluetooth-pentest.narod.ru/software/bluetooth_class_of_device-service_generator.html</span></div>
<div class="line"><a name="l00536"></a><span class="lineno"> 536</span>&#160;<span class="preprocessor">#ifdef DEBUG_USB_HOST</span></div>
<div class="line"><a name="l00537"></a><span class="lineno"> 537</span>&#160; checkRemoteName = <span class="keyword">true</span>; <span class="comment">// Used to print name in the serial monitor if serial debugging is enabled</span></div>
<div class="line"><a name="l00538"></a><span class="lineno"> 538</span>&#160; </div>
@ -664,7 +664,7 @@ $(function() {
<div class="line"><a name="l00596"></a><span class="lineno"> 596</span>&#160; <span class="keywordflow">for</span>(uint8_t i = 0; i &lt; 3; i++)</div>
<div class="line"><a name="l00597"></a><span class="lineno"> 597</span>&#160; classOfDevice[i] = hcibuf[i + 8];</div>
<div class="line"><a name="l00598"></a><span class="lineno"> 598</span>&#160; </div>
<div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160; <span class="keywordflow">if</span>((classOfDevice[1] &amp; 0x0F) == 0x05 &amp;&amp; (classOfDevice[0] &amp; 0xC8)) { <span class="comment">// Check if it is a mouse, keyboard or a gamepad</span></div>
<div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160; <span class="keywordflow">if</span>(((classOfDevice[1] &amp; 0x0F) == 0x05) &amp;&amp; (classOfDevice[0] &amp; 0xC8)) { <span class="comment">// Check if it is a mouse, keyboard or a gamepad</span></div>
<div class="line"><a name="l00600"></a><span class="lineno"> 600</span>&#160;<span class="preprocessor">#ifdef DEBUG_USB_HOST</span></div>
<div class="line"><a name="l00601"></a><span class="lineno"> 601</span>&#160; <span class="keywordflow">if</span>(classOfDevice[0] &amp; 0x80)</div>
<div class="line"><a name="l00602"></a><span class="lineno"> 602</span>&#160; <a class="code" href="message_8h.html#a27117e124c5d66d5512fe8d494fe6338">Notify</a>(<a class="code" href="version__helper_8h.html#a73809107539df84eaf01f6a4dea4fbff">PSTR</a>(<span class="stringliteral">&quot;\r\nMouse is connecting&quot;</span>), 0x80);</div>