diff options
| author | hathach <[email protected]> | 2018-07-26 16:57:30 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-07-26 16:57:30 +0700 |
| commit | e362f5fd64d257e3ad70962be59fc8593a0f5d95 (patch) | |
| tree | 97667339cf5a95f54be06ad2137687f69da11e79 /examples/device | |
| parent | 86c445cd71133e2c6c659707845fe6b088b0cf6f (diff) | |
rename some scsi command struct, add SCSI_CMD_MODE_SENSE_6 to built-in support command
Diffstat (limited to 'examples/device')
| -rw-r--r-- | examples/device/nrf52840/src/msc_device_app.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/examples/device/nrf52840/src/msc_device_app.c b/examples/device/nrf52840/src/msc_device_app.c index 5edd4e0f5..aa6b2fb43 100644 --- a/examples/device/nrf52840/src/msc_device_app.c +++ b/examples/device/nrf52840/src/msc_device_app.c @@ -39,20 +39,10 @@ #include "msc_device_app.h" #if CFG_TUD_MSC -//--------------------------------------------------------------------+ -// INCLUDE -//--------------------------------------------------------------------+ //--------------------------------------------------------------------+ // MACRO CONSTANT TYPEDEF //--------------------------------------------------------------------+ -static scsi_mode_parameters_t const msc_dev_mode_para = -{ - .mode_data_length = 3, - .medium_type = 0, - .device_specific_para = 0, - .block_descriptor_length = 0 -}; //--------------------------------------------------------------------+ // tinyusb callbacks @@ -79,11 +69,6 @@ int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, switch (scsi_cmd[0]) { - case SCSI_CMD_MODE_SENSE_6: - ptr = &msc_dev_mode_para; - len = sizeof(msc_dev_mode_para); - break; - case SCSI_CMD_TEST_UNIT_READY: // Command that host uses to check our readiness before sending other commands len = 0; @@ -100,9 +85,8 @@ int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, len = 0; break; - default: - // negative is error -> Data stage is STALL, status = failed - return -1; + // negative is error -> Data stage is STALL, status = failed + default: return -1; } // return len must not larger than bufsize |
