update msc example

This commit is contained in:
hathach
2018-07-25 22:35:02 +07:00
parent 8fc1d151fc
commit 93db46292a
2 changed files with 9 additions and 2 deletions

View File

@@ -97,12 +97,18 @@ int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t const scsi_cmd[16], void* buffer,
break;
case SCSI_CMD_TEST_UNIT_READY:
ptr = NULL;
// Command that host uses to check our readiness before sending other commands
len = 0;
break;
case SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL:
ptr = NULL;
// Host is about to read/write etc ... better not to disconnect disk
len = 0;
break;
case SCSI_CMD_START_STOP_UNIT:
// Host try to eject/safe remove/powerof us. We could safely disconnect with disk storage, or go into lower power
// scsi_start_stop_unit_t const * cmd_start_stop = (scsi_start_stop_unit_t const *) scsi_cmd
len = 0;
break;