Merge pull request #3195 from hathach/update-inquiry2
add bufsize to tud_msc_inquiry2_cb()
This commit is contained in:
@@ -119,8 +119,9 @@ uint8_t msc_disk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] = {
|
||||
// Invoked when received SCSI_CMD_INQUIRY, v2 with full inquiry response
|
||||
// Some inquiry_resp's fields are already filled with default values, application can update them
|
||||
// Return length of inquiry response, typically sizeof(scsi_inquiry_resp_t) (36 bytes), can be longer if included vendor data.
|
||||
uint32_t tud_msc_inquiry2_cb(uint8_t lun, scsi_inquiry_resp_t* inquiry_resp) {
|
||||
uint32_t tud_msc_inquiry2_cb(uint8_t lun, scsi_inquiry_resp_t *inquiry_resp, uint32_t bufsize) {
|
||||
(void) lun;
|
||||
(void) bufsize;
|
||||
const char vid[] = "TinyUSB";
|
||||
const char pid[] = "Mass Storage";
|
||||
const char rev[] = "1.0";
|
||||
|
@@ -166,7 +166,7 @@ static void io_task(void *params) {
|
||||
io_ops_t io_ops;
|
||||
while (1) {
|
||||
if (xQueueReceive(io_queue, &io_ops, portMAX_DELAY)) {
|
||||
const uint8_t* addr = msc_disk[io_ops.lba] + io_ops.offset;
|
||||
uint8_t* addr = (uint8_t*) (uintptr_t) (msc_disk[io_ops.lba] + io_ops.offset);
|
||||
int32_t nbytes = io_ops.bufsize;
|
||||
if (io_ops.is_read) {
|
||||
memcpy(io_ops.buffer, addr, io_ops.bufsize);
|
||||
@@ -191,8 +191,9 @@ void msc_disk_init() {}
|
||||
// Invoked when received SCSI_CMD_INQUIRY, v2 with full inquiry response
|
||||
// Some inquiry_resp's fields are already filled with default values, application can update them
|
||||
// Return length of inquiry response, typically sizeof(scsi_inquiry_resp_t) (36 bytes), can be longer if included vendor data.
|
||||
uint32_t tud_msc_inquiry2_cb(uint8_t lun, scsi_inquiry_resp_t* inquiry_resp) {
|
||||
uint32_t tud_msc_inquiry2_cb(uint8_t lun, scsi_inquiry_resp_t* inquiry_resp, uint32_t bufsize) {
|
||||
(void) lun;
|
||||
(void) bufsize;
|
||||
const char vid[] = "TinyUSB";
|
||||
const char pid[] = "Mass Storage";
|
||||
const char rev[] = "1.0";
|
||||
|
@@ -119,8 +119,9 @@ uint8_t msc_disk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
|
||||
// Invoked when received SCSI_CMD_INQUIRY, v2 with full inquiry response
|
||||
// Some inquiry_resp's fields are already filled with default values, application can update them
|
||||
// Return length of inquiry response, typically sizeof(scsi_inquiry_resp_t) (36 bytes), can be longer if included vendor data.
|
||||
uint32_t tud_msc_inquiry2_cb(uint8_t lun, scsi_inquiry_resp_t* inquiry_resp) {
|
||||
uint32_t tud_msc_inquiry2_cb(uint8_t lun, scsi_inquiry_resp_t *inquiry_resp, uint32_t bufsize) {
|
||||
(void) lun;
|
||||
(void) bufsize;
|
||||
const char vid[] = "TinyUSB";
|
||||
const char pid[] = "Mass Storage";
|
||||
const char rev[] = "1.0";
|
||||
|
@@ -210,8 +210,9 @@ uint8_t tud_msc_get_maxlun_cb(void) {
|
||||
// Invoked when received SCSI_CMD_INQUIRY, v2 with full inquiry response
|
||||
// Some inquiry_resp's fields are already filled with default values, application can update them
|
||||
// Return length of inquiry response, typically sizeof(scsi_inquiry_resp_t) (36 bytes), can be longer if included vendor data.
|
||||
uint32_t tud_msc_inquiry2_cb(uint8_t lun, scsi_inquiry_resp_t* inquiry_resp) {
|
||||
uint32_t tud_msc_inquiry2_cb(uint8_t lun, scsi_inquiry_resp_t *inquiry_resp, uint32_t bufsize) {
|
||||
(void) lun;
|
||||
(void) bufsize;
|
||||
const char vid[] = "TinyUSB";
|
||||
const char pid[] = "Mass Storage";
|
||||
const char rev[] = "1.0";
|
||||
|
Reference in New Issue
Block a user