diff options
| author | hathach <[email protected]> | 2013-11-26 14:17:58 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-11-26 14:17:58 +0700 |
| commit | af87e231c53e8f22cb1c6caea6ad973cf9eb4e0c (patch) | |
| tree | d0acff0d0aa54d8319d929d1a7ffcc75d66d4e81 /tinyusb/class | |
| parent | 47d8af71118e9b82053a0d2238d67890ecf52c78 (diff) | |
house keeping
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/msc_device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tinyusb/class/msc_device.c b/tinyusb/class/msc_device.c index 7c334491d..2edc234f4 100644 --- a/tinyusb/class/msc_device.c +++ b/tinyusb/class/msc_device.c @@ -200,6 +200,10 @@ tusb_error_t mscd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32 event == TUSB_EVENT_XFER_COMPLETE &&
p_cbw->signature == MSC_CBW_SIGNATURE, TUSB_ERROR_INVALID_PARA );
+ p_csw->signature = MSC_CSW_SIGNATURE;
+ p_csw->tag = p_cbw->tag;
+ p_csw->data_residue = 0;
+
if ( (SCSI_CMD_READ_10 != p_cbw->command[0]) && (SCSI_CMD_WRITE_10 != p_cbw->command[0]) )
{
void *p_buffer = NULL;
@@ -237,10 +241,6 @@ tusb_error_t mscd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32 //------------- Status Phase -------------//
if (!is_waiting_read10_write10)
{
- p_csw->signature = MSC_CSW_SIGNATURE;
- p_csw->tag = p_cbw->tag;
- p_csw->data_residue = 0;
-
ASSERT_STATUS( dcd_pipe_xfer( p_msc->edpt_in , p_csw, sizeof(msc_cmd_status_wrapper_t), true) ); // need to be true for dcd to clean up qtd !!
//------------- Queue the next CBW -------------//
|
