USB_Host_Shield_2.0/cdcftdi_8h_source.html
2020-11-18 19:17:17 +00:00

90 lines
35 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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>USB Host Shield 2.0: cdcftdi.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/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="imageStyle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">USB Host Shield 2.0
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">cdcftdi.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="cdcftdi_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>&#160;<span class="comment">/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<span class="comment">the GPL2 (&quot;Copyleft&quot;).</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">Contact information</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">-------------------</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">Circuits At Home, LTD</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">Web : http://www.circuitsathome.com</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">e-mail : support@circuitsathome.com</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#if !defined(__CDCFTDI_H__)</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#define __CDCFTDI_H__</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_usb_8h.html">Usb.h</a>&quot;</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a92ff48c614d1c236c34d7b2dc4d28ad2"> 22</a></span>&#160;<span class="preprocessor">#define bmREQ_FTDI_OUT 0x40</span></div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a092495a2ea836801135650787513da8c"> 23</a></span>&#160;<span class="preprocessor">#define bmREQ_FTDI_IN 0xc0</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment">//#define bmREQ_FTDI_OUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment">//#define bmREQ_FTDI_IN USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a4462aa466c5ff32a8106849d347e9b24"> 28</a></span>&#160;<span class="preprocessor">#define FTDI_VID 0x0403 // FTDI VID</span></div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a38bbee602455b866024aa7a03c6cefb7"> 29</a></span>&#160;<span class="preprocessor">#define FTDI_PID 0x6001 // FTDI PID</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a15e9dfb0c839422b73f378a35a22cd75"> 31</a></span>&#160;<span class="preprocessor">#define FT232AM 0x0200</span></div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a7e3f04e312bdfc37076d1650f3860147"> 32</a></span>&#160;<span class="preprocessor">#define FT232BM 0x0400</span></div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a139af590edc937741d109cc0d8150bcb"> 33</a></span>&#160;<span class="preprocessor">#define FT2232 0x0500</span></div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#abc93995e54d77a8f602ff23b72cda110"> 34</a></span>&#160;<span class="preprocessor">#define FT232R 0x0600</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="comment">// Commands</span></div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a0c4ac1b95162aa3c959931bc46aa762c"> 37</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RESET 0 </span><span class="comment">/* Reset the port */</span><span class="preprocessor"></span></div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a0a5515eba4af8c37b71db51de289b3b4"> 38</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_MODEM_CTRL 1 </span><span class="comment">/* Set the modem control register */</span><span class="preprocessor"></span></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#abdb21a829e0aca82178834602e34be7f"> 39</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_FLOW_CTRL 2 </span><span class="comment">/* Set flow control register */</span><span class="preprocessor"></span></div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#aeb562ba85606fa0e08fc188705098f0d"> 40</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_BAUD_RATE 3 </span><span class="comment">/* Set baud rate */</span><span class="preprocessor"></span></div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ac7603bf715c4b1281f8e5907d0a61e0f"> 41</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA 4 </span><span class="comment">/* Set the data characteristics of the port */</span><span class="preprocessor"></span></div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a9fb2b825dd0fd02df1df0d4667758f11"> 42</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_GET_MODEM_STATUS 5 </span><span class="comment">/* Retrieve current value of modem status register */</span><span class="preprocessor"></span></div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#af9f8c0df356ae4c9cf44656ea7c9ed5d"> 43</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_EVENT_CHAR 6 </span><span class="comment">/* Set the event character */</span><span class="preprocessor"></span></div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#adf6c6c6c120d42411c243936e177f3f7"> 44</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_ERROR_CHAR 7 </span><span class="comment">/* Set the error character */</span><span class="preprocessor"></span></div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ac711db47fe0421069b7dffcc35e1f799"> 45</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_LATENCY_TIMER 9 </span><span class="comment">/* Set the latency timer */</span><span class="preprocessor"></span></div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a284a53c8144ef5700b4817429d22ce4f"> 46</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_GET_LATENCY_TIMER 10 </span><span class="comment">/* Get the latency timer */</span><span class="preprocessor"></span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a184292199f79a3982b4a563504afe7c4"> 48</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RESET_SIO 0</span></div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a89e71c8a21d2a6fdddcec8c3447b8cb0"> 49</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RESET_PURGE_RX 1</span></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#aef90c1417ef6f4d59753c876a0057545"> 50</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RESET_PURGE_TX 2</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a1d3b7a2a5e8a5cb449ced0025c5304e3"> 52</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_PARITY_NONE (0x0 &lt;&lt; 8 )</span></div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a3b8f65480530dc9a12240655a77a23e6"> 53</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_PARITY_ODD (0x1 &lt;&lt; 8 )</span></div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ac38ca9725e25bbe4d6234438bedd8275"> 54</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_PARITY_EVEN (0x2 &lt;&lt; 8 )</span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a37489061b7bfcd57321325d5ad44bc4e"> 55</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_PARITY_MARK (0x3 &lt;&lt; 8 )</span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ab0c4afbaade6efa1f36ada212e4e5fc7"> 56</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_PARITY_SPACE (0x4 &lt;&lt; 8 )</span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ae4c01efa00c78a56989fe8bc9ba5eac6"> 57</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_STOP_BITS_1 (0x0 &lt;&lt; 11)</span></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a3a9592e16482faa197623337739cc1df"> 58</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_STOP_BITS_15 (0x1 &lt;&lt; 11)</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#acd6333c509f4f1fa3d44d3077ae9c7df"> 59</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_STOP_BITS_2 (0x2 &lt;&lt; 11)</span></div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a05cebcdf1d7563fe77df8f1a0280086d"> 60</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_BREAK (0x1 &lt;&lt; 14)</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#adf02c870aee2747263e4bad434f3ee92"> 62</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DTR_MASK 0x1</span></div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a6f781cb804f9754fe91ca90b78821482"> 63</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DTR_HIGH ( 1 | ( FTDI_SIO_SET_DTR_MASK &lt;&lt; 8))</span></div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ab6ff468afcf80b382582d04633767f11"> 64</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DTR_LOW ( 0 | ( FTDI_SIO_SET_DTR_MASK &lt;&lt; 8))</span></div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#affb7aa2801805beaa49dbc5ca8793fd8"> 65</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_RTS_MASK 0x2</span></div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a5b6822103572e1d583c7587103406eec"> 66</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_RTS_HIGH ( 2 | ( FTDI_SIO_SET_RTS_MASK &lt;&lt; 8 ))</span></div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a4990d64ac8d725be89527a6dc21bd6c5"> 67</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_RTS_LOW ( 0 | ( FTDI_SIO_SET_RTS_MASK &lt;&lt; 8 ))</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a7d0d35ef22b504afd608531c8e5275a0"> 69</a></span>&#160;<span class="preprocessor"> #define FTDI_SIO_DISABLE_FLOW_CTRL 0x0</span></div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#af5cdb59ccbb8eba190eca16cb74bddcb"> 70</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RTS_CTS_HS (0x1 &lt;&lt; 8)</span></div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a6e9fa56460716bc7bd0beea4d7a3fe19"> 71</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_DTR_DSR_HS (0x2 &lt;&lt; 8)</span></div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a082065ffd54c708f8c632d3454045809"> 72</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_XON_XOFF_HS (0x4 &lt;&lt; 8)</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a91bed54fb7aa0e99449effed2e330822"> 74</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_CTS_MASK 0x10</span></div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a3c495d7b1e010aa66a68066307c636dd"> 75</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_DSR_MASK 0x20</span></div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ad817d85eb0f62257585caf7bb556aafb"> 76</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RI_MASK 0x40</span></div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#aeb09e7783acb50bd02981ce387ef8e7e"> 77</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RLSD_MASK 0x80</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;<span class="keyword">class </span><a class="code" href="class_f_t_d_i.html">FTDI</a>;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="class_f_t_d_i_async_oper.html"> 81</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_f_t_d_i_async_oper.html">FTDIAsyncOper</a> {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="class_f_t_d_i_async_oper.html#a1fe60b9f94fc0adc829918f51d8d7459"> 84</a></span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_f_t_d_i_async_oper.html#a1fe60b9f94fc0adc829918f51d8d7459">OnInit</a>(<a class="code" href="class_f_t_d_i.html">FTDI</a> *pftdi __attribute__((unused))) {</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; };</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="class_f_t_d_i_async_oper.html#a3993597b080c11c8d1d18dd8017a8f82"> 88</a></span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_f_t_d_i_async_oper.html#a3993597b080c11c8d1d18dd8017a8f82">OnRelease</a>(<a class="code" href="class_f_t_d_i.html">FTDI</a> *pftdi __attribute__((unused))) {</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; };</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;};</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;<span class="comment">// Only single port chips are currently supported by the library,</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;<span class="comment">// so only three endpoints are allocated.</span></div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a9d25344c78c7608f2e49de9767abd0d9"> 96</a></span>&#160;<span class="preprocessor">#define FTDI_MAX_ENDPOINTS 3</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="class_f_t_d_i.html"> 98</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_f_t_d_i.html">FTDI</a> : <span class="keyword">public</span> <a class="code" href="class_u_s_b_device_config.html">USBDeviceConfig</a>, <span class="keyword">public</span> <a class="code" href="class_usb_config_xtracter.html">UsbConfigXtracter</a> {</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> uint8_t epDataInIndex; <span class="comment">// DataIn endpoint index</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> uint8_t epDataOutIndex; <span class="comment">// DataOUT endpoint index</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> uint8_t epInterruptInIndex; <span class="comment">// InterruptIN endpoint index</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <a class="code" href="class_f_t_d_i_async_oper.html">FTDIAsyncOper</a> *pAsync;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <a class="code" href="class_u_s_b.html">USB</a> *pUsb;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; uint8_t bAddress;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; uint8_t bConfNum; <span class="comment">// configuration number</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; uint8_t bNumIface; <span class="comment">// number of interfaces in the configuration</span></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; uint8_t bNumEP; <span class="comment">// total number of EP in the configuration</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; uint32_t qNextPollTime; <span class="comment">// next poll time</span></div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keyword">volatile</span> <span class="keywordtype">bool</span> bPollEnable; <span class="comment">// poll enable flag</span></div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keyword">volatile</span> <span class="keywordtype">bool</span> ready; <span class="comment">//device ready indicator</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; uint16_t wFTDIType; <span class="comment">// Type of FTDI chip</span></div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; uint16_t wIdProduct; <span class="comment">// expected PID</span></div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <a class="code" href="struct_ep_info.html">EpInfo</a> epInfo[<a class="code" href="cdcftdi_8h.html#a9d25344c78c7608f2e49de9767abd0d9">FTDI_MAX_ENDPOINTS</a>];</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keywordtype">void</span> PrintEndpointDescriptor(<span class="keyword">const</span> <a class="code" href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html">USB_ENDPOINT_DESCRIPTOR</a>* ep_ptr);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <a class="code" href="class_f_t_d_i.html">FTDI</a>(<a class="code" href="class_u_s_b.html">USB</a> *pusb, <a class="code" href="class_f_t_d_i_async_oper.html">FTDIAsyncOper</a> *pasync, uint16_t idProduct = <a class="code" href="cdcftdi_8h.html#a38bbee602455b866024aa7a03c6cefb7">FTDI_PID</a>);</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; uint8_t SetBaudRate(uint32_t baud);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; uint8_t SetModemControl(uint16_t control);</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; uint8_t SetFlowControl(uint8_t protocol, uint8_t xon = 0x11, uint8_t xoff = 0x13);</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; uint8_t SetData(uint16_t databm);</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; uint8_t SetLatency(uint8_t l);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; uint8_t GetLatency(uint8_t *l);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="comment">// Methods for receiving and sending data</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; uint8_t RcvData(uint16_t *bytes_rcvd, uint8_t *dataptr);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; uint8_t SndData(uint16_t nbytes, uint8_t *dataptr);</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="comment">// USBDeviceConfig implementation</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; uint8_t Init(uint8_t parent, uint8_t port, <span class="keywordtype">bool</span> lowspeed);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; uint8_t Release();</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; uint8_t Poll();</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="class_f_t_d_i.html#ae224d7ea581e5df3b11416410a679086"> 138</a></span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_f_t_d_i.html#ae224d7ea581e5df3b11416410a679086">GetAddress</a>() {</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keywordflow">return</span> bAddress;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; };</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="comment">// UsbConfigXtracter implementation</span></div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keywordtype">void</span> EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, <span class="keyword">const</span> <a class="code" href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html">USB_ENDPOINT_DESCRIPTOR</a> *ep);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="class_f_t_d_i.html#a534da68bb1ff411b30281fe52e8fec10"> 145</a></span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="class_f_t_d_i.html#a534da68bb1ff411b30281fe52e8fec10">VIDPIDOK</a>(uint16_t vid, uint16_t pid) {</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordflow">return</span> (vid == <a class="code" href="cdcftdi_8h.html#a4462aa466c5ff32a8106849d347e9b24">FTDI_VID</a> &amp;&amp; pid == <a class="code" href="cdcftdi_8h.html#a38bbee602455b866024aa7a03c6cefb7">FTDI_PID</a>);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; }</div><div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="class_f_t_d_i.html#a0e392f0f49843fa9ab0701950628b47b"> 148</a></span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="class_f_t_d_i.html#a0e392f0f49843fa9ab0701950628b47b">isReady</a>() {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keywordflow">return</span> ready;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; };</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;};</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;<span class="preprocessor">#endif // __CDCFTDI_H__</span></div><div class="ttc" id="class_f_t_d_i_html_a534da68bb1ff411b30281fe52e8fec10"><div class="ttname"><a href="class_f_t_d_i.html#a534da68bb1ff411b30281fe52e8fec10">FTDI::VIDPIDOK</a></div><div class="ttdeci">virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8h_source.html#l00145">cdcftdi.h:145</a></div></div>
<div class="ttc" id="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r_html"><div class="ttname"><a href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html">USB_ENDPOINT_DESCRIPTOR</a></div><div class="ttdef"><b>Definition:</b> <a href="usb__ch9_8h_source.html#l00148">usb_ch9.h:148</a></div></div>
<div class="ttc" id="class_u_s_b_device_config_html"><div class="ttname"><a href="class_u_s_b_device_config.html">USBDeviceConfig</a></div><div class="ttdef"><b>Definition:</b> <a href="_usb_core_8h_source.html#l00134">UsbCore.h:134</a></div></div>
<div class="ttc" id="class_f_t_d_i_async_oper_html"><div class="ttname"><a href="class_f_t_d_i_async_oper.html">FTDIAsyncOper</a></div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8h_source.html#l00081">cdcftdi.h:81</a></div></div>
<div class="ttc" id="_usb_8h_html"><div class="ttname"><a href="_usb_8h.html">Usb.h</a></div></div>
<div class="ttc" id="struct_ep_info_html"><div class="ttname"><a href="struct_ep_info.html">EpInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="address_8h_source.html#l00039">address.h:39</a></div></div>
<div class="ttc" id="class_f_t_d_i_html"><div class="ttname"><a href="class_f_t_d_i.html">FTDI</a></div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8h_source.html#l00098">cdcftdi.h:98</a></div></div>
<div class="ttc" id="cdcftdi_8h_html_a38bbee602455b866024aa7a03c6cefb7"><div class="ttname"><a href="cdcftdi_8h.html#a38bbee602455b866024aa7a03c6cefb7">FTDI_PID</a></div><div class="ttdeci">#define FTDI_PID</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8h_source.html#l00029">cdcftdi.h:29</a></div></div>
<div class="ttc" id="class_f_t_d_i_html_a0e392f0f49843fa9ab0701950628b47b"><div class="ttname"><a href="class_f_t_d_i.html#a0e392f0f49843fa9ab0701950628b47b">FTDI::isReady</a></div><div class="ttdeci">virtual bool isReady()</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8h_source.html#l00148">cdcftdi.h:148</a></div></div>
<div class="ttc" id="class_f_t_d_i_async_oper_html_a1fe60b9f94fc0adc829918f51d8d7459"><div class="ttname"><a href="class_f_t_d_i_async_oper.html#a1fe60b9f94fc0adc829918f51d8d7459">FTDIAsyncOper::OnInit</a></div><div class="ttdeci">virtual uint8_t OnInit(FTDI *pftdi)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8h_source.html#l00084">cdcftdi.h:84</a></div></div>
<div class="ttc" id="class_f_t_d_i_html_ae224d7ea581e5df3b11416410a679086"><div class="ttname"><a href="class_f_t_d_i.html#ae224d7ea581e5df3b11416410a679086">FTDI::GetAddress</a></div><div class="ttdeci">virtual uint8_t GetAddress()</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8h_source.html#l00138">cdcftdi.h:138</a></div></div>
<div class="ttc" id="class_usb_config_xtracter_html"><div class="ttname"><a href="class_usb_config_xtracter.html">UsbConfigXtracter</a></div><div class="ttdef"><b>Definition:</b> <a href="confdescparser_8h_source.html#l00030">confdescparser.h:30</a></div></div>
<div class="ttc" id="class_f_t_d_i_async_oper_html_a3993597b080c11c8d1d18dd8017a8f82"><div class="ttname"><a href="class_f_t_d_i_async_oper.html#a3993597b080c11c8d1d18dd8017a8f82">FTDIAsyncOper::OnRelease</a></div><div class="ttdeci">virtual uint8_t OnRelease(FTDI *pftdi)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8h_source.html#l00088">cdcftdi.h:88</a></div></div>
<div class="ttc" id="cdcftdi_8h_html_a4462aa466c5ff32a8106849d347e9b24"><div class="ttname"><a href="cdcftdi_8h.html#a4462aa466c5ff32a8106849d347e9b24">FTDI_VID</a></div><div class="ttdeci">#define FTDI_VID</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8h_source.html#l00028">cdcftdi.h:28</a></div></div>
<div class="ttc" id="class_u_s_b_html"><div class="ttname"><a href="class_u_s_b.html">USB</a></div><div class="ttdef"><b>Definition:</b> <a href="_usb_core_8h_source.html#l00210">UsbCore.h:210</a></div></div>
<div class="ttc" id="cdcftdi_8h_html_a9d25344c78c7608f2e49de9767abd0d9"><div class="ttname"><a href="cdcftdi_8h.html#a9d25344c78c7608f2e49de9767abd0d9">FTDI_MAX_ENDPOINTS</a></div><div class="ttdeci">#define FTDI_MAX_ENDPOINTS</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8h_source.html#l00096">cdcftdi.h:96</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>