<ahref="https://pledgie.com/campaigns/24694"><imgborder="0"src="https://pledgie.com/campaigns/24694.png?skin_name=chrome"alt="Click here to lend your support to tinyusb donation and make a donation at pledgie.com"></a>
<ahref="msc_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">/**************************************************************************/</span></div>
<divclass="line"><aname="l00107"></a><spanclass="lineno"> 107</span> STATIC_ASSERT(<spanclass="keyword">sizeof</span>(<aclass="code"href="structmsc__cmd__block__wrapper__t.html">msc_cmd_block_wrapper_t</a>) == 31, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00117"></a><spanclass="lineno"> 117</span> STATIC_ASSERT(<spanclass="keyword">sizeof</span>(<aclass="code"href="structmsc__cmd__status__wrapper__t.html">msc_cmd_status_wrapper_t</a>) == 13, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00166"></a><spanclass="lineno"> 166</span> STATIC_ASSERT(<spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__test__unit__ready__t.html">scsi_test_unit_ready_t</a>) == 6, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00178"></a><spanclass="lineno"> 178</span> STATIC_ASSERT(<spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__inquiry__t.html">scsi_inquiry_t</a>) == 6, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00224"></a><spanclass="lineno"> 224</span> STATIC_ASSERT(<spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__inquiry__data__t.html">scsi_inquiry_data_t</a>) == 36, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00250"></a><spanclass="lineno"> 250</span> STATIC_ASSERT(<spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__sense__fixed__data__t.html">scsi_sense_fixed_data_t</a>) == 18, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00267"></a><spanclass="lineno"> 267</span> STATIC_ASSERT( <spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__mode__sense__6__t.html">scsi_mode_sense_6_t</a>) == 6, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00276"></a><spanclass="lineno"> 276</span> STATIC_ASSERT( <spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__mode__parameters__t.html">scsi_mode_parameters_t</a>) == 4, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00285"></a><spanclass="lineno"> 285</span> STATIC_ASSERT( <spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__prevent__allow__medium__removal__t.html">scsi_prevent_allow_medium_removal_t</a>) == 6, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00298"></a><spanclass="lineno"> 298</span> STATIC_ASSERT( <spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__read__format__capacity__t.html">scsi_read_format_capacity_t</a>) == 10, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00312"></a><spanclass="lineno"> 312</span> STATIC_ASSERT( <spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__read__format__capacity__data__t.html">scsi_read_format_capacity_data_t</a>) == 12, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00316"></a><spanclass="lineno"> 316</span> <spanclass="comment">// NOTE: All data in SCSI command are in Big Endian</span></div>
<divclass="line"><aname="l00329"></a><spanclass="lineno"> 329</span> STATIC_ASSERT(<spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__read__capacity10__t.html">scsi_read_capacity10_t</a>) == 10, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00337"></a><spanclass="lineno"> 337</span> STATIC_ASSERT(<spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__read__capacity10__data__t.html">scsi_read_capacity10_data_t</a>) == 8, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00342"></a><spanclass="lineno"> 342</span>  uint8_t reserved ; <spanclass="comment">// has LUN according to wiki</span></div>
<divclass="line"><aname="l00349"></a><spanclass="lineno"> 349</span> STATIC_ASSERT(<spanclass="keyword">sizeof</span>(<aclass="code"href="structscsi__read10__t.html">scsi_read10_t</a>) == 10, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="line"><aname="l00350"></a><spanclass="lineno"> 350</span> STATIC_ASSERT(<spanclass="keyword">sizeof</span>(scsi_write10_t) == 10, <spanclass="stringliteral">"size is not correct"</span>);</div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gaf0f486b972468c53352266648012bf2f"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gaf0f486b972468c53352266648012bf2f">msc_request_type_t</a></div><divclass="ttdeci">msc_request_type_t</div><divclass="ttdoc">MassStorage Class-Specific Control Request. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00082">msc.h:82</a></div></div>
<divclass="ttc"id="structscsi__mode__sense__6__t_html_a9a5f466908129b4e8320b09a62354e42"><divclass="ttname"><ahref="structscsi__mode__sense__6__t.html#a9a5f466908129b4e8320b09a62354e42">scsi_mode_sense_6_t::cmd_code</a></div><divclass="ttdeci">uint8_t cmd_code</div><divclass="ttdoc">SCSI OpCode for SCSI_CMD_MODE_SENSE_6. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00253">msc.h:253</a></div></div>
<divclass="ttc"id="structmsc__cmd__block__wrapper__t_html_a49ead040118be61a7b9b7649b57cb33e"><divclass="ttname"><ahref="structmsc__cmd__block__wrapper__t.html#a49ead040118be61a7b9b7649b57cb33e">msc_cmd_block_wrapper_t::xfer_bytes</a></div><divclass="ttdeci">uint32_t xfer_bytes</div><divclass="ttdoc">The number of bytes of data that the host expects to transfer on the Bulk-In or Bulk-Out endpoint (as...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00100">msc.h:100</a></div></div>
<divclass="ttc"id="structmsc__cmd__status__wrapper__t_html_a1c50fcd1195659821729f52af8f3bb7d"><divclass="ttname"><ahref="structmsc__cmd__status__wrapper__t.html#a1c50fcd1195659821729f52af8f3bb7d">msc_cmd_status_wrapper_t::tag</a></div><divclass="ttdeci">uint32_t tag</div><divclass="ttdoc">The device shall set this field to the value received in the dCBWTag of the associated CBW...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00112">msc.h:112</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga26bc41b71a6b4d66b10c8649163caa21a531078b1e8d44d892397a241925471cd"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga26bc41b71a6b4d66b10c8649163caa21a531078b1e8d44d892397a241925471cd">MSC_SUBCLASS_QIC</a></div><divclass="ttdoc">QIC-157. Typically used by a tape device. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00062">msc.h:62</a></div></div>
<divclass="ttc"id="structmsc__cmd__status__wrapper__t_html_a645c75947c2c8148e2b402d7455d14a1"><divclass="ttname"><ahref="structmsc__cmd__status__wrapper__t.html#a645c75947c2c8148e2b402d7455d14a1">msc_cmd_status_wrapper_t::data_residue</a></div><divclass="ttdeci">uint32_t data_residue</div><divclass="ttdoc">For Data-Out the device shall report in the dCSWDataResiduethe difference between the amount of data ...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00113">msc.h:113</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggad5f995e6aa7f3c4cf01e369dae83ddd4a117340f6f7e567543b031f4cd311e7b1"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggad5f995e6aa7f3c4cf01e369dae83ddd4a117340f6f7e567543b031f4cd311e7b1">SCSI_CMD_TEST_UNIT_READY</a></div><divclass="ttdoc">The SCSI Test Unit Ready command is used to determine if a device is ready to transfer data (read/wri...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00125">msc.h:125</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga0411cd49bb5b71852cecd93bcbf0ca2da1d7a1491e63c8fa476a37677bd4defa9"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga0411cd49bb5b71852cecd93bcbf0ca2da1d7a1491e63c8fa476a37677bd4defa9">MSC_CBW_SIGNATURE</a></div><divclass="ttdoc">Constant value of 43425355h (little endian) </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00069">msc.h:69</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga0411cd49bb5b71852cecd93bcbf0ca2da6a3e02fda8ecf085a11ec330d9a09d1a"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga0411cd49bb5b71852cecd93bcbf0ca2da6a3e02fda8ecf085a11ec330d9a09d1a">MSC_CSW_SIGNATURE</a></div><divclass="ttdoc">Constant value of 53425355h (little endian) </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00070">msc.h:70</a></div></div>
<divclass="ttc"id="structmsc__cmd__block__wrapper__t_html_aff43fb296e4d0ec270a77f020614f60e"><divclass="ttname"><ahref="structmsc__cmd__block__wrapper__t.html#aff43fb296e4d0ec270a77f020614f60e">msc_cmd_block_wrapper_t::lun</a></div><divclass="ttdeci">uint8_t lun</div><divclass="ttdoc">The device Logical Unit Number (LUN) to which the command block is being sent. For devices that suppo...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00102">msc.h:102</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggad5f995e6aa7f3c4cf01e369dae83ddd4a68ae8c502e73b3c6e85b17efbbf7f8d9"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggad5f995e6aa7f3c4cf01e369dae83ddd4a68ae8c502e73b3c6e85b17efbbf7f8d9">SCSI_CMD_MODE_SELECT_6</a></div><divclass="ttdoc">provides a means for the application client to specify medium, logical unit, or peripheral device par...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00127">msc.h:127</a></div></div>
<divclass="ttc"id="structmsc__cmd__block__wrapper__t_html_acd2a6284879dded65f0b8daa7c68485a"><divclass="ttname"><ahref="structmsc__cmd__block__wrapper__t.html#acd2a6284879dded65f0b8daa7c68485a">msc_cmd_block_wrapper_t::signature</a></div><divclass="ttdeci">uint32_t signature</div><divclass="ttdoc">Signature that helps identify this data packet as a CBW. The signature field shall contain the value ...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00098">msc.h:98</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggad5f995e6aa7f3c4cf01e369dae83ddd4ad1eae0b1b180693ce3dc6645d1935152"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggad5f995e6aa7f3c4cf01e369dae83ddd4ad1eae0b1b180693ce3dc6645d1935152">SCSI_CMD_MODE_SENSE_6</a></div><divclass="ttdoc">provides a means for a device server to report parameters to an application client. It is a complementary command to the MODE SELECT(6) command. Device servers that implement the MODE SENSE(6) command shall also implement the MODE SELECT(6) command. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00128">msc.h:128</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggad5f995e6aa7f3c4cf01e369dae83ddd4a64f64e86275d0618cc06512cac43e5e0"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggad5f995e6aa7f3c4cf01e369dae83ddd4a64f64e86275d0618cc06512cac43e5e0">SCSI_CMD_WRITE_10</a></div><divclass="ttdoc">The WRITE (10) command requests thatthe device server transfer the specified logical block(s) from th...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00134">msc.h:134</a></div></div>
<divclass="ttc"id="structscsi__inquiry__t_html_a9a5f466908129b4e8320b09a62354e42"><divclass="ttname"><ahref="structscsi__inquiry__t.html#a9a5f466908129b4e8320b09a62354e42">scsi_inquiry_t::cmd_code</a></div><divclass="ttdeci">uint8_t cmd_code</div><divclass="ttdoc">SCSI OpCode for SCSI_CMD_INQUIRY. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00170">msc.h:170</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga26bc41b71a6b4d66b10c8649163caa21a4c50de5ae13afdbf4dc44c659823672e"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga26bc41b71a6b4d66b10c8649163caa21a4c50de5ae13afdbf4dc44c659823672e">MSC_SUBCLASS_SFF</a></div><divclass="ttdoc">SFF-8070i. Can be used by Floppy Disk Drive (FDD) device. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00064">msc.h:64</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggad5f995e6aa7f3c4cf01e369dae83ddd4a5cf192d1e89d1553d238f67024d84fd9"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggad5f995e6aa7f3c4cf01e369dae83ddd4a5cf192d1e89d1553d238f67024d84fd9">SCSI_CMD_REQUEST_SENSE</a></div><divclass="ttdoc">The SCSI Request Sense command is part of the SCSI computer protocol standard. This command is used t...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00131">msc.h:131</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36a39f74b15b7cd42748c1252efebd2b4b5"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36a39f74b15b7cd42748c1252efebd2b4b5">SCSI_SENSEKEY_ABORTED_COMMAND</a></div><divclass="ttdoc">Indicates the disc drive aborted the command. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00148">msc.h:148</a></div></div>
<divclass="ttc"id="structscsi__read__format__capacity__t_html"><divclass="ttname"><ahref="structscsi__read__format__capacity__t.html">scsi_read_format_capacity_t</a></div><divclass="ttdoc">SCSI Read Format Capacity: Write Capacity. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00291">msc.h:291</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggad5f995e6aa7f3c4cf01e369dae83ddd4a896bb16014025d5ee9c30767c37bb429"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggad5f995e6aa7f3c4cf01e369dae83ddd4a896bb16014025d5ee9c30767c37bb429">SCSI_CMD_READ_10</a></div><divclass="ttdoc">The READ (10) command requests that the device server read the specified logical block(s) and transfe...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00133">msc.h:133</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggad5f995e6aa7f3c4cf01e369dae83ddd4adaaa451130fe92c126a5a7031de1a25f"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggad5f995e6aa7f3c4cf01e369dae83ddd4adaaa451130fe92c126a5a7031de1a25f">SCSI_CMD_INQUIRY</a></div><divclass="ttdoc">The SCSI Inquiry command is used to obtain basic information from a target device. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00126">msc.h:126</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggad5f995e6aa7f3c4cf01e369dae83ddd4a1c7c2d9842ea20accf2333d2a320f1c4"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggad5f995e6aa7f3c4cf01e369dae83ddd4a1c7c2d9842ea20accf2333d2a320f1c4">SCSI_CMD_READ_FORMAT_CAPACITY</a></div><divclass="ttdoc">The command allows the Host to request a list of the possible format capacities for an installed writ...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00132">msc.h:132</a></div></div>
<divclass="ttc"id="structscsi__read10__t_html_ab5753fcd037ea7610f6a87f85e626aec"><divclass="ttname"><ahref="structscsi__read10__t.html#ab5753fcd037ea7610f6a87f85e626aec">scsi_read10_t::block_count</a></div><divclass="ttdeci">uint16_t block_count</div><divclass="ttdoc">Number of Blocks used by this command. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00345">msc.h:345</a></div></div>
<divclass="ttc"id="structscsi__read10__t_html_a7e3fa6ab395c95c7520dd87c932ee73b"><divclass="ttname"><ahref="structscsi__read10__t.html#a7e3fa6ab395c95c7520dd87c932ee73b">scsi_read10_t::lba</a></div><divclass="ttdeci">uint32_t lba</div><divclass="ttdoc">The first Logical Block Address (LBA) accessed by this command. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00343">msc.h:343</a></div></div>
<divclass="ttc"id="structscsi__test__unit__ready__t_html_aff43fb296e4d0ec270a77f020614f60e"><divclass="ttname"><ahref="structscsi__test__unit__ready__t.html#aff43fb296e4d0ec270a77f020614f60e">scsi_test_unit_ready_t::lun</a></div><divclass="ttdeci">uint8_t lun</div><divclass="ttdoc">Logical Unit. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00161">msc.h:161</a></div></div>
<divclass="ttc"id="structscsi__read__capacity10__t_html_a9a5f466908129b4e8320b09a62354e42"><divclass="ttname"><ahref="structscsi__read__capacity10__t.html#a9a5f466908129b4e8320b09a62354e42">scsi_read_capacity10_t::cmd_code</a></div><divclass="ttdeci">uint8_t cmd_code</div><divclass="ttdoc">SCSI OpCode for SCSI_CMD_READ_CAPACITY_10. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00321">msc.h:321</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ga85a3840e452fea9fd0f9ca4874b86e36"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ga85a3840e452fea9fd0f9ca4874b86e36">scsi_sense_key_type_t</a></div><divclass="ttdeci">scsi_sense_key_type_t</div><divclass="ttdoc">SCSI Sense Key. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00138">msc.h:138</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36a142c683f77b745f263f0f9ea2a3600f3"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36a142c683f77b745f263f0f9ea2a3600f3">SCSI_SENSEKEY_MEDIUM_ERROR</a></div><divclass="ttdoc">Indicates the command terminated with a non-recovered error condition. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00142">msc.h:142</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36a46b245f6ce9f248b10fd5ef3f85c0132"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36a46b245f6ce9f248b10fd5ef3f85c0132">SCSI_SENSEKEY_VOLUME_OVERFLOW</a></div><divclass="ttdoc">Indicates a buffered peripheral device has reached the end of medium partition and data remains in th...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00150">msc.h:150</a></div></div>
<divclass="ttc"id="structscsi__read__format__capacity__data__t_html_a5ab46e6354be39170b4988e1f5db5078"><divclass="ttname"><ahref="structscsi__read__format__capacity__data__t.html#a5ab46e6354be39170b4988e1f5db5078">scsi_read_format_capacity_data_t::block_num</a></div><divclass="ttdeci">uint32_t block_num</div><divclass="ttdoc">must be 8*n, length in bytes of formattable capacity descriptor followed it. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00304">msc.h:304</a></div></div>
<divclass="ttc"id="structscsi__read__capacity10__data__t_html_aed1814a9e1026a15c344137ea5e4c9ff"><divclass="ttname"><ahref="structscsi__read__capacity10__data__t.html#aed1814a9e1026a15c344137ea5e4c9ff">scsi_read_capacity10_data_t::last_lba</a></div><divclass="ttdeci">uint32_t last_lba</div><divclass="ttdoc">The last Logical Block Address of the device. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00333">msc.h:333</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggaf0f486b972468c53352266648012bf2fa8907560978586c8e695055c9126d44f0"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggaf0f486b972468c53352266648012bf2fa8907560978586c8e695055c9126d44f0">MSC_REQUEST_RESET</a></div><divclass="ttdoc">This request is used to reset the mass storage device and its associated interface. This class-specific request shall ready the device for the next CBW from the host. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00084">msc.h:84</a></div></div>
<divclass="ttc"id="structmsc__cmd__block__wrapper__t_html_a1c50fcd1195659821729f52af8f3bb7d"><divclass="ttname"><ahref="structmsc__cmd__block__wrapper__t.html#a1c50fcd1195659821729f52af8f3bb7d">msc_cmd_block_wrapper_t::tag</a></div><divclass="ttdeci">uint32_t tag</div><divclass="ttdoc">Tag sent by the host. The device shall echo the contents of this field back to the host in the dCSWTa...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00099">msc.h:99</a></div></div>
<divclass="ttc"id="structmsc__cmd__block__wrapper__t_html_a3de7cd2034819b86e635af280210f9e9"><divclass="ttname"><ahref="structmsc__cmd__block__wrapper__t.html#a3de7cd2034819b86e635af280210f9e9">msc_cmd_block_wrapper_t::cmd_len</a></div><divclass="ttdeci">uint8_t cmd_len</div><divclass="ttdoc">The valid length of the CBWCBin bytes. This defines the valid length of the command block...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00103">msc.h:103</a></div></div>
<divclass="ttc"id="structscsi__inquiry__t_html_a0f3cf1c0e7ac468423356690e6f30247"><divclass="ttname"><ahref="structscsi__inquiry__t.html#a0f3cf1c0e7ac468423356690e6f30247">scsi_inquiry_t::alloc_length</a></div><divclass="ttdeci">uint8_t alloc_length</div><divclass="ttdoc">specifies the maximum number of bytes that USB host has allocated in the Data-In Buffer. An allocation length of zero specifies that no data shall be transferred. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00174">msc.h:174</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggaf0f486b972468c53352266648012bf2fada9868798c37d9170cc132bbf64ed8ad"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggaf0f486b972468c53352266648012bf2fada9868798c37d9170cc132bbf64ed8ad">MSC_REQUEST_GET_MAX_LUN</a></div><divclass="ttdoc">The Get Max LUN device request is used to determine the number of logical units supported by the devi...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00083">msc.h:83</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36aeeae70550e0ca645d6700750aea16c77"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36aeeae70550e0ca645d6700750aea16c77">SCSI_SENSEKEY_HARDWARE_ERROR</a></div><divclass="ttdoc">Indicates the disc drive detected a nonrecoverable hardware failure while performing the command or d...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00143">msc.h:143</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36a107c8068339a7ada2c48bde04164451a"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36a107c8068339a7ada2c48bde04164451a">SCSI_SENSEKEY_DATA_PROTECT</a></div><divclass="ttdoc">Indicates that a command that reads or writes the medium was attempted on a block that is protected f...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00146">msc.h:146</a></div></div>
<divclass="ttc"id="structmsc__cmd__block__wrapper__t_html_a92abda0bec7c1c978fe96f87aad18067"><divclass="ttname"><ahref="structmsc__cmd__block__wrapper__t.html#a92abda0bec7c1c978fe96f87aad18067">msc_cmd_block_wrapper_t::dir</a></div><divclass="ttdeci">uint8_t dir</div><divclass="ttdoc">Bit 7 of this field define transfer direction - 0 : Data-Out from host to the device. - 1 : Data-In from the device to the host. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00101">msc.h:101</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36a98995bae55818194fa2431cecea2be4b"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36a98995bae55818194fa2431cecea2be4b">SCSI_SENSEKEY_EQUAL</a></div><divclass="ttdoc">Indicates a SEARCH DATA command has satisfied an equal comparison. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00149">msc.h:149</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gab78ea3586ce0c7a8bb2680d7fbcca3ae"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gab78ea3586ce0c7a8bb2680d7fbcca3ae">msc_csw_status_t</a></div><divclass="ttdeci">msc_csw_status_t</div><divclass="ttdoc">Command Block Status Values. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00090">msc.h:90</a></div></div>
<divclass="ttc"id="structmsc__cmd__status__wrapper__t_html"><divclass="ttname"><ahref="structmsc__cmd__status__wrapper__t.html">msc_cmd_status_wrapper_t</a></div><divclass="ttdoc">Command Status Wrapper. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00110">msc.h:110</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36ab106fd8f2c1999df32b54c936390574a"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36ab106fd8f2c1999df32b54c936390574a">SCSI_SENSEKEY_ILLEGLA_REQUEST</a></div><divclass="ttdoc">Indicates an illegal parameter in the command descriptor block or in the additional parameters...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00144">msc.h:144</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga26bc41b71a6b4d66b10c8649163caa21a671b4e9a3c91a1f5d1d0baa68b9d937c"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga26bc41b71a6b4d66b10c8649163caa21a671b4e9a3c91a1f5d1d0baa68b9d937c">MSC_SUBCLASS_UFI</a></div><divclass="ttdoc">UFI. Typically used by Floppy Disk Drive (FDD) device. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00063">msc.h:63</a></div></div>
<divclass="ttc"id="structscsi__read__format__capacity__data__t_html_a85bf659a6761f004702d2dc626643c24"><divclass="ttname"><ahref="structscsi__read__format__capacity__data__t.html#a85bf659a6761f004702d2dc626643c24">scsi_read_format_capacity_data_t::descriptor_type</a></div><divclass="ttdeci">uint8_t descriptor_type</div><divclass="ttdoc">Number of Logical Blocks. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00305">msc.h:305</a></div></div>
<divclass="ttc"id="structscsi__prevent__allow__medium__removal__t_html_a9a5f466908129b4e8320b09a62354e42"><divclass="ttname"><ahref="structscsi__prevent__allow__medium__removal__t.html#a9a5f466908129b4e8320b09a62354e42">scsi_prevent_allow_medium_removal_t::cmd_code</a></div><divclass="ttdeci">uint8_t cmd_code</div><divclass="ttdoc">SCSI OpCode for SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00279">msc.h:279</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36aaec06e9dfbda537fe7d922e13e2f3022"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36aaec06e9dfbda537fe7d922e13e2f3022">SCSI_SENSEKEY_MISCOMPARE</a></div><divclass="ttdoc">ndicates that the source data did not match the data read from the medium. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00151">msc.h:151</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36ad3a6524b4a5b76de37e81186a18c2f70"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36ad3a6524b4a5b76de37e81186a18c2f70">SCSI_SENSEKEY_NONE</a></div><divclass="ttdoc">no specific Sense Key. This would be the case for a successful command </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00139">msc.h:139</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_ggad5f995e6aa7f3c4cf01e369dae83ddd4a7a8b5c7b6db011cb6244012e21c02115"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#ggad5f995e6aa7f3c4cf01e369dae83ddd4a7a8b5c7b6db011cb6244012e21c02115">SCSI_CMD_READ_CAPACITY_10</a></div><divclass="ttdoc">The SCSI Read Capacity command is used to obtain data capacity information from a target device...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00130">msc.h:130</a></div></div>
<divclass="ttc"id="structscsi__test__unit__ready__t_html_a9a5f466908129b4e8320b09a62354e42"><divclass="ttname"><ahref="structscsi__test__unit__ready__t.html#a9a5f466908129b4e8320b09a62354e42">scsi_test_unit_ready_t::cmd_code</a></div><divclass="ttdeci">uint8_t cmd_code</div><divclass="ttdoc">SCSI OpCode for SCSI_CMD_TEST_UNIT_READY. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00160">msc.h:160</a></div></div>
<divclass="ttc"id="structmsc__cmd__status__wrapper__t_html_acd2a6284879dded65f0b8daa7c68485a"><divclass="ttname"><ahref="structmsc__cmd__status__wrapper__t.html#acd2a6284879dded65f0b8daa7c68485a">msc_cmd_status_wrapper_t::signature</a></div><divclass="ttdeci">uint32_t signature</div><divclass="ttdoc">Signature that helps identify this data packet as a CSW. The signature field shall contain the value ...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00111">msc.h:111</a></div></div>
<divclass="ttc"id="structmsc__cmd__status__wrapper__t_html_ade818037fd6c985038ff29656089758d"><divclass="ttname"><ahref="structmsc__cmd__status__wrapper__t.html#ade818037fd6c985038ff29656089758d">msc_cmd_status_wrapper_t::status</a></div><divclass="ttdeci">uint8_t status</div><divclass="ttdoc">indicates the success or failure of the command. Values from msc_csw_status_t </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00114">msc.h:114</a></div></div>
<divclass="ttc"id="structscsi__read__capacity10__t_html_a7e3fa6ab395c95c7520dd87c932ee73b"><divclass="ttname"><ahref="structscsi__read__capacity10__t.html#a7e3fa6ab395c95c7520dd87c932ee73b">scsi_read_capacity10_t::lba</a></div><divclass="ttdeci">uint32_t lba</div><divclass="ttdoc">The first Logical Block Address (LBA) accessed by this command. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00323">msc.h:323</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36a871335871fc3b91b8fb839d42d87c4ef"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36a871335871fc3b91b8fb839d42d87c4ef">SCSI_SENSEKEY_NOT_READY</a></div><divclass="ttdoc">Indicates the logical unit addressed cannot be accessed. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00141">msc.h:141</a></div></div>
<divclass="ttc"id="structscsi__read__capacity10__data__t_html_a9e3fb1e50a1c71b2337df296222d9553"><divclass="ttname"><ahref="structscsi__read__capacity10__data__t.html#a9e3fb1e50a1c71b2337df296222d9553">scsi_read_capacity10_data_t::block_size</a></div><divclass="ttdeci">uint32_t block_size</div><divclass="ttdoc">Block size in bytes. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00334">msc.h:334</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36a9f4f8e06049d66cf654782d6b1c409df"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36a9f4f8e06049d66cf654782d6b1c409df">SCSI_SENSEKEY_RECOVERED_ERROR</a></div><divclass="ttdoc">ndicates the last command completed successfully with some recovery action performed by the disc driv...</div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00140">msc.h:140</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36a879b509f9200ecca5b50d277d28487dc"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36a879b509f9200ecca5b50d277d28487dc">SCSI_SENSEKEY_FIRMWARE_ERROR</a></div><divclass="ttdoc">Vendor specific sense key. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00147">msc.h:147</a></div></div>
<divclass="ttc"id="structscsi__test__unit__ready__t_html"><divclass="ttname"><ahref="structscsi__test__unit__ready__t.html">scsi_test_unit_ready_t</a></div><divclass="ttdoc">SCSI Test Unit Ready Command. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00159">msc.h:159</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga26bc41b71a6b4d66b10c8649163caa21aea214cb6cbebd772dd6f369330b80783"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga26bc41b71a6b4d66b10c8649163caa21aea214cb6cbebd772dd6f369330b80783">MSC_SUBCLASS_SFF_MMC</a></div><divclass="ttdoc">SFF-8020i, MMC-2 (ATAPI). Typically used by a CD/DVD device. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00061">msc.h:61</a></div></div>
<divclass="ttc"id="group___class_driver___m_s_c___common_html_gga85a3840e452fea9fd0f9ca4874b86e36a7509d4d844a79f2efb1391a91429a4a1"><divclass="ttname"><ahref="group___class_driver___m_s_c___common.html#gga85a3840e452fea9fd0f9ca4874b86e36a7509d4d844a79f2efb1391a91429a4a1">SCSI_SENSEKEY_UNIT_ATTENTION</a></div><divclass="ttdoc">Indicates the disc drive may have been reset. </div><divclass="ttdef"><b>Definition:</b><ahref="msc_8h_source.html#l00145">msc.h:145</a></div></div>