<!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.7"/>
<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/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.7 -->
<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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</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">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">   45</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a184292199f79a3982b4a563504afe7c4">   46</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RESET_SIO                  0</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a89e71c8a21d2a6fdddcec8c3447b8cb0">   47</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RESET_PURGE_RX             1</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#aef90c1417ef6f4d59753c876a0057545">   48</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RESET_PURGE_TX             2</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a1d3b7a2a5e8a5cb449ced0025c5304e3">   50</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_PARITY_NONE       (0x0 &lt;&lt; 8 )</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a3b8f65480530dc9a12240655a77a23e6">   51</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_PARITY_ODD        (0x1 &lt;&lt; 8 )</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ac38ca9725e25bbe4d6234438bedd8275">   52</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_PARITY_EVEN       (0x2 &lt;&lt; 8 )</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a37489061b7bfcd57321325d5ad44bc4e">   53</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_PARITY_MARK       (0x3 &lt;&lt; 8 )</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ab0c4afbaade6efa1f36ada212e4e5fc7">   54</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DATA_PARITY_SPACE      (0x4 &lt;&lt; 8 )</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ae4c01efa00c78a56989fe8bc9ba5eac6">   55</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="l00056"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a3a9592e16482faa197623337739cc1df">   56</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="l00057"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#acd6333c509f4f1fa3d44d3077ae9c7df">   57</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="l00058"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a05cebcdf1d7563fe77df8f1a0280086d">   58</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_BREAK                  (0x1 &lt;&lt; 14)</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#adf02c870aee2747263e4bad434f3ee92">   60</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_DTR_MASK               0x1</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a6f781cb804f9754fe91ca90b78821482">   61</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="l00062"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ab6ff468afcf80b382582d04633767f11">   62</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="l00063"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#affb7aa2801805beaa49dbc5ca8793fd8">   63</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_SET_RTS_MASK               0x2</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a5b6822103572e1d583c7587103406eec">   64</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="l00065"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a4990d64ac8d725be89527a6dc21bd6c5">   65</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="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a7d0d35ef22b504afd608531c8e5275a0">   67</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_DISABLE_FLOW_CTRL          0x0</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#af5cdb59ccbb8eba190eca16cb74bddcb">   68</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RTS_CTS_HS                 (0x1 &lt;&lt; 8)</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a6e9fa56460716bc7bd0beea4d7a3fe19">   69</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_DTR_DSR_HS                 (0x2 &lt;&lt; 8)</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a082065ffd54c708f8c632d3454045809">   70</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_XON_XOFF_HS                (0x4 &lt;&lt; 8)</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a91bed54fb7aa0e99449effed2e330822">   72</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_CTS_MASK                   0x10</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a3c495d7b1e010aa66a68066307c636dd">   73</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_DSR_MASK                   0x20</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#ad817d85eb0f62257585caf7bb556aafb">   74</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RI_MASK                    0x40</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#aeb09e7783acb50bd02981ce387ef8e7e">   75</a></span>&#160;<span class="preprocessor">#define FTDI_SIO_RLSD_MASK                  0x80</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</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="l00078"></a><span class="lineno">   78</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="class_f_t_d_i_async_oper.html">   79</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="l00080"></a><span class="lineno">   80</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keyword">virtual</span> uint8_t <a class="code" href="class_f_t_d_i_async_oper.html#ae9178132b564edd5f75b65d6943aa400">OnInit</a>(<a class="code" href="class_f_t_d_i.html">FTDI</a> *pftdi) = 0;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;};</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">   84</span>&#160;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">// Only single port chips are currently supported by the library,</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="comment">//      so only three endpoints are allocated.</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="cdcftdi_8h.html#a9d25344c78c7608f2e49de9767abd0d9">   87</a></span>&#160;<span class="preprocessor">#define FTDI_MAX_ENDPOINTS                  3</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="class_f_t_d_i.html">   89</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="l00090"></a><span class="lineno">   90</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="l00091"></a><span class="lineno">   91</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="l00092"></a><span class="lineno">   92</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="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <a class="code" href="class_f_t_d_i_async_oper.html">FTDIAsyncOper</a> *pAsync;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <a class="code" href="class_u_s_b.html">USB</a> *pUsb;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        uint8_t bAddress;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        uint8_t bConfNum; <span class="comment">// configuration number</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        uint8_t bNumIface; <span class="comment">// number of interfaces in the configuration</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        uint8_t bNumEP; <span class="comment">// total number of EP in the configuration</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        uint32_t qNextPollTime; <span class="comment">// next poll time</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="keywordtype">bool</span> bPollEnable; <span class="comment">// poll enable flag</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        uint16_t wFTDIType; <span class="comment">// Type of FTDI chip</span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</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="l00105"></a><span class="lineno">  105</span>&#160;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</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="l00107"></a><span class="lineno">  107</span>&#160;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <a class="code" href="class_f_t_d_i.html#ae517a5435ada4145998aa7b07e78adb3">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);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        uint8_t <a class="code" href="class_f_t_d_i.html#acb8efdc33bd503563018b7eee577aecf">SetBaudRate</a>(uint32_t baud);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        uint8_t <a class="code" href="class_f_t_d_i.html#a86130f30e67e934346c3c7faf5ee6c56">SetModemControl</a>(uint16_t control);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        uint8_t <a class="code" href="class_f_t_d_i.html#a7c107efeff2d46cb711cadd0a6c31636">SetFlowControl</a>(uint8_t protocol, uint8_t xon = 0x11, uint8_t xoff = 0x13);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        uint8_t <a class="code" href="class_f_t_d_i.html#ab7d7c305729fe4bbc746fa0569261a71">SetData</a>(uint16_t databm);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="comment">// Methods for recieving and sending data</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        uint8_t <a class="code" href="class_f_t_d_i.html#aa367ae72fbfda931cae8ec751e9dc434">RcvData</a>(uint16_t *bytes_rcvd, uint8_t *dataptr);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        uint8_t <a class="code" href="class_f_t_d_i.html#a90309b11a160bad9ceb0b77545b7a240">SndData</a>(uint16_t nbytes, uint8_t *dataptr);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <span class="comment">// USBDeviceConfig implementation</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keyword">virtual</span> uint8_t <a class="code" href="class_f_t_d_i.html#a2d40115414dadfee8c284e0f5d397621">Init</a>(uint8_t parent, uint8_t port, <span class="keywordtype">bool</span> lowspeed);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        <span class="keyword">virtual</span> uint8_t <a class="code" href="class_f_t_d_i.html#aadee262e2eda31deda790d5d10090b6f">Release</a>();</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <span class="keyword">virtual</span> uint8_t <a class="code" href="class_f_t_d_i.html#a5f383dd8eb114563194da011f1d613fd">Poll</a>();</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="class_f_t_d_i.html#ae224d7ea581e5df3b11416410a679086">  125</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="l00126"></a><span class="lineno">  126</span>&#160;                <span class="keywordflow">return</span> bAddress;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        };</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">// UsbConfigXtracter implementation</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_f_t_d_i.html#a3e3f771b9f2a99fcedf7ed665b597109">EndpointXtract</a>(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="l00131"></a><span class="lineno">  131</span>&#160;};</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="preprocessor">#endif // __CDCFTDI_H__</span></div>
<div class="ttc" id="class_f_t_d_i_html_a3e3f771b9f2a99fcedf7ed665b597109"><div class="ttname"><a href="class_f_t_d_i.html#a3e3f771b9f2a99fcedf7ed665b597109">FTDI::EndpointXtract</a></div><div class="ttdeci">virtual void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00215">cdcftdi.cpp:215</a></div></div>
<div class="ttc" id="class_f_t_d_i_html_acb8efdc33bd503563018b7eee577aecf"><div class="ttname"><a href="class_f_t_d_i.html#acb8efdc33bd503563018b7eee577aecf">FTDI::SetBaudRate</a></div><div class="ttdeci">uint8_t SetBaudRate(uint32_t baud)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00267">cdcftdi.cpp:267</a></div></div>
<div class="ttc" id="class_f_t_d_i_html_a86130f30e67e934346c3c7faf5ee6c56"><div class="ttname"><a href="class_f_t_d_i.html#a86130f30e67e934346c3c7faf5ee6c56">FTDI::SetModemControl</a></div><div class="ttdeci">uint8_t SetModemControl(uint16_t control)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00304">cdcftdi.cpp:304</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#l00141">usb_ch9.h:141</a></div></div>
<div class="ttc" id="class_f_t_d_i_html_ae517a5435ada4145998aa7b07e78adb3"><div class="ttname"><a href="class_f_t_d_i.html#ae517a5435ada4145998aa7b07e78adb3">FTDI::FTDI</a></div><div class="ttdeci">FTDI(USB *pusb, FTDIAsyncOper *pasync)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00023">cdcftdi.cpp:23</a></div></div>
<div class="ttc" id="class_f_t_d_i_html_a7c107efeff2d46cb711cadd0a6c31636"><div class="ttname"><a href="class_f_t_d_i.html#a7c107efeff2d46cb711cadd0a6c31636">FTDI::SetFlowControl</a></div><div class="ttdeci">uint8_t SetFlowControl(uint8_t protocol, uint8_t xon=0x11, uint8_t xoff=0x13)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00308">cdcftdi.cpp:308</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#l00119">UsbCore.h:119</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#l00079">cdcftdi.h:79</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="class_f_t_d_i_html_aa367ae72fbfda931cae8ec751e9dc434"><div class="ttname"><a href="class_f_t_d_i.html#aa367ae72fbfda931cae8ec751e9dc434">FTDI::RcvData</a></div><div class="ttdeci">uint8_t RcvData(uint16_t *bytes_rcvd, uint8_t *dataptr)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00316">cdcftdi.cpp:316</a></div></div>
<div class="ttc" id="class_f_t_d_i_html_a5f383dd8eb114563194da011f1d613fd"><div class="ttname"><a href="class_f_t_d_i.html#a5f383dd8eb114563194da011f1d613fd">FTDI::Poll</a></div><div class="ttdeci">virtual uint8_t Poll()</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00252">cdcftdi.cpp:252</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#l00032">address.h:32</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#l00089">cdcftdi.h:89</a></div></div>
<div class="ttc" id="class_f_t_d_i_html_a2d40115414dadfee8c284e0f5d397621"><div class="ttname"><a href="class_f_t_d_i.html#a2d40115414dadfee8c284e0f5d397621">FTDI::Init</a></div><div class="ttdeci">virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00041">cdcftdi.cpp:41</a></div></div>
<div class="ttc" id="class_f_t_d_i_html_a90309b11a160bad9ceb0b77545b7a240"><div class="ttname"><a href="class_f_t_d_i.html#a90309b11a160bad9ceb0b77545b7a240">FTDI::SndData</a></div><div class="ttdeci">uint8_t SndData(uint16_t nbytes, uint8_t *dataptr)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00320">cdcftdi.cpp:320</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#l00125">cdcftdi.h:125</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#l00023">confdescparser.h:23</a></div></div>
<div class="ttc" id="class_f_t_d_i_async_oper_html_ae9178132b564edd5f75b65d6943aa400"><div class="ttname"><a href="class_f_t_d_i_async_oper.html#ae9178132b564edd5f75b65d6943aa400">FTDIAsyncOper::OnInit</a></div><div class="ttdeci">virtual uint8_t OnInit(FTDI *pftdi)=0</div></div>
<div class="ttc" id="class_f_t_d_i_html_aadee262e2eda31deda790d5d10090b6f"><div class="ttname"><a href="class_f_t_d_i.html#aadee262e2eda31deda790d5d10090b6f">FTDI::Release</a></div><div class="ttdeci">virtual uint8_t Release()</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00242">cdcftdi.cpp:242</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#l00190">UsbCore.h:190</a></div></div>
<div class="ttc" id="class_f_t_d_i_html_ab7d7c305729fe4bbc746fa0569261a71"><div class="ttname"><a href="class_f_t_d_i.html#ab7d7c305729fe4bbc746fa0569261a71">FTDI::SetData</a></div><div class="ttdeci">uint8_t SetData(uint16_t databm)</div><div class="ttdef"><b>Definition:</b> <a href="cdcftdi_8cpp_source.html#l00312">cdcftdi.cpp:312</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#l00087">cdcftdi.h:87</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.7
</small></address>
</body>
</html>