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

118 lines
39 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: usbh_midi.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">usbh_midi.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="usbh__midi_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">/*</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"> * USB-MIDI class driver for USB Host Shield 2.0 Library</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Copyright (c) 2012-2018 Yuuichi Akagawa</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Idea from LPK25 USB-MIDI to Serial MIDI converter</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * by Collin Cunningham - makezine.com, narbotic.com</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * for use with USB Host Shield 2.0 from Circuitsathome.com</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * https://github.com/felis/USB_Host_Shield_2.0</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"> * This program is free software; you can redistribute it and/or modify</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * the Free Software Foundation; either version 2 of the License, or</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * (at your option) any later version.</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="comment"> * This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> * along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> *******************************************************************************</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#if !defined(_USBH_MIDI_H_)</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#define _USBH_MIDI_H_</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="comment">//#define DEBUG_USB_HOST</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</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="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="usbh__midi_8h.html#a209d19007c615d3f300a5d3717776a45"> 32</a></span>&#160;<span class="preprocessor">#define MIDI_MAX_ENDPOINTS 5 //endpoint 0, bulk_IN(MIDI), bulk_OUT(MIDI), bulk_IN(VSP), bulk_OUT(VSP)</span></div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="usbh__midi_8h.html#a071b718fc63564ff2ae0b8b8d8e638fc"> 33</a></span>&#160;<span class="preprocessor">#define USB_SUBCLASS_MIDISTREAMING 3</span></div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="usbh__midi_8h.html#ad6a6e2474df4bc904baaea690d3d81ad"> 34</a></span>&#160;<span class="preprocessor">#define DESC_BUFF_SIZE 256</span></div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="usbh__midi_8h.html#a0cb5d0be715a42f36440b29eaa728c58"> 35</a></span>&#160;<span class="preprocessor">#define MIDI_EVENT_PACKET_SIZE 64</span></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="usbh__midi_8h.html#ac62d581ae088d3699a4f39672ac2ff51"> 36</a></span>&#160;<span class="preprocessor">#define MIDI_MAX_SYSEX_SIZE 256</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">class </span><a class="code" href="class_u_s_b_h___m_i_d_i.html">USBH_MIDI</a>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html"> 39</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_u_s_b_h___m_i_d_i.html">USBH_MIDI</a> : <span class="keyword">public</span> <a class="code" href="class_u_s_b_device_config.html">USBDeviceConfig</a></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;{</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#a08afe33201b6e679b1c2236da699126e"> 42</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a08afe33201b6e679b1c2236da699126e">epDataInIndex</a>; <span class="comment">// DataIn endpoint index(MIDI)</span></div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#a2a2e35a5ce5ffc8605837de2587db740"> 43</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a2a2e35a5ce5ffc8605837de2587db740">epDataOutIndex</a>; <span class="comment">// DataOUT endpoint index(MIDI)</span></div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#ac8b7d0994df1a059ccf6be62dd84cc9e"> 44</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#ac8b7d0994df1a059ccf6be62dd84cc9e">epDataInIndexVSP</a>; <span class="comment">// DataIn endpoint index(Vendor Specific Protocl)</span></div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#a42685ed17f731d3c8e3062d1e1b52f78"> 45</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a42685ed17f731d3c8e3062d1e1b52f78">epDataOutIndexVSP</a>; <span class="comment">// DataOUT endpoint index(Vendor Specific Protocl)</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="comment">/* mandatory members */</span></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#af0c14d1bc7f60e8191b07bcca0c20c84"> 48</a></span>&#160; <a class="code" href="class_u_s_b.html">USB</a> *<a class="code" href="class_u_s_b_h___m_i_d_i.html#af0c14d1bc7f60e8191b07bcca0c20c84">pUsb</a>;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#aef410de857fd657d467b0406d29f4aed"> 49</a></span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#aef410de857fd657d467b0406d29f4aed">bAddress</a>;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#a441bf3b7bcd3ad8ca4e18f68fd03404c"> 50</a></span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a441bf3b7bcd3ad8ca4e18f68fd03404c">bConfNum</a>; <span class="comment">// configuration number</span></div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#ab8b2dd096df7159ce8a09a19812307ca"> 51</a></span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#ab8b2dd096df7159ce8a09a19812307ca">bNumEP</a>; <span class="comment">// total number of EP in the configuration</span></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#a345bc9669e1627eae5d2663560813797"> 52</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_u_s_b_h___m_i_d_i.html#a345bc9669e1627eae5d2663560813797">bPollEnable</a>;</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#a59bedc39ad72d9a11ce040fda96e92ed"> 53</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_u_s_b_h___m_i_d_i.html#a59bedc39ad72d9a11ce040fda96e92ed">isMidiFound</a>;</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#aa578074365d77bb3e41063a18625dfe3"> 54</a></span>&#160; uint16_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#aaf7ec77f0d8cefff1316ae049747e2a7">pid</a>, <a class="code" href="class_u_s_b_h___m_i_d_i.html#aa578074365d77bb3e41063a18625dfe3">vid</a>; <span class="comment">// ProductID, VendorID</span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#a16cc26804628e2ea32513b4cce1aa7c3"> 55</a></span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a16cc26804628e2ea32513b4cce1aa7c3">bTransferTypeMask</a>;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="comment">/* Endpoint data structure */</span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#ac947c1e0feea5cc9387c35bbd9bde961"> 57</a></span>&#160; <a class="code" href="struct_ep_info.html">EpInfo</a> <a class="code" href="class_u_s_b_h___m_i_d_i.html#ac947c1e0feea5cc9387c35bbd9bde961">epInfo</a>[<a class="code" href="usbh__midi_8h.html#a209d19007c615d3f300a5d3717776a45">MIDI_MAX_ENDPOINTS</a>];</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="comment">/* MIDI Event packet buffer */</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#aa84131af42cd34c3d62763a7b3f07d2f"> 59</a></span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#aa84131af42cd34c3d62763a7b3f07d2f">recvBuf</a>[<a class="code" href="usbh__midi_8h.html#a0cb5d0be715a42f36440b29eaa728c58">MIDI_EVENT_PACKET_SIZE</a>];</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#aad25eeebfe8741afa7a242ec398c846e"> 60</a></span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#aad25eeebfe8741afa7a242ec398c846e">readPtr</a>;</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"> 62</span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#aabe63c64fbcee52e7c724d489cd19394">parseConfigDescr</a>(uint8_t addr, uint8_t conf);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; uint16_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#ab3b9ea78a331449802e4ce5a5a9c7f18">countSysExDataSize</a>(uint8_t *dataptr);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_u_s_b_h___m_i_d_i.html#aa9f6790ed10bec5fc5a9ebfc43dacfeb">setupDeviceSpecific</a>();</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="preprocessor">#ifdef DEBUG_USB_HOST</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</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="l00067"></a><span class="lineno"> 67</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <a class="code" href="class_u_s_b_h___m_i_d_i.html#a7dbec24b0f8fe85c713f3de55fba9f83">USBH_MIDI</a>(<a class="code" href="class_u_s_b.html">USB</a> *p);</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="comment">// Misc functions</span></div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#aeac79d834709ecc079551df2e16a7ffe"> 71</a></span>&#160; <span class="keyword">operator</span> bool() { <span class="keywordflow">return</span> (pUsb-&gt;<a class="code" href="class_u_s_b.html#a1c1aad8269403bf488e3bc4c79886ce4">getUsbTaskState</a>()==<a class="code" href="_usb_core_8h.html#a138c40c59f628eefbe273a8db0a96753">USB_STATE_RUNNING</a>); }</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#aa7d217e3479a9116f8f2ce90c1177317"> 72</a></span>&#160; uint16_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#aa7d217e3479a9116f8f2ce90c1177317">idVendor</a>() { <span class="keywordflow">return</span> <a class="code" href="class_u_s_b_h___m_i_d_i.html#aa578074365d77bb3e41063a18625dfe3">vid</a>; }</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#ac7b56c71f8424ec0175f390264776bdd"> 73</a></span>&#160; uint16_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#ac7b56c71f8424ec0175f390264776bdd">idProduct</a>() { <span class="keywordflow">return</span> <a class="code" href="class_u_s_b_h___m_i_d_i.html#aaf7ec77f0d8cefff1316ae049747e2a7">pid</a>; }</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="comment">// Methods for recieving and sending data</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#adb10f3867c2171603faa37af3e9fd210">RecvData</a>(uint16_t *bytes_rcvd, uint8_t *dataptr);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#adb10f3867c2171603faa37af3e9fd210">RecvData</a>(uint8_t *outBuf, <span class="keywordtype">bool</span> isRaw=<span class="keyword">false</span>);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#af9f74895deb356da3d1915d9eac24aca">RecvRawData</a>(uint8_t *outBuf);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a65fd836d11336cce737ec1bdb1d5d4f3">SendData</a>(uint8_t *dataptr, uint8_t nCable=0);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a8218ae22033b7d2120df75cfe696070e">lookupMsgSize</a>(uint8_t midiMsg, uint8_t cin=0);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#aa5506d9556605493d25492ab1f2fe2a8">SendSysEx</a>(uint8_t *dataptr, uint16_t datasize, uint8_t nCable=0);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#ab85f9e0da16ffe3ee9809aa27023c94c">extractSysExData</a>(uint8_t *p, uint8_t *buf);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a3005d70999cbf2339c55bcdd6fc77bff">SendRawData</a>(uint16_t bytes_send, uint8_t *dataptr);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">// backward compatibility functions</span></div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#a1f522c0aca86795e1bfb7575e1759338"> 84</a></span>&#160; <span class="keyword">inline</span> uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a1f522c0aca86795e1bfb7575e1759338">RcvData</a>(uint16_t *bytes_rcvd, uint8_t *dataptr) { <span class="keywordflow">return</span> <a class="code" href="class_u_s_b_h___m_i_d_i.html#adb10f3867c2171603faa37af3e9fd210">RecvData</a>(bytes_rcvd, dataptr); };</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#afa51b7a718728cdc4f25f9abec25be52"> 85</a></span>&#160; <span class="keyword">inline</span> uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#afa51b7a718728cdc4f25f9abec25be52">RcvData</a>(uint8_t *outBuf) { <span class="keywordflow">return</span> <a class="code" href="class_u_s_b_h___m_i_d_i.html#adb10f3867c2171603faa37af3e9fd210">RecvData</a>(outBuf); };</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; <span class="comment">// USBDeviceConfig implementation</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a9c8d149a823d2b8d1c3579f0f445cf19">Init</a>(uint8_t parent, uint8_t port, <span class="keywordtype">bool</span> lowspeed);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#a912c417424d6f21cf1afbf524c418eb5">Release</a>();</div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="class_u_s_b_h___m_i_d_i.html#ae3cf983bd74a2ec29fe9dee0f5f040d3"> 90</a></span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_u_s_b_h___m_i_d_i.html#ae3cf983bd74a2ec29fe9dee0f5f040d3">GetAddress</a>() { <span class="keywordflow">return</span> <a class="code" href="class_u_s_b_h___m_i_d_i.html#aef410de857fd657d467b0406d29f4aed">bAddress</a>; };</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;<span class="preprocessor">#endif //_USBH_MIDI_H_</span></div><div class="ttc" id="class_u_s_b_h___m_i_d_i_html_aa5506d9556605493d25492ab1f2fe2a8"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#aa5506d9556605493d25492ab1f2fe2a8">USBH_MIDI::SendSysEx</a></div><div class="ttdeci">uint8_t SendSysEx(uint8_t *dataptr, uint16_t datasize, uint8_t nCable=0)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00556">usbh_midi.cpp:556</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_ac8b7d0994df1a059ccf6be62dd84cc9e"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#ac8b7d0994df1a059ccf6be62dd84cc9e">USBH_MIDI::epDataInIndexVSP</a></div><div class="ttdeci">static const uint8_t epDataInIndexVSP</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00044">usbh_midi.h:44</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a16cc26804628e2ea32513b4cce1aa7c3"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a16cc26804628e2ea32513b4cce1aa7c3">USBH_MIDI::bTransferTypeMask</a></div><div class="ttdeci">uint8_t bTransferTypeMask</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00055">usbh_midi.h:55</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_aad25eeebfe8741afa7a242ec398c846e"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#aad25eeebfe8741afa7a242ec398c846e">USBH_MIDI::readPtr</a></div><div class="ttdeci">uint8_t readPtr</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00060">usbh_midi.h:60</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a1f522c0aca86795e1bfb7575e1759338"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a1f522c0aca86795e1bfb7575e1759338">USBH_MIDI::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="usbh__midi_8h_source.html#l00084">usbh_midi.h:84</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html">USBH_MIDI</a></div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00039">usbh_midi.h:39</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_adb10f3867c2171603faa37af3e9fd210"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#adb10f3867c2171603faa37af3e9fd210">USBH_MIDI::RecvData</a></div><div class="ttdeci">uint8_t RecvData(uint16_t *bytes_rcvd, uint8_t *dataptr)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00357">usbh_midi.cpp:357</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_h___m_i_d_i_html_aa578074365d77bb3e41063a18625dfe3"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#aa578074365d77bb3e41063a18625dfe3">USBH_MIDI::vid</a></div><div class="ttdeci">uint16_t vid</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00054">usbh_midi.h:54</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_ae3cf983bd74a2ec29fe9dee0f5f040d3"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#ae3cf983bd74a2ec29fe9dee0f5f040d3">USBH_MIDI::GetAddress</a></div><div class="ttdeci">virtual uint8_t GetAddress()</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00090">usbh_midi.h:90</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a9c8d149a823d2b8d1c3579f0f445cf19"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a9c8d149a823d2b8d1c3579f0f445cf19">USBH_MIDI::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="usbh__midi_8cpp_source.html#l00108">usbh_midi.cpp:108</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="_usb_8h_html"><div class="ttname"><a href="_usb_8h.html">Usb.h</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_af0c14d1bc7f60e8191b07bcca0c20c84"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#af0c14d1bc7f60e8191b07bcca0c20c84">USBH_MIDI::pUsb</a></div><div class="ttdeci">USB * pUsb</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00048">usbh_midi.h:48</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a3005d70999cbf2339c55bcdd6fc77bff"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a3005d70999cbf2339c55bcdd6fc77bff">USBH_MIDI::SendRawData</a></div><div class="ttdeci">uint8_t SendRawData(uint16_t bytes_send, uint8_t *dataptr)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00614">usbh_midi.cpp:614</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_ab3b9ea78a331449802e4ce5a5a9c7f18"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#ab3b9ea78a331449802e4ce5a5a9c7f18">USBH_MIDI::countSysExDataSize</a></div><div class="ttdeci">uint16_t countSysExDataSize(uint8_t *dataptr)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00532">usbh_midi.cpp:532</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a42685ed17f731d3c8e3062d1e1b52f78"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a42685ed17f731d3c8e3062d1e1b52f78">USBH_MIDI::epDataOutIndexVSP</a></div><div class="ttdeci">static const uint8_t epDataOutIndexVSP</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00045">usbh_midi.h:45</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_aa9f6790ed10bec5fc5a9ebfc43dacfeb"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#aa9f6790ed10bec5fc5a9ebfc43dacfeb">USBH_MIDI::setupDeviceSpecific</a></div><div class="ttdeci">void setupDeviceSpecific()</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00345">usbh_midi.cpp:345</a></div></div>
<div class="ttc" id="_usb_core_8h_html_a138c40c59f628eefbe273a8db0a96753"><div class="ttname"><a href="_usb_core_8h.html#a138c40c59f628eefbe273a8db0a96753">USB_STATE_RUNNING</a></div><div class="ttdeci">#define USB_STATE_RUNNING</div><div class="ttdef"><b>Definition:</b> <a href="_usb_core_8h_source.html#l00131">UsbCore.h:131</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_ab8b2dd096df7159ce8a09a19812307ca"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#ab8b2dd096df7159ce8a09a19812307ca">USBH_MIDI::bNumEP</a></div><div class="ttdeci">uint8_t bNumEP</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00051">usbh_midi.h:51</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_aef410de857fd657d467b0406d29f4aed"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#aef410de857fd657d467b0406d29f4aed">USBH_MIDI::bAddress</a></div><div class="ttdeci">uint8_t bAddress</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00049">usbh_midi.h:49</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_u_s_b_h___m_i_d_i_html_aaf7ec77f0d8cefff1316ae049747e2a7"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#aaf7ec77f0d8cefff1316ae049747e2a7">USBH_MIDI::pid</a></div><div class="ttdeci">uint16_t pid</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00054">usbh_midi.h:54</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a912c417424d6f21cf1afbf524c418eb5"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a912c417424d6f21cf1afbf524c418eb5">USBH_MIDI::Release</a></div><div class="ttdeci">virtual uint8_t Release()</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00334">usbh_midi.cpp:334</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_af9f74895deb356da3d1915d9eac24aca"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#af9f74895deb356da3d1915d9eac24aca">USBH_MIDI::RecvRawData</a></div><div class="ttdeci">uint8_t RecvRawData(uint8_t *outBuf)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00411">usbh_midi.cpp:411</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a59bedc39ad72d9a11ce040fda96e92ed"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a59bedc39ad72d9a11ce040fda96e92ed">USBH_MIDI::isMidiFound</a></div><div class="ttdeci">bool isMidiFound</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00053">usbh_midi.h:53</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a345bc9669e1627eae5d2663560813797"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a345bc9669e1627eae5d2663560813797">USBH_MIDI::bPollEnable</a></div><div class="ttdeci">bool bPollEnable</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00052">usbh_midi.h:52</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a7dbec24b0f8fe85c713f3de55fba9f83"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a7dbec24b0f8fe85c713f3de55fba9f83">USBH_MIDI::USBH_MIDI</a></div><div class="ttdeci">USBH_MIDI(USB *p)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00087">usbh_midi.cpp:87</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_ac7b56c71f8424ec0175f390264776bdd"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#ac7b56c71f8424ec0175f390264776bdd">USBH_MIDI::idProduct</a></div><div class="ttdeci">uint16_t idProduct()</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00073">usbh_midi.h:73</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a08afe33201b6e679b1c2236da699126e"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a08afe33201b6e679b1c2236da699126e">USBH_MIDI::epDataInIndex</a></div><div class="ttdeci">static const uint8_t epDataInIndex</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00042">usbh_midi.h:42</a></div></div>
<div class="ttc" id="usbh__midi_8h_html_a0cb5d0be715a42f36440b29eaa728c58"><div class="ttname"><a href="usbh__midi_8h.html#a0cb5d0be715a42f36440b29eaa728c58">MIDI_EVENT_PACKET_SIZE</a></div><div class="ttdeci">#define MIDI_EVENT_PACKET_SIZE</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00035">usbh_midi.h:35</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a8218ae22033b7d2120df75cfe696070e"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a8218ae22033b7d2120df75cfe696070e">USBH_MIDI::lookupMsgSize</a></div><div class="ttdeci">uint8_t lookupMsgSize(uint8_t midiMsg, uint8_t cin=0)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00481">usbh_midi.cpp:481</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_aa84131af42cd34c3d62763a7b3f07d2f"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#aa84131af42cd34c3d62763a7b3f07d2f">USBH_MIDI::recvBuf</a></div><div class="ttdeci">uint8_t recvBuf[MIDI_EVENT_PACKET_SIZE]</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00059">usbh_midi.h:59</a></div></div>
<div class="ttc" id="class_u_s_b_html_a1c1aad8269403bf488e3bc4c79886ce4"><div class="ttname"><a href="class_u_s_b.html#a1c1aad8269403bf488e3bc4c79886ce4">USB::getUsbTaskState</a></div><div class="ttdeci">uint8_t getUsbTaskState(void)</div><div class="ttdef"><b>Definition:</b> <a href="_usb_8cpp_source.html#l00036">Usb.cpp:36</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a441bf3b7bcd3ad8ca4e18f68fd03404c"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a441bf3b7bcd3ad8ca4e18f68fd03404c">USBH_MIDI::bConfNum</a></div><div class="ttdeci">uint8_t bConfNum</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00050">usbh_midi.h:50</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_ac947c1e0feea5cc9387c35bbd9bde961"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#ac947c1e0feea5cc9387c35bbd9bde961">USBH_MIDI::epInfo</a></div><div class="ttdeci">EpInfo epInfo[MIDI_MAX_ENDPOINTS]</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00057">usbh_midi.h:57</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_aa7d217e3479a9116f8f2ce90c1177317"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#aa7d217e3479a9116f8f2ce90c1177317">USBH_MIDI::idVendor</a></div><div class="ttdeci">uint16_t idVendor()</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00072">usbh_midi.h:72</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_afa51b7a718728cdc4f25f9abec25be52"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#afa51b7a718728cdc4f25f9abec25be52">USBH_MIDI::RcvData</a></div><div class="ttdeci">uint8_t RcvData(uint8_t *outBuf)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00085">usbh_midi.h:85</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_ab85f9e0da16ffe3ee9809aa27023c94c"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#ab85f9e0da16ffe3ee9809aa27023c94c">USBH_MIDI::extractSysExData</a></div><div class="ttdeci">uint8_t extractSysExData(uint8_t *p, uint8_t *buf)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00620">usbh_midi.cpp:620</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a65fd836d11336cce737ec1bdb1d5d4f3"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a65fd836d11336cce737ec1bdb1d5d4f3">USBH_MIDI::SendData</a></div><div class="ttdeci">uint8_t SendData(uint8_t *dataptr, uint8_t nCable=0)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00417">usbh_midi.cpp:417</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_a2a2e35a5ce5ffc8605837de2587db740"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#a2a2e35a5ce5ffc8605837de2587db740">USBH_MIDI::epDataOutIndex</a></div><div class="ttdeci">static const uint8_t epDataOutIndex</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00043">usbh_midi.h:43</a></div></div>
<div class="ttc" id="usbh__midi_8h_html_a209d19007c615d3f300a5d3717776a45"><div class="ttname"><a href="usbh__midi_8h.html#a209d19007c615d3f300a5d3717776a45">MIDI_MAX_ENDPOINTS</a></div><div class="ttdeci">#define MIDI_MAX_ENDPOINTS</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8h_source.html#l00032">usbh_midi.h:32</a></div></div>
<div class="ttc" id="class_u_s_b_h___m_i_d_i_html_aabe63c64fbcee52e7c724d489cd19394"><div class="ttname"><a href="class_u_s_b_h___m_i_d_i.html#aabe63c64fbcee52e7c724d489cd19394">USBH_MIDI::parseConfigDescr</a></div><div class="ttdeci">uint8_t parseConfigDescr(uint8_t addr, uint8_t conf)</div><div class="ttdef"><b>Definition:</b> <a href="usbh__midi_8cpp_source.html#l00253">usbh_midi.cpp:253</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><!-- 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>