USB_Host_Shield_2.0/masstorage_8h_source.html
2013-06-27 20:03:16 +02:00

407 lines
73 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.4"/>
<title>USB Host Shield 2.0: masstorage.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.4 -->
<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">masstorage.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="masstorage_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="preprocessor">#if !defined(__MASSTORAGE_H__)</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define __MASSTORAGE_H__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;</div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">//&lt;RANT&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">// @Oleg -- Perhaps we need a central &#39;config.h&#39;, many of these includes and</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">// defines could be handled there, allowing for easier config.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;</div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; IMPORTANT &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// Set this to 1 to support single LUN devices, and save RAM. -- I.E. thumb drives.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// Each LUN needs ~13 bytes to be able to track the state of each unit.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a68a8c3241954d2159ff8df696dd5cff6"> 12</a></span>&#160;<span class="preprocessor">#define MASS_MAX_SUPPORTED_LUN 8</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#include &lt;inttypes.h&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="avrpins_8h.html">avrpins.h</a>&quot;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#include &lt;avr/pgmspace.h&gt;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="max3421e_8h.html">max3421e.h</a>&quot;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="usbhost_8h.html">usbhost.h</a>&quot;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="usb__ch9_8h.html">usb_ch9.h</a>&quot;</span></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;<span class="preprocessor">#include &lt;<a class="code" href="message_8h.html">message.h</a>&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#if defined(ARDUINO) &amp;&amp; ARDUINO &gt;=100</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include &quot;Arduino.h&quot;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="confdescparser_8h.html">confdescparser.h</a>&gt;</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"> 31</span>&#160;<span class="comment">// &lt;/RANT&gt;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="code" href="masstorage_8h.html#aac9153aee4bdb92701df902e06a74eb3"> 34</a></span>&#160;<span class="preprocessor">#define SWAP(a, b) (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a86a509a216410b0e356f0fa91c48cdc0"> 36</a></span>&#160;<span class="preprocessor">#define bmREQ_MASSOUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="code" href="masstorage_8h.html#affadc780007914e4b4de088b4df8ddf6"> 37</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define bmREQ_MASSIN USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment">// Mass Storage Subclass Constants</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a9564704f249ab75db55a303f331fbedc"> 40</a></span>&#160;<span class="preprocessor">#define MASS_SUBCLASS_SCSI_NOT_REPORTED 0x00 // De facto use</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a0abf867686c58deb8a409bf82941e125"> 41</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_SUBCLASS_RBC 0x01</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a370a8e5d533df93f23e122dea2468ecb"> 42</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_SUBCLASS_ATAPI 0x02 // MMC-5 (ATAPI)</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a5b4847f36fec399d12580113ab50e293"> 43</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_SUBCLASS_OBSOLETE1 0x03 // Was QIC-157</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="code" href="masstorage_8h.html#acbb017bda59fefb8bd39f9ea6f11b8ac"> 44</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_SUBCLASS_UFI 0x04 // Specifies how to interface Floppy Disk Drives to USB</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a54a77ed01b69a7b2d8acbf70ba3ff018"> 45</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_SUBCLASS_OBSOLETE2 0x05 // Was SFF-8070i</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="code" href="masstorage_8h.html#aaf635eb9151eb63855fe227584bb00eb"> 46</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_SUBCLASS_SCSI 0x06 // SCSI Transparent Command Set</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a9dba9091cf98b47104ccb400482a46ab"> 47</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_SUBCLASS_LSDFS 0x07 // Specifies how host has to negotiate access before trying SCSI</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="code" href="masstorage_8h.html#aeac7060fd6a1fba50872ffb0c9dcba32"> 48</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_SUBCLASS_IEEE1667 0x08</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment">// Mass Storage Class Protocols</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a64c21e402034e68542f25358c7978a67"> 51</a></span>&#160;<span class="preprocessor">#define MASS_PROTO_CBI 0x00 // CBI (with command completion interrupt)</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a5930934a4ce762f4cb9666d8f95ddee9"> 52</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_PROTO_CBI_NO_INT 0x01 // CBI (without command completion interrupt)</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a3a6df686184b5c83eeee1f3a23f3e187"> 53</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_PROTO_OBSOLETE 0x02</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a17a026f7d64e8daf27b45c295755fdf0"> 54</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_PROTO_BBB 0x50 // Bulk Only Transport</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a32a5145018b9953b26a0c47a3e55f1ea"> 55</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_PROTO_UAS 0x62</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="comment">// Request Codes</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a667c00401398c62b8e7edf729d944d78"> 58</a></span>&#160;<span class="preprocessor">#define MASS_REQ_ADSC 0x00</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a42e56089ee1706ec829f8cebb224b1dc"> 59</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_REQ_GET 0xFC</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="code" href="masstorage_8h.html#afe9a90b1dd89a2b1c12eb9b844d6120d"> 60</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_REQ_PUT 0xFD</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a3fc37932ad8bcc25c185fb1efbc099b8"> 61</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_REQ_GET_MAX_LUN 0xFE</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a172c269d960fa57ce6dfeaacc6f6197f"> 62</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_REQ_BOMSR 0xFF // Bulk-Only Mass Storage Reset</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a439c9558fff25c40219c0f20244e666d"> 64</a></span>&#160;<span class="preprocessor">#define MASS_CBW_SIGNATURE 0x43425355</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="code" href="masstorage_8h.html#af92587f54f4d56af3dd2fb3a474c0b33"> 65</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_CSW_SIGNATURE 0x53425355</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ad74d783991b5eea6ad8ef2feb2ce03ea"> 67</a></span>&#160;<span class="preprocessor">#define MASS_CMD_DIR_OUT (0 &lt;&lt; 7)</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a012ee34e4ce8d644c2f75099867b26c0"> 68</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_CMD_DIR_IN (1 &lt;&lt; 7)</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ac1f82346efef75cf197abb8e29cc5f44"> 70</a></span>&#160;<span class="preprocessor">#define SCSI_CMD_INQUIRY 0x12</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a8ef3d9a42b0b1d5b0218720236e148c4"> 71</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_REPORT_LUNS 0xA0</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ad0ffafc58d70417e80425b2ee80c1769"> 72</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_REQUEST_SENSE 0x03</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ac436d150389d8a97693e63041f440d82"> 73</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_FORMAT_UNIT 0x04</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="code" href="masstorage_8h.html#af3f8eee2dcef5f8a49602fbedad6c7cd"> 74</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_READ_6 0x08</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ad3900f141fb70afb8def054384805a2e"> 75</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_READ_10 0x28</span></div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a1f08c7a277432486b2f875035df6790b"> 76</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_READ_CAPACITY_10 0x25</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="code" href="masstorage_8h.html#aa84c8ac327fad55b9d0e40fea9eda699"> 77</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_TEST_UNIT_READY 0x00</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="code" href="masstorage_8h.html#aea0f916f6039e8c8a3d614a3f9f70072"> 78</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_WRITE_6 0x0A</span></div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ad1733ce8730cdaab39b9b868b73128a0"> 79</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_WRITE_10 0x2A</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ab6164a7d5f81211ce8d98b6a731b4f69"> 80</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_MODE_SENSE_6 0x1A</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a95f71a5e11726543881ca39a47563daa"> 81</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_MODE_SENSE_10 0x5A</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a17b47e6ce4b10688ac30666c16b14d86"> 82</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_START_STOP_UNIT 0x1B</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ac6435ab2e468a79816db996b0a16c024"> 83</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_CMD_PREVENT_REMOVAL 0x1E</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a613422ba27c89fe5d72d06d216c9f2a5"> 84</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_S_NOT_READY 0x02</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a2f2fcd62d5fea0322095b2c4c9d2dd91"> 85</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_S_MEDIUM_ERROR 0x03</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a3f36c4b24d404a7bde02e6bf3f87a0cd"> 86</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_S_ILLEGAL_REQUEST 0x05</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ae7ab5840b35001bba68d7adae4abcd11"> 87</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_S_UNIT_ATTENTION 0x06</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ac0c79fb555815317d46e9af6192d959d"> 89</a></span>&#160;<span class="preprocessor">#define SCSI_ASC_MEDIUM_NOT_PRESENT 0x3A</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ac6d64023e2b8137eed90917f362ab262"> 90</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_ASC_LBA_OUT_OF_RANGE 0x21</span></div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a9fd5f74b6bac6c95990f5f211c04894b"> 91</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define SCSI_ASC_MEDIA_CHANGED 0x28</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a450c2a67aa2b6a1f6593113dcb847569"> 93</a></span>&#160;<span class="preprocessor">#define MASS_ERR_SUCCESS 0x00</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="code" href="masstorage_8h.html#afe7b492eca9349e54443c5c08f77b238"> 94</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_PHASE_ERROR 0x02</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a128e4910df8d7770c6f9af7700b9ccb1"> 95</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_UNIT_NOT_READY 0x03</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ab8e02094ea448728c4229e348c90cc54"> 96</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_UNIT_BUSY 0x04</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a13aee9eab965d570a4a00463cd20ca29"> 97</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_STALL 0x05</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ac3364cf841936aa8c3107e14c06ff65f"> 98</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_CMD_NOT_SUPPORTED 0x06</span></div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a8521fd3c4b7901296d3edae0632c162d"> 99</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_INVALID_CSW 0x07</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="code" href="masstorage_8h.html#aec47def0928045fdca474d78db866c39"> 100</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_NO_MEDIA 0x08</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a57edffb4395696374818f80202aedca4"> 101</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_BAD_LBA 0x09</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a6ddc06e45101114eb7842a7ee57f7d43"> 102</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_MEDIA_CHANGED 0x0A</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a75359f810ebeccd313e4ad9c3a88f231"> 103</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_DEVICE_DISCONNECTED 0x11</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a33f8a926c98ea3a3b7aea4006069a251"> 104</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_UNABLE_TO_RECOVER 0x12 // Reset recovery error</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a5341c969f1daf8a9e8d345c0ba36fa54"> 105</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_INVALID_LUN 0x13</span></div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a1b4efb4cfc2b0d4a912abe587a145b84"> 106</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_WRITE_STALL 0x14</span></div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a4da4bdba7c86bcd6d0a97883de976b74"> 107</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_READ_NAKS 0x15</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a607fa695e441ced8955a48455cd7259d"> 108</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_WRITE_NAKS 0x16</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ac8c588cb96077b615de2bd53f77d4c15"> 109</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_WRITE_PROTECTED 0x17</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a2815b1980ee4f05d2712a6492b5272b3"> 110</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_GENERAL_SCSI_ERROR 0xFE</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a6c2dcf2fe5e2bead7ce82793de900eaf"> 111</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_GENERAL_USB_ERROR 0xFF</span></div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ac6e389db899b3083f85ad02f5b4f9711"> 112</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_ERR_USER 0xA0 // For subclasses to define their own error codes</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a597e2a0f4ee36172c260976af9805415"> 114</a></span>&#160;<span class="preprocessor">#define MASS_TRANS_FLG_CALLBACK 0x01 // Callback is involved</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="code" href="masstorage_8h.html#aa230fd8de3da0bcfbd1627e9177de452"> 115</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_TRANS_FLG_NO_STALL_CHECK 0x02 // STALL condition is not checked</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="code" href="masstorage_8h.html#a473b3774eb9f7df7f20f676f55deb47e"> 116</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MASS_TRANS_FLG_NO_PHASE_CHECK 0x04 // PHASE_ERROR is not checked</span></div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="code" href="masstorage_8h.html#ab4baa1ea500923e1fc59e5991f05fe99"> 118</a></span>&#160;<span class="preprocessor">#define MASS_MAX_ENDPOINTS 3</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="code" href="struct_capacity.html"> 120</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_capacity.html">Capacity</a> {</div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="code" href="struct_capacity.html#ae6dd521cd2ece3d6fa6fe58180fb9e8a"> 121</a></span>&#160; uint8_t <a class="code" href="struct_capacity.html#ae6dd521cd2ece3d6fa6fe58180fb9e8a">data</a>[8];</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="comment">//uint32_t dwBlockAddress;</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <span class="comment">//uint32_t dwBlockLength;</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;} __attribute__((packed));</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;</div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html"> 126</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_inquiry_response.html">InquiryResponse</a> {</div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#abc2af027a176dc85d4e83f14eec7972e"> 127</a></span>&#160; uint8_t <a class="code" href="struct_inquiry_response.html#abc2af027a176dc85d4e83f14eec7972e">DeviceType</a> : 5;</div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#a8e8f2cb6b5a0d1ed2c300155bf2b3faa"> 128</a></span>&#160; uint8_t <a class="code" href="struct_inquiry_response.html#a8e8f2cb6b5a0d1ed2c300155bf2b3faa">PeripheralQualifier</a> : 3;</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#abb4a48d4fc326ad932fb41c82fe289f3"> 130</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#abb4a48d4fc326ad932fb41c82fe289f3">Reserved</a> : 7;</div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#ab6572ef8e5cd457e0699095f6a0c7a3d"> 131</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#ab6572ef8e5cd457e0699095f6a0c7a3d">Removable</a> : 1;</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"><a class="code" href="struct_inquiry_response.html#a86832a5def98c1e21447497177a8cc3a"> 133</a></span>&#160; uint8_t <a class="code" href="struct_inquiry_response.html#a86832a5def98c1e21447497177a8cc3a">Version</a>;</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#a801e10546dedbd134568bef84f1b287a"> 135</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#a801e10546dedbd134568bef84f1b287a">ResponseDataFormat</a> : 4;</div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#abe5677b01f709411d446dfa6246ca110"> 136</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#abe5677b01f709411d446dfa6246ca110">Reserved2</a> : 1;</div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#a02cb9a4f4f1a080853eeb3fe3a97b6fe"> 137</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#a02cb9a4f4f1a080853eeb3fe3a97b6fe">NormACA</a> : 1;</div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#add4ccc2e5f626d29a24e5f38149a2e76"> 138</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#add4ccc2e5f626d29a24e5f38149a2e76">TrmTsk</a> : 1;</div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#ad02da835cba8057f07b359903ee0c389"> 139</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#ad02da835cba8057f07b359903ee0c389">AERC</a> : 1;</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"><a class="code" href="struct_inquiry_response.html#abf1bb662cae5c4d2c2e4dbb454f92e91"> 141</a></span>&#160; uint8_t <a class="code" href="struct_inquiry_response.html#abf1bb662cae5c4d2c2e4dbb454f92e91">AdditionalLength</a>;</div>
<div class="line"><a name="l00142"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#a3ee7e8654e1216110896e27c97125923"> 142</a></span>&#160; uint8_t <a class="code" href="struct_inquiry_response.html#a3ee7e8654e1216110896e27c97125923">Reserved3</a>[2];</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#ac912c8788475256de0bb7139e4a9f069"> 144</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#ac912c8788475256de0bb7139e4a9f069">SoftReset</a> : 1;</div>
<div class="line"><a name="l00145"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#a335e2997167a36347d717e1ed997f9be"> 145</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#a335e2997167a36347d717e1ed997f9be">CmdQue</a> : 1;</div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#ae5c315ca0c47104b17d5bde7c4d485a6"> 146</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#ae5c315ca0c47104b17d5bde7c4d485a6">Reserved4</a> : 1;</div>
<div class="line"><a name="l00147"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#ac0ee71a9c07b0c1fd9ff09461a81fa0e"> 147</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#ac0ee71a9c07b0c1fd9ff09461a81fa0e">Linked</a> : 1;</div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#ac70c33310966b01936cd0c3ab7477c83"> 148</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#ac70c33310966b01936cd0c3ab7477c83">Sync</a> : 1;</div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#a39a63fd0fd92c50370af9aefe93c13cf"> 149</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#a39a63fd0fd92c50370af9aefe93c13cf">WideBus16Bit</a> : 1;</div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#a78c6cf3387430de8176b006c4915be63"> 150</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#a78c6cf3387430de8176b006c4915be63">WideBus32Bit</a> : 1;</div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#a64121510090cb38926bbb321e98b1a13"> 151</a></span>&#160; <span class="keywordtype">unsigned</span> <a class="code" href="struct_inquiry_response.html#a64121510090cb38926bbb321e98b1a13">RelAddr</a> : 1;</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"><a class="code" href="struct_inquiry_response.html#acc610ff84bef225f8826585725ad9802"> 153</a></span>&#160; uint8_t <a class="code" href="struct_inquiry_response.html#acc610ff84bef225f8826585725ad9802">VendorID</a>[8];</div>
<div class="line"><a name="l00154"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#a02c12d5c3f7b9e821c6f28dc827f5629"> 154</a></span>&#160; uint8_t <a class="code" href="struct_inquiry_response.html#a02c12d5c3f7b9e821c6f28dc827f5629">ProductID</a>[16];</div>
<div class="line"><a name="l00155"></a><span class="lineno"><a class="code" href="struct_inquiry_response.html#a23775c8cb582ae07c78449dc1a08c23e"> 155</a></span>&#160; uint8_t <a class="code" href="struct_inquiry_response.html#a23775c8cb582ae07c78449dc1a08c23e">RevisionID</a>[4];</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;} __attribute__((packed));</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div>
<div class="line"><a name="l00158"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper_base.html"> 158</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_command_block_wrapper_base.html">CommandBlockWrapperBase</a> {</div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper_base.html#a133ffc8ac9be6ce284f10efece567748"> 159</a></span>&#160; uint32_t <a class="code" href="struct_command_block_wrapper_base.html#a133ffc8ac9be6ce284f10efece567748">dCBWSignature</a>;</div>
<div class="line"><a name="l00160"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper_base.html#a0898a332eec2d598b80a896ff66d5549"> 160</a></span>&#160; uint32_t <a class="code" href="struct_command_block_wrapper_base.html#a0898a332eec2d598b80a896ff66d5549">dCBWTag</a>;</div>
<div class="line"><a name="l00161"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper_base.html#a62c537797107ada830b86e1f2d629164"> 161</a></span>&#160; uint32_t <a class="code" href="struct_command_block_wrapper_base.html#a62c537797107ada830b86e1f2d629164">dCBWDataTransferLength</a>;</div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper_base.html#a396b36ceef993c32f28b1354727a5e9e"> 162</a></span>&#160; uint8_t <a class="code" href="struct_command_block_wrapper_base.html#a396b36ceef993c32f28b1354727a5e9e">bmCBWFlags</a>;</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;} __attribute__((packed));</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;</div>
<div class="line"><a name="l00165"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper.html"> 165</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_command_block_wrapper.html">CommandBlockWrapper</a> : <span class="keyword">public</span> <a class="code" href="struct_command_block_wrapper_base.html">CommandBlockWrapperBase</a> {</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper.html#a2a16bb9a98e3ee4eaac8fea6310b4e01"> 168</a></span>&#160; uint8_t <a class="code" href="struct_command_block_wrapper.html#a2a16bb9a98e3ee4eaac8fea6310b4e01">bmCBWLUN</a> : 4;</div>
<div class="line"><a name="l00169"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper.html#a4954eacb2cd6d0ee7be475da3b46d907"> 169</a></span>&#160; uint8_t <a class="code" href="struct_command_block_wrapper.html#a4954eacb2cd6d0ee7be475da3b46d907">bmReserved1</a> : 4;</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; };</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper.html#a069c89f584abbf45c13ebb85ca906494"> 173</a></span>&#160; uint8_t <a class="code" href="struct_command_block_wrapper.html#a069c89f584abbf45c13ebb85ca906494">bmCBWCBLength</a> : 4;</div>
<div class="line"><a name="l00174"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper.html#ac651509a5fc7789ba59d21fe94c55e77"> 174</a></span>&#160; uint8_t <a class="code" href="struct_command_block_wrapper.html#ac651509a5fc7789ba59d21fe94c55e77">bmReserved2</a> : 4;</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; };</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="code" href="struct_command_block_wrapper.html#a2f5feafb5e1c993454c1ccd14a17965a"> 177</a></span>&#160; uint8_t <a class="code" href="struct_command_block_wrapper.html#a2f5feafb5e1c993454c1ccd14a17965a">CBWCB</a>[16];</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;} __attribute__((packed));</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;</div>
<div class="line"><a name="l00180"></a><span class="lineno"><a class="code" href="struct_command_status_wrapper.html"> 180</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_command_status_wrapper.html">CommandStatusWrapper</a> {</div>
<div class="line"><a name="l00181"></a><span class="lineno"><a class="code" href="struct_command_status_wrapper.html#a498a87759e737395829b6ff4b6420ad1"> 181</a></span>&#160; uint32_t <a class="code" href="struct_command_status_wrapper.html#a498a87759e737395829b6ff4b6420ad1">dCSWSignature</a>;</div>
<div class="line"><a name="l00182"></a><span class="lineno"><a class="code" href="struct_command_status_wrapper.html#af872c29cfee3fb74e7ad9471ee4461fb"> 182</a></span>&#160; uint32_t <a class="code" href="struct_command_status_wrapper.html#af872c29cfee3fb74e7ad9471ee4461fb">dCSWTag</a>;</div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="code" href="struct_command_status_wrapper.html#adf944665d28bb394a3d9756e8418d09e"> 183</a></span>&#160; uint32_t <a class="code" href="struct_command_status_wrapper.html#adf944665d28bb394a3d9756e8418d09e">dCSWDataResidue</a>;</div>
<div class="line"><a name="l00184"></a><span class="lineno"><a class="code" href="struct_command_status_wrapper.html#a7170ed5bc0e2bbe04758e687beef4487"> 184</a></span>&#160; uint8_t <a class="code" href="struct_command_status_wrapper.html#a7170ed5bc0e2bbe04758e687beef4487">bCSWStatus</a>;</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;} __attribute__((packed));</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;</div>
<div class="line"><a name="l00187"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html"> 187</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_request_sense_responce.html">RequestSenseResponce</a> {</div>
<div class="line"><a name="l00188"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#a7db2938d24b431077a52edd1b8c48557"> 188</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#a7db2938d24b431077a52edd1b8c48557">bResponseCode</a>;</div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#a243e278d4598f7524e2fd48a45269af8"> 189</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#a243e278d4598f7524e2fd48a45269af8">bSegmentNumber</a>;</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;</div>
<div class="line"><a name="l00191"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#affd71e9a5912c4752adb0cb108cf4118"> 191</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#affd71e9a5912c4752adb0cb108cf4118">bmSenseKey</a> : 4;</div>
<div class="line"><a name="l00192"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#ae2d8ba719fa3365271924facb832b6d5"> 192</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#ae2d8ba719fa3365271924facb832b6d5">bmReserved</a> : 1;</div>
<div class="line"><a name="l00193"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#ae14c0df03bdb15da04b4db655a5a9b66"> 193</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#ae14c0df03bdb15da04b4db655a5a9b66">bmILI</a> : 1;</div>
<div class="line"><a name="l00194"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#a72c82a54965c687da13f217753f18f7d"> 194</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#a72c82a54965c687da13f217753f18f7d">bmEOM</a> : 1;</div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#a7255f887c70660d714500b4131f7ab23"> 195</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#a7255f887c70660d714500b4131f7ab23">bmFileMark</a> : 1;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;</div>
<div class="line"><a name="l00197"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#a4342aa28405753a185d867060fec931e"> 197</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#a4342aa28405753a185d867060fec931e">Information</a>[4];</div>
<div class="line"><a name="l00198"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#adbc6f965fe2820222504d1e8853f1518"> 198</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#adbc6f965fe2820222504d1e8853f1518">bAdditionalLength</a>;</div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#ab2f0cab24692ca29dffc231f31198726"> 199</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#ab2f0cab24692ca29dffc231f31198726">CmdSpecificInformation</a>[4];</div>
<div class="line"><a name="l00200"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#a554063acfa94e465da27a7dc73cf786a"> 200</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#a554063acfa94e465da27a7dc73cf786a">bAdditionalSenseCode</a>;</div>
<div class="line"><a name="l00201"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#a628379310065c48e738bd07037b329e6"> 201</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#a628379310065c48e738bd07037b329e6">bAdditionalSenseQualifier</a>;</div>
<div class="line"><a name="l00202"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#ada14013a7a12b33b5d1ed747a48d5fe0"> 202</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#ada14013a7a12b33b5d1ed747a48d5fe0">bFieldReplaceableUnitCode</a>;</div>
<div class="line"><a name="l00203"></a><span class="lineno"><a class="code" href="struct_request_sense_responce.html#a61d034714befc2fa0fb7dcea30942324"> 203</a></span>&#160; uint8_t <a class="code" href="struct_request_sense_responce.html#a61d034714befc2fa0fb7dcea30942324">SenseKeySpecific</a>[3];</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;} __attribute__((packed));</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;</div>
<div class="line"><a name="l00206"></a><span class="lineno"><a class="code" href="class_bulk_only.html"> 206</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_bulk_only.html">BulkOnly</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="l00207"></a><span class="lineno"> 207</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00208"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a9e487226408578a2971570bcf7de62fe"> 208</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_bulk_only.html#a9e487226408578a2971570bcf7de62fe">epDataInIndex</a>; <span class="comment">// DataIn endpoint index</span></div>
<div class="line"><a name="l00209"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a8d527bdc285870f3571481a4fd982721"> 209</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_bulk_only.html#a8d527bdc285870f3571481a4fd982721">epDataOutIndex</a>; <span class="comment">// DataOUT endpoint index</span></div>
<div class="line"><a name="l00210"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a03cd96b415990821bdce43b4004c85e4"> 210</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_bulk_only.html#a03cd96b415990821bdce43b4004c85e4">epInterruptInIndex</a>; <span class="comment">// InterruptIN endpoint index</span></div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;</div>
<div class="line"><a name="l00212"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a6b4ae384eea3aacd8bf916439621973a"> 212</a></span>&#160; <a class="code" href="class_u_s_b.html">USB</a> *<a class="code" href="class_bulk_only.html#a6b4ae384eea3aacd8bf916439621973a">pUsb</a>;</div>
<div class="line"><a name="l00213"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a9968a2119df66fa0093b020e318d8ac6"> 213</a></span>&#160; uint8_t <a class="code" href="class_bulk_only.html#a9968a2119df66fa0093b020e318d8ac6">bAddress</a>;</div>
<div class="line"><a name="l00214"></a><span class="lineno"><a class="code" href="class_bulk_only.html#ab54f472ec9cd39abdb9f90867943d162"> 214</a></span>&#160; uint8_t <a class="code" href="class_bulk_only.html#ab54f472ec9cd39abdb9f90867943d162">bConfNum</a>; <span class="comment">// configuration number</span></div>
<div class="line"><a name="l00215"></a><span class="lineno"><a class="code" href="class_bulk_only.html#ac18ad598cd9a1ee99f49d51a572a50a4"> 215</a></span>&#160; uint8_t <a class="code" href="class_bulk_only.html#ac18ad598cd9a1ee99f49d51a572a50a4">bIface</a>; <span class="comment">// interface value</span></div>
<div class="line"><a name="l00216"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a6cb56ebd0307845321340919e2b35952"> 216</a></span>&#160; uint8_t <a class="code" href="class_bulk_only.html#a6cb56ebd0307845321340919e2b35952">bNumEP</a>; <span class="comment">// total number of EP in the configuration</span></div>
<div class="line"><a name="l00217"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a2d422ee0745cd7c04afff905278c4233"> 217</a></span>&#160; uint32_t <a class="code" href="class_bulk_only.html#a2d422ee0745cd7c04afff905278c4233">qNextPollTime</a>; <span class="comment">// next poll time</span></div>
<div class="line"><a name="l00218"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a21961ad1130480f534ef3e91f24c56a0"> 218</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_bulk_only.html#a21961ad1130480f534ef3e91f24c56a0">bPollEnable</a>; <span class="comment">// poll enable flag</span></div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;</div>
<div class="line"><a name="l00220"></a><span class="lineno"><a class="code" href="class_bulk_only.html#aee2247fd0a251e4da36e8c09bbe6917f"> 220</a></span>&#160; <a class="code" href="struct_ep_info.html">EpInfo</a> <a class="code" href="class_bulk_only.html#aee2247fd0a251e4da36e8c09bbe6917f">epInfo</a>[<a class="code" href="masstorage_8h.html#ab4baa1ea500923e1fc59e5991f05fe99">MASS_MAX_ENDPOINTS</a>];</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160;</div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a7ae682d50badd1386a06f30f35a32d1d"> 222</a></span>&#160; uint32_t <a class="code" href="class_bulk_only.html#a7ae682d50badd1386a06f30f35a32d1d">dCBWTag</a>; <span class="comment">// Tag</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a7b90227b0707d19385b9fa2fae85e184"> 223</a></span>&#160; uint32_t <a class="code" href="class_bulk_only.html#a7b90227b0707d19385b9fa2fae85e184">dCBWDataTransferLength</a>; <span class="comment">// Data Transfer Length</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a20ff3cc4bb15c557f57a8c6200b412d1"> 224</a></span>&#160; uint8_t <a class="code" href="class_bulk_only.html#a20ff3cc4bb15c557f57a8c6200b412d1">bLastUsbError</a>; <span class="comment">// Last USB error</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a6bbdd41bf6efc4060f3c36da7d6ed8b2"> 225</a></span>&#160; uint8_t <a class="code" href="class_bulk_only.html#a6bbdd41bf6efc4060f3c36da7d6ed8b2">bMaxLUN</a>; <span class="comment">// Max LUN</span></div>
<div class="line"><a name="l00226"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a24c051d401f5f1a9ce65c1bc25ab02dd"> 226</a></span>&#160; uint8_t <a class="code" href="class_bulk_only.html#a24c051d401f5f1a9ce65c1bc25ab02dd">bTheLUN</a>; <span class="comment">// Active LUN</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a73c3f6b8f6f79ad60e5ba05e560b277d"> 227</a></span>&#160; uint32_t <a class="code" href="class_bulk_only.html#a73c3f6b8f6f79ad60e5ba05e560b277d">CurrentCapacity</a>[<a class="code" href="masstorage_8h.html#a68a8c3241954d2159ff8df696dd5cff6">MASS_MAX_SUPPORTED_LUN</a>]; <span class="comment">// Total sectors</span></div>
<div class="line"><a name="l00228"></a><span class="lineno"><a class="code" href="class_bulk_only.html#aa4e2711c6279d48c63e82a63ad458421"> 228</a></span>&#160; uint16_t <a class="code" href="class_bulk_only.html#aa4e2711c6279d48c63e82a63ad458421">CurrentSectorSize</a>[<a class="code" href="masstorage_8h.html#a68a8c3241954d2159ff8df696dd5cff6">MASS_MAX_SUPPORTED_LUN</a>]; <span class="comment">// Sector size, clipped to 16 bits</span></div>
<div class="line"><a name="l00229"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a9f9d9b0925a2cb6b2fb8b10e4d581d28"> 229</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_bulk_only.html#a9f9d9b0925a2cb6b2fb8b10e4d581d28">LUNOk</a>[<a class="code" href="masstorage_8h.html#a68a8c3241954d2159ff8df696dd5cff6">MASS_MAX_SUPPORTED_LUN</a>]; <span class="comment">// use this to check for media changes.</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"><a class="code" href="class_bulk_only.html#af763ffffdd131949322d583fb4cd2737"> 230</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_bulk_only.html#af763ffffdd131949322d583fb4cd2737">WriteOk</a>[<a class="code" href="masstorage_8h.html#a68a8c3241954d2159ff8df696dd5cff6">MASS_MAX_SUPPORTED_LUN</a>];</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="keywordtype">void</span> <a class="code" href="class_bulk_only.html#ac8a1d7b2ef82d9f6da44928c78039964">PrintEndpointDescriptor</a>(<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="l00232"></a><span class="lineno"> 232</span>&#160;</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160;</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="comment">// Additional Initialization Method for Subclasses</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160;</div>
<div class="line"><a name="l00236"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a3d253a0bc8f1ac5b7fe1c9e7078691e3"> 236</a></span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_bulk_only.html#a3d253a0bc8f1ac5b7fe1c9e7078691e3">OnInit</a>() {</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; };</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <a class="code" href="class_bulk_only.html#a530fb250b0a0c92b48bc57e2957ace25">BulkOnly</a>(<a class="code" href="class_u_s_b.html">USB</a> *p);</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;</div>
<div class="line"><a name="l00242"></a><span class="lineno"><a class="code" href="class_bulk_only.html#abe1e768a46e751e6792164334c973b44"> 242</a></span>&#160; uint8_t <a class="code" href="class_bulk_only.html#abe1e768a46e751e6792164334c973b44">GetLastUsbError</a>() {</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <span class="keywordflow">return</span> <a class="code" href="class_bulk_only.html#a20ff3cc4bb15c557f57a8c6200b412d1">bLastUsbError</a>;</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; };</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;</div>
<div class="line"><a name="l00246"></a><span class="lineno"><a class="code" href="class_bulk_only.html#af4779aa3a30058dd15eb6e612d6761af"> 246</a></span>&#160; uint8_t <a class="code" href="class_bulk_only.html#af4779aa3a30058dd15eb6e612d6761af">GetbMaxLUN</a>() {</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; <span class="keywordflow">return</span> <a class="code" href="class_bulk_only.html#a6bbdd41bf6efc4060f3c36da7d6ed8b2">bMaxLUN</a>; <span class="comment">// Max LUN</span></div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; }</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160;</div>
<div class="line"><a name="l00250"></a><span class="lineno"><a class="code" href="class_bulk_only.html#adfec4b466c0ba9db172d057727b07ab1"> 250</a></span>&#160; uint8_t <a class="code" href="class_bulk_only.html#adfec4b466c0ba9db172d057727b07ab1">GetbTheLUN</a>() {</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="keywordflow">return</span> <a class="code" href="class_bulk_only.html#a24c051d401f5f1a9ce65c1bc25ab02dd">bTheLUN</a>; <span class="comment">// Active LUN</span></div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; }</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <span class="keywordtype">boolean</span> <a class="code" href="class_bulk_only.html#ab0976e6d4f5fdeff800f3769e7b287c9">WriteProtected</a>(uint8_t lun);</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; uint8_t <a class="code" href="class_bulk_only.html#a2fc74b11c2ecce30e89f84cc1efe0c81">MediaCTL</a>(uint8_t lun, uint8_t ctl);</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; uint8_t <a class="code" href="class_bulk_only.html#a470a8f0ffd6694d9dfc834da5efa627a">Read</a>(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, uint8_t *buf);</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; uint8_t <a class="code" href="class_bulk_only.html#a470a8f0ffd6694d9dfc834da5efa627a">Read</a>(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, <a class="code" href="class_u_s_b_read_parser.html">USBReadParser</a> *prs);</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; uint8_t <a class="code" href="class_bulk_only.html#a45d327ddf87e01607c3a5b1849936053">Write</a>(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, <span class="keyword">const</span> uint8_t *buf);</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; uint8_t <a class="code" href="class_bulk_only.html#ae7561d686d0b1374b5f9937d6ec8a035">LockMedia</a>(uint8_t lun, uint8_t lock);</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160;</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="class_bulk_only.html#aa6d74267dc98daeb0552fa234739ab08">LUNIsGood</a>(uint8_t lun);</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; uint32_t <a class="code" href="class_bulk_only.html#a597193e88b168e96878d383619f1377d">GetCapacity</a>(uint8_t lun);</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; uint16_t <a class="code" href="class_bulk_only.html#ac97cfb7558681af4cfaa11fcccc00170">GetSectorSize</a>(uint8_t lun);</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="comment">// USBDeviceConfig implementation</span></div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_bulk_only.html#a51870da9badc037166b86da60bcda6ea">Init</a>(uint8_t parent, uint8_t port, <span class="keywordtype">bool</span> lowspeed);</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_bulk_only.html#aa8fe167a7af12dce9964fa5a430c53ea">ConfigureDevice</a>(uint8_t parent, uint8_t port, <span class="keywordtype">bool</span> lowspeed);</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_bulk_only.html#a8a9b213d1800db2d8e661d242b57b195">Release</a>();</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_bulk_only.html#a51b8a76f5e16697476ce2dcff2514bc6">Poll</a>();</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;</div>
<div class="line"><a name="l00272"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a376cb3367071555816e2b0c74ad7eb12"> 272</a></span>&#160; <span class="keyword">virtual</span> uint8_t <a class="code" href="class_bulk_only.html#a376cb3367071555816e2b0c74ad7eb12">GetAddress</a>() {</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <span class="keywordflow">return</span> <a class="code" href="class_bulk_only.html#a9968a2119df66fa0093b020e318d8ac6">bAddress</a>;</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; };</div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="comment">// UsbConfigXtracter implementation</span></div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_bulk_only.html#a13d33906543d5d6b44620f430dc729ff">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="l00278"></a><span class="lineno"><a class="code" href="class_bulk_only.html#a509fdebcff72a9c0c8db706416f5bf23"> 278</a></span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">boolean</span> <a class="code" href="class_bulk_only.html#a509fdebcff72a9c0c8db706416f5bf23">DEVCLASSOK</a>(uint8_t klass) { <span class="keywordflow">return</span> (klass == <a class="code" href="_usb_8h.html#aa99b73e335df09e6545fc44798a3c1f2">USB_CLASS_MASS_STORAGE</a>); }</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; uint8_t Inquiry(uint8_t lun, uint16_t size, uint8_t *buf);</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; uint8_t TestUnitReady(uint8_t lun);</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; uint8_t RequestSense(uint8_t lun, uint16_t size, uint8_t *buf);</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; uint8_t ModeSense(uint8_t lun, uint8_t pc, uint8_t page, uint8_t subpage, uint8_t len, uint8_t *buf);</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; uint8_t GetMaxLUN(uint8_t *max_lun);</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; uint8_t SetCurLUN(uint8_t lun);</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <span class="keywordtype">void</span> Reset();</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; uint8_t ResetRecovery();</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; uint8_t ReadCapacity(uint8_t lun, uint16_t size, uint8_t *buf);</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; <span class="keywordtype">void</span> ClearAllEP();</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <span class="keywordtype">void</span> CheckMedia();</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; <span class="keywordtype">boolean</span> CheckLUN(uint8_t lun);</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; uint8_t Page3F(uint8_t lun);</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <span class="keywordtype">bool</span> IsValidCBW(uint8_t size, uint8_t *pcbw);</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <span class="keywordtype">bool</span> IsMeaningfulCBW(uint8_t size, uint8_t *pcbw);</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="keywordtype">bool</span> IsValidCSW(<a class="code" href="struct_command_status_wrapper.html">CommandStatusWrapper</a> *pcsw, <a class="code" href="struct_command_block_wrapper_base.html">CommandBlockWrapperBase</a> *pcbw);</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; uint8_t ClearEpHalt(uint8_t index);</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; uint8_t Transaction(<a class="code" href="struct_command_block_wrapper.html">CommandBlockWrapper</a> *cbw, uint16_t bsize, <span class="keywordtype">void</span> *buf, uint8_t flags);</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; uint8_t HandleUsbError(uint8_t error, uint8_t index);</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; uint8_t HandleSCSIError(uint8_t status);</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;};</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160;</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;<span class="preprocessor">#endif // __MASSTORAGE_H__</span></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.4
</small></address>
</body>
</html>