diff options
| author | sakumisu <[email protected]> | 2022-04-11 09:59:53 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2022-04-11 09:59:53 +0800 |
| commit | e131eaf5d1d52c23615d6b1384df1e483329ce8b (patch) | |
| tree | 53bdf0d1500c0d1e5da4b4bff6cabf360e4e2ff2 | |
| parent | 9ffb6382384c539e4d0ad5cdf75dc154e6537865 (diff) | |
add custom msc inquiry info
| -rw-r--r-- | class/msc/usbd_msc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/class/msc/usbd_msc.c b/class/msc/usbd_msc.c index 950b90af..48d324bb 100644 --- a/class/msc/usbd_msc.c +++ b/class/msc/usbd_msc.c @@ -497,12 +497,16 @@ static bool SCSI_inquiry(uint8_t **data, uint32_t *len) 0x00, 0x00, 0x00, - 'B', 'o', 'u', 'f', 'f', 'a', 'l', 'o', /* Manufacturer : 8 bytes */ - 'P', 'r', 'o', 'd', 'u', 'c', 't', ' ', /* Product : 16 Bytes */ + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', /* Manufacturer : 8 bytes */ + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', /* Product : 16 Bytes */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', - '0', '.', '0', '1' /* Version : 4 Bytes */ + ' ', ' ', ' ', ' ' /* Version : 4 Bytes */ }; + memcpy(&inquiry[8], CONFIG_USBDEV_MSC_MANUFACTURER_STRING, strlen(CONFIG_USBDEV_MSC_MANUFACTURER_STRING)); + memcpy(&inquiry[16], CONFIG_USBDEV_MSC_PRODUCT_STRING, strlen(CONFIG_USBDEV_MSC_PRODUCT_STRING)); + memcpy(&inquiry[32], CONFIG_USBDEV_MSC_VERSION_STRING, strlen(CONFIG_USBDEV_MSC_VERSION_STRING)); + if (usbd_msc_cfg.cbw.dDataLength == 0U) { SCSI_SetSenseData(SCSI_KCQIR_INVALIDCOMMAND); return false; |
