mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
254 lines
36 KiB
HTML
254 lines
36 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||
|
<meta name="generator" content="Doxygen 1.8.5"/>
|
||
|
<title>USB Host Shield 2.0: BTHID.h Source File</title>
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="jquery.js"></script>
|
||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||
|
</script>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="imageStyle.css" rel="stylesheet" type="text/css"/>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<td style="padding-left: 0.5em;">
|
||
|
<div id="projectname">USB Host Shield 2.0
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.8.5 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||
|
<li>
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div id="navrow2" class="tabs2">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
<div id="nav-path" class="navpath">
|
||
|
<ul>
|
||
|
<li class="navelem"><a class="el" href="dir_e5fbe6d2783ccd4c93c7856d92d7be6e.html">GitHub</a></li><li class="navelem"><a class="el" href="dir_397a095372f04465e811d0ee219bbf8f.html">USB_Host_Shield_2.0</a></li> </ul>
|
||
|
</div>
|
||
|
</div><!-- top -->
|
||
|
<div class="header">
|
||
|
<div class="headertitle">
|
||
|
<div class="title">BTHID.h</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<a href="_b_t_h_i_d_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* Copyright (C) 2013 Kristian Lauszus, TKJ Electronics. All rights reserved.</span></div>
|
||
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"></span></div>
|
||
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> This software may be distributed and modified under the terms of the GNU</span></div>
|
||
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> General Public License version 2 (GPL2) as published by the Free Software</span></div>
|
||
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> Foundation and appearing in the file GPL2.TXT included in the packaging of</span></div>
|
||
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> this file. Please note that GPL2 Section 2[b] requires that all works based</span></div>
|
||
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> on this software must also be made publicly available under the terms of</span></div>
|
||
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> the GPL2 ("Copyleft").</span></div>
|
||
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span></div>
|
||
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> Contact information</span></div>
|
||
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> -------------------</span></div>
|
||
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"></span></div>
|
||
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> Kristian Lauszus, TKJ Electronics</span></div>
|
||
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> Web : http://www.tkjelectronics.com</span></div>
|
||
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> e-mail : kristianl@tkjelectronics.com</span></div>
|
||
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> */</span></div>
|
||
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div>
|
||
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#ifndef _bthid_h_</span></div>
|
||
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor"></span><span class="preprocessor">#define _bthid_h_</span></div>
|
||
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor"></span></div>
|
||
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "<a class="code" href="_b_t_d_8h.html">BTD.h</a>"</span></div>
|
||
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "<a class="code" href="controller_enums_8h.html">controllerEnums.h</a>"</span></div>
|
||
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "<a class="code" href="hidboot_8h.html">hidboot.h</a>"</span></div>
|
||
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div>
|
||
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment">/* Bluetooth L2CAP states for L2CAP_task() */</span></div>
|
||
|
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a15cc1db556ad9a4ec6144ca8a42f8919"> 26</a></span> <span class="preprocessor">#define L2CAP_WAIT 0</span></div>
|
||
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor"></span></div>
|
||
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment">// These states are used if the device is the host</span></div>
|
||
|
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#abac08b5b24a1cd2b12517cd9aa6c616b"> 29</a></span> <span class="preprocessor">#define L2CAP_CONTROL_SUCCESS 1</span></div>
|
||
|
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#ac7aa7fd7a8a34a6c9e420e3cb114737b"> 30</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_INTERRUPT_SETUP 2</span></div>
|
||
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor"></span></div>
|
||
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// These states are used if the Arduino is the host</span></div>
|
||
|
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a68bcdd68c269cd7970d5271a00bbe5fe"> 33</a></span> <span class="preprocessor">#define L2CAP_CONTROL_CONNECT_REQUEST 3</span></div>
|
||
|
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#aaaf733ee2c84bd8df4d24f2ae1f3b378"> 34</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_CONTROL_CONFIG_REQUEST 4</span></div>
|
||
|
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#af0b913a7e9e54b1f6ab95d82bd36f954"> 35</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_INTERRUPT_CONNECT_REQUEST 5</span></div>
|
||
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor"></span></div>
|
||
|
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a73e3a81d9a8850075fd10933acc5a035"> 37</a></span> <span class="preprocessor">#define L2CAP_INTERRUPT_CONFIG_REQUEST 6</span></div>
|
||
|
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#ae4da52ca67e1f8b977199b24e8f3a400"> 38</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_DONE 7</span></div>
|
||
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor"></span></div>
|
||
|
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#ab569b2085ad29f41d1da9c0ed352bd65"> 40</a></span> <span class="preprocessor">#define L2CAP_INTERRUPT_DISCONNECT 8</span></div>
|
||
|
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a9b5140e7ca5941e5535c575255ffc1cc"> 41</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_CONTROL_DISCONNECT 9</span></div>
|
||
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="preprocessor"></span></div>
|
||
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment">/* L2CAP event flags */</span></div>
|
||
|
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a2e5a9c283f0912833f3e0418d3feadd7"> 44</a></span> <span class="preprocessor">#define L2CAP_FLAG_CONTROL_CONNECTED 0x01</span></div>
|
||
|
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#aad823543553cc7500ac49d7479eb858f"> 45</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_FLAG_INTERRUPT_CONNECTED 0x02</span></div>
|
||
|
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a0c444d5d06ec604820d426556c2f38d7"> 46</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_FLAG_CONFIG_CONTROL_SUCCESS 0x04</span></div>
|
||
|
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a2b3cdcd3124251a40ce825da0d8dcb6f"> 47</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_FLAG_CONFIG_INTERRUPT_SUCCESS 0x08</span></div>
|
||
|
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a27057737ae0b2246442511c01eeed192"> 48</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_FLAG_DISCONNECT_CONTROL_RESPONSE 0x10</span></div>
|
||
|
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#acc096a05301f3cbdece4ad372cc149c3"> 49</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_FLAG_DISCONNECT_INTERRUPT_RESPONSE 0x20</span></div>
|
||
|
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a969a1ee84797f3ee5006c41f67373f96"> 50</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_FLAG_CONNECTION_CONTROL_REQUEST 0x40</span></div>
|
||
|
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a015f3b25bd7a2908c84b973dec453f45"> 51</a></span> <span class="preprocessor"></span><span class="preprocessor">#define L2CAP_FLAG_CONNECTION_INTERRUPT_REQUEST 0x80</span></div>
|
||
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="preprocessor"></span></div>
|
||
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment">/* Macros for L2CAP event flag tests */</span></div>
|
||
|
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#acaec1ddc53593c80dc625c1f361e3a24"> 54</a></span> <span class="preprocessor">#define l2cap_connected_control_flag (l2cap_event_flag & L2CAP_FLAG_CONTROL_CONNECTED)</span></div>
|
||
|
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#ac72a2b645fafc5bdbd85c1f59cc937cc"> 55</a></span> <span class="preprocessor"></span><span class="preprocessor">#define l2cap_connected_interrupt_flag (l2cap_event_flag & L2CAP_FLAG_INTERRUPT_CONNECTED)</span></div>
|
||
|
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a39a58b19fb4ef26cf503ed57a43570a4"> 56</a></span> <span class="preprocessor"></span><span class="preprocessor">#define l2cap_config_success_control_flag (l2cap_event_flag & L2CAP_FLAG_CONFIG_CONTROL_SUCCESS)</span></div>
|
||
|
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a9b3e87e1f460bc011e69f5e53e79c104"> 57</a></span> <span class="preprocessor"></span><span class="preprocessor">#define l2cap_config_success_interrupt_flag (l2cap_event_flag & L2CAP_FLAG_CONFIG_INTERRUPT_SUCCESS)</span></div>
|
||
|
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a7f0cab74308e812106252c53b18c0391"> 58</a></span> <span class="preprocessor"></span><span class="preprocessor">#define l2cap_disconnect_response_control_flag (l2cap_event_flag & L2CAP_FLAG_DISCONNECT_CONTROL_RESPONSE)</span></div>
|
||
|
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a667178a4486c4dee88e052b3562362cd"> 59</a></span> <span class="preprocessor"></span><span class="preprocessor">#define l2cap_disconnect_response_interrupt_flag (l2cap_event_flag & L2CAP_FLAG_DISCONNECT_INTERRUPT_RESPONSE)</span></div>
|
||
|
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a728c7d92dd341dcc1b8f4bf95bb4826d"> 60</a></span> <span class="preprocessor"></span><span class="preprocessor">#define l2cap_connection_request_control_flag (l2cap_event_flag & L2CAP_FLAG_CONNECTION_CONTROL_REQUEST)</span></div>
|
||
|
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a9fa7bceb44bbdff3229fd431627b9868"> 61</a></span> <span class="preprocessor"></span><span class="preprocessor">#define l2cap_connection_request_interrupt_flag (l2cap_event_flag & L2CAP_FLAG_CONNECTION_INTERRUPT_REQUEST)</span></div>
|
||
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="preprocessor"></span></div>
|
||
|
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a699c5d6eb13133dce9504391bc610f3e"> 63</a></span> <span class="preprocessor">#define KEYBOARD_PARSER_ID 0</span></div>
|
||
|
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#a0b48c93189cf128c1ef13ce86b4fa6be"> 64</a></span> <span class="preprocessor"></span><span class="preprocessor">#define MOUSE_PARSER_ID 1</span></div>
|
||
|
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="_b_t_h_i_d_8h.html#ab3dce23ba2c4c289645510dc8f51b65a"> 65</a></span> <span class="preprocessor"></span><span class="preprocessor">#define epMUL 2</span></div>
|
||
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="preprocessor"></span></div>
|
||
|
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="class_b_t_h_i_d.html"> 68</a></span> <span class="keyword">class </span><a class="code" href="class_b_t_h_i_d.html">BTHID</a> : <span class="keyword">public</span> <a class="code" href="class_bluetooth_service.html">BluetoothService</a> {</div>
|
||
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">public</span>:</div>
|
||
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <a class="code" href="class_b_t_h_i_d.html#ab81dcc90a64615b7ae38083dd8188505">BTHID</a>(<a class="code" href="class_b_t_d.html">BTD</a> *p, <span class="keywordtype">bool</span> <a class="code" href="class_b_t_h_i_d.html#afb19720b65cda69d910416c7a689dd45">pair</a> = <span class="keyword">false</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *pin = <span class="stringliteral">"1234"</span>);</div>
|
||
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div>
|
||
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_b_t_h_i_d.html#a84eb1b910027f2d78741f65225c14e54">ACLData</a>(uint8_t* <a class="code" href="class_b_t_h_i_d.html#a84eb1b910027f2d78741f65225c14e54">ACLData</a>);</div>
|
||
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_b_t_h_i_d.html#a938eab04e406a29cc9324dad3ccb52cc">Run</a>();</div>
|
||
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_b_t_h_i_d.html#af4c58b81414a037910dd6fb78f97b96e">Reset</a>();</div>
|
||
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_b_t_h_i_d.html#ae1ee62d7b9951ec7960f122c9fc2d2d0">disconnect</a>();</div>
|
||
|
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_b_t_h_i_d.html#ade1924514bc9c9cd71f54a1f37529575"> 92</a></span>  <a class="code" href="class_h_i_d_report_parser.html">HIDReportParser</a> *<a class="code" href="class_b_t_h_i_d.html#ade1924514bc9c9cd71f54a1f37529575">GetReportParser</a>(uint8_t <span class="keywordtype">id</span>) {</div>
|
||
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">return</span> pRptParser[id];</div>
|
||
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  };</div>
|
||
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> </div>
|
||
|
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="class_b_t_h_i_d.html#a0e903f0b5040f3561e5de6c4431027b1"> 96</a></span>  <span class="keywordtype">bool</span> <a class="code" href="class_b_t_h_i_d.html#a0e903f0b5040f3561e5de6c4431027b1">SetReportParser</a>(uint8_t <span class="keywordtype">id</span>, <a class="code" href="class_h_i_d_report_parser.html">HIDReportParser</a> *prs) {</div>
|
||
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  pRptParser[id] = prs;</div>
|
||
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  };</div>
|
||
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> </div>
|
||
|
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="class_b_t_h_i_d.html#afceaafc89581441da40b141170b98595"> 101</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_b_t_h_i_d.html#afceaafc89581441da40b141170b98595">setProtocolMode</a>(uint8_t mode) {</div>
|
||
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  protocolMode = mode;</div>
|
||
|
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="class_b_t_h_i_d.html#ab3a81823a1d8805383146a6baad6ccc4"> 103</a></span>  };</div>
|
||
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div>
|
||
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordtype">bool</span> <a class="code" href="class_b_t_h_i_d.html#ab3a81823a1d8805383146a6baad6ccc4">connected</a>;</div>
|
||
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div>
|
||
|
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="class_b_t_h_i_d.html#afb19720b65cda69d910416c7a689dd45"> 109</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_b_t_h_i_d.html#afb19720b65cda69d910416c7a689dd45">pair</a>(<span class="keywordtype">void</span>) {</div>
|
||
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">if</span> (pBtd)</div>
|
||
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  pBtd-><a class="code" href="class_b_t_d.html#a0b59db80825ffd5974e0d2c4a046b328">pairWithHID</a>();</div>
|
||
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  };</div>
|
||
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> </div>
|
||
|
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="class_b_t_h_i_d.html#ac2d67e173774e344bca86fbd0ed5a10c"> 118</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_b_t_h_i_d.html#ac2d67e173774e344bca86fbd0ed5a10c">attachOnInit</a>(<span class="keywordtype">void</span> (*funcOnInit)(<span class="keywordtype">void</span>)) {</div>
|
||
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  pFuncOnInit = funcOnInit;</div>
|
||
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  };</div>
|
||
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div>
|
||
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="keyword">private</span>:</div>
|
||
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <a class="code" href="class_b_t_d.html">BTD</a> *pBtd; <span class="comment">// Pointer to BTD instance</span></div>
|
||
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div>
|
||
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <a class="code" href="class_h_i_d_report_parser.html">HIDReportParser</a> *pRptParser[<a class="code" href="_b_t_h_i_d_8h.html#ab3dce23ba2c4c289645510dc8f51b65a">epMUL</a>];</div>
|
||
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> </div>
|
||
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordtype">void</span> setProtocol();</div>
|
||
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  uint8_t protocolMode;</div>
|
||
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div>
|
||
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordtype">void</span> onInit() {</div>
|
||
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">if</span> (pFuncOnInit)</div>
|
||
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  pFuncOnInit(); <span class="comment">// Call the user function</span></div>
|
||
|
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  }</div>
|
||
|
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  void (*pFuncOnInit)(void); <span class="comment">// Pointer to function called in onInit()</span></div>
|
||
|
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> </div>
|
||
|
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordtype">void</span> L2CAP_task(); <span class="comment">// L2CAP state machine</span></div>
|
||
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div>
|
||
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="comment">/* Variables filled from HCI event management */</span></div>
|
||
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  uint16_t hci_handle;</div>
|
||
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordtype">bool</span> activeConnection; <span class="comment">// Used to indicate if it's already has established a connection</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>  <span class="comment">/* Variables used by high level L2CAP task */</span></div>
|
||
|
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  uint8_t l2cap_state;</div>
|
||
|
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  uint8_t l2cap_event_flag; <span class="comment">// l2cap flags of received Bluetooth events</span></div>
|
||
|
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> </div>
|
||
|
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  uint8_t ButtonState, OldButtonState, ButtonClickState;</div>
|
||
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  int16_t xAxis, yAxis, scroll;</div>
|
||
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div>
|
||
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="comment">/* L2CAP Channels */</span></div>
|
||
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  uint8_t control_scid[2]; <span class="comment">// L2CAP source CID for HID_Control</span></div>
|
||
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  uint8_t control_dcid[2]; <span class="comment">// 0x0070</span></div>
|
||
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  uint8_t interrupt_scid[2]; <span class="comment">// L2CAP source CID for HID_Interrupt</span></div>
|
||
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  uint8_t interrupt_dcid[2]; <span class="comment">// 0x0071</span></div>
|
||
|
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  uint8_t identifier; <span class="comment">// Identifier for connection</span></div>
|
||
|
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> };</div>
|
||
|
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="preprocessor">#endif</span></div>
|
||
|
<div class="ttc" id="hidboot_8h_html"><div class="ttname"><a href="hidboot_8h.html">hidboot.h</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_a84eb1b910027f2d78741f65225c14e54"><div class="ttname"><a href="class_b_t_h_i_d.html#a84eb1b910027f2d78741f65225c14e54">BTHID::ACLData</a></div><div class="ttdeci">virtual void ACLData(uint8_t *ACLData)</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8cpp_source.html#l00061">BTHID.cpp:61</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_d_html"><div class="ttname"><a href="class_b_t_d.html">BTD</a></div><div class="ttdef"><b>Definition:</b> <a href="_b_t_d_8h_source.html#l00158">BTD.h:158</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_ab3a81823a1d8805383146a6baad6ccc4"><div class="ttname"><a href="class_b_t_h_i_d.html#ab3a81823a1d8805383146a6baad6ccc4">BTHID::connected</a></div><div class="ttdeci">bool connected</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8h_source.html#l00103">BTHID.h:103</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_a938eab04e406a29cc9324dad3ccb52cc"><div class="ttname"><a href="class_b_t_h_i_d.html#a938eab04e406a29cc9324dad3ccb52cc">BTHID::Run</a></div><div class="ttdeci">virtual void Run()</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8cpp_source.html#l00347">BTHID.cpp:347</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_af4c58b81414a037910dd6fb78f97b96e"><div class="ttname"><a href="class_b_t_h_i_d.html#af4c58b81414a037910dd6fb78f97b96e">BTHID::Reset</a></div><div class="ttdeci">virtual void Reset()</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8cpp_source.html#l00047">BTHID.cpp:47</a></div></div>
|
||
|
<div class="ttc" id="controller_enums_8h_html"><div class="ttname"><a href="controller_enums_8h.html">controllerEnums.h</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_ac2d67e173774e344bca86fbd0ed5a10c"><div class="ttname"><a href="class_b_t_h_i_d.html#ac2d67e173774e344bca86fbd0ed5a10c">BTHID::attachOnInit</a></div><div class="ttdeci">void attachOnInit(void(*funcOnInit)(void))</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8h_source.html#l00118">BTHID.h:118</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_d_html_a0b59db80825ffd5974e0d2c4a046b328"><div class="ttname"><a href="class_b_t_d.html#a0b59db80825ffd5974e0d2c4a046b328">BTD::pairWithHID</a></div><div class="ttdeci">void pairWithHID()</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_d_8h_source.html#l00441">BTD.h:441</a></div></div>
|
||
|
<div class="ttc" id="class_bluetooth_service_html"><div class="ttname"><a href="class_bluetooth_service.html">BluetoothService</a></div><div class="ttdef"><b>Definition:</b> <a href="_b_t_d_8h_source.html#l00139">BTD.h:139</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_ae1ee62d7b9951ec7960f122c9fc2d2d0"><div class="ttname"><a href="class_b_t_h_i_d.html#ae1ee62d7b9951ec7960f122c9fc2d2d0">BTHID::disconnect</a></div><div class="ttdeci">virtual void disconnect()</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8cpp_source.html#l00054">BTHID.cpp:54</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_ade1924514bc9c9cd71f54a1f37529575"><div class="ttname"><a href="class_b_t_h_i_d.html#ade1924514bc9c9cd71f54a1f37529575">BTHID::GetReportParser</a></div><div class="ttdeci">HIDReportParser * GetReportParser(uint8_t id)</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8h_source.html#l00092">BTHID.h:92</a></div></div>
|
||
|
<div class="ttc" id="_b_t_h_i_d_8h_html_ab3dce23ba2c4c289645510dc8f51b65a"><div class="ttname"><a href="_b_t_h_i_d_8h.html#ab3dce23ba2c4c289645510dc8f51b65a">epMUL</a></div><div class="ttdeci">#define epMUL</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8h_source.html#l00065">BTHID.h:65</a></div></div>
|
||
|
<div class="ttc" id="class_h_i_d_report_parser_html"><div class="ttname"><a href="class_h_i_d_report_parser.html">HIDReportParser</a></div><div class="ttdef"><b>Definition:</b> <a href="hid_8h_source.html#l00135">hid.h:135</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_ab81dcc90a64615b7ae38083dd8188505"><div class="ttname"><a href="class_b_t_h_i_d.html#ab81dcc90a64615b7ae38083dd8188505">BTHID::BTHID</a></div><div class="ttdeci">BTHID(BTD *p, bool pair=false, const char *pin="1234")</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8cpp_source.html#l00023">BTHID.cpp:23</a></div></div>
|
||
|
<div class="ttc" id="class_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#l00068">BTHID.h:68</a></div></div>
|
||
|
<div class="ttc" id="_b_t_d_8h_html"><div class="ttname"><a href="_b_t_d_8h.html">BTD.h</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_afceaafc89581441da40b141170b98595"><div class="ttname"><a href="class_b_t_h_i_d.html#afceaafc89581441da40b141170b98595">BTHID::setProtocolMode</a></div><div class="ttdeci">void setProtocolMode(uint8_t mode)</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8h_source.html#l00101">BTHID.h:101</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_afb19720b65cda69d910416c7a689dd45"><div class="ttname"><a href="class_b_t_h_i_d.html#afb19720b65cda69d910416c7a689dd45">BTHID::pair</a></div><div class="ttdeci">void pair(void)</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8h_source.html#l00109">BTHID.h:109</a></div></div>
|
||
|
<div class="ttc" id="class_b_t_h_i_d_html_a0e903f0b5040f3561e5de6c4431027b1"><div class="ttname"><a href="class_b_t_h_i_d.html#a0e903f0b5040f3561e5de6c4431027b1">BTHID::SetReportParser</a></div><div class="ttdeci">bool SetReportParser(uint8_t id, HIDReportParser *prs)</div><div class="ttdef"><b>Definition:</b> <a href="_b_t_h_i_d_8h_source.html#l00096">BTHID.h:96</a></div></div>
|
||
|
</div><!-- fragment --></div><!-- contents -->
|
||
|
<!-- start footer part -->
|
||
|
<hr class="footer"/><address class="footer"><small>
|
||
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.8.5
|
||
|
</small></address>
|
||
|
</body>
|
||
|
</html>
|