summaryrefslogtreecommitdiff
path: root/src/class/msc/msc_device.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-05-03 23:46:01 +0700
committerhathach <[email protected]>2019-05-03 23:46:01 +0700
commitfae9aba68f7fb2cb5309b21933bcc0d3fdc480e0 (patch)
tree2ceec38bc2755051c9f9dbeb1ff1c791181581b6 /src/class/msc/msc_device.h
parent49ad6fe0ac0fc5479abac1b2d2d9174a6aedb663 (diff)
add tud_msc_inquiry_cb() remove CFG_TUD_MSC_VENDOR/PRODUCT/PRODUCT_REV
Diffstat (limited to 'src/class/msc/msc_device.h')
-rw-r--r--src/class/msc/msc_device.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/class/msc/msc_device.h b/src/class/msc/msc_device.h
index b1e7e8da1..068bea3ef 100644
--- a/src/class/msc/msc_device.h
+++ b/src/class/msc/msc_device.h
@@ -44,18 +44,6 @@ TU_VERIFY_STATIC(CFG_TUD_MSC_BUFSIZE < UINT16_MAX, "Size is not correct");
#error CFG_TUD_MSC_BUFSIZE must be defined, value of a block size should work well, the more the better
#endif
-#ifndef CFG_TUD_MSC_VENDOR
- #error CFG_TUD_MSC_VENDOR 8-byte name must be defined
-#endif
-
-#ifndef CFG_TUD_MSC_PRODUCT
- #error CFG_TUD_MSC_PRODUCT 16-byte name must be defined
-#endif
-
-#ifndef CFG_TUD_MSC_PRODUCT_REV
- #error CFG_TUD_MSC_PRODUCT_REV 4-byte string must be defined
-#endif
-
/** \addtogroup ClassDriver_MSC
* @{
* \defgroup MSC_Device Device
@@ -105,6 +93,10 @@ int32_t tud_msc_read10_cb (uint8_t lun, uint32_t lba, uint32_t offset, void* buf
*/
int32_t tud_msc_write10_cb (uint8_t lun, uint32_t lba, uint32_t offset, uint8_t* buffer, uint32_t bufsize);
+// Invoked when received SCSI_CMD_INQUIRY
+// Application fill vendor id, product id and revision with string up to 8, 16, 4 characters respectively
+void tud_msc_inquiry_cb(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4]);
+
// Invoked when received SCSI_CMD_READ_CAPACITY_10 and SCSI_CMD_READ_FORMAT_CAPACITY to determine the disk size
// Application update block count and block size
void tud_msc_capacity_cb(uint8_t lun, uint32_t* block_count, uint16_t* block_size);