summaryrefslogtreecommitdiff
path: root/examples/device/dynamic_configuration/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-03-06 11:57:53 +0700
committerGitHub <[email protected]>2026-03-06 11:57:53 +0700
commit06a4c6d7190ef83f76b2a65496f2a48a54a8c134 (patch)
tree71489788f7dab079de99948dc25bfeaa9be292d0 /examples/device/dynamic_configuration/src
parent694d921643be7c81fae42eb438cc29bf1560980c (diff)
parent94baf394686f92d9edaf109dcae30fa7b531fefc (diff)
Merge pull request #3528 from hathach/improve-iar-warnings
Add IAR warning flags to CMake build and resolve warnings
Diffstat (limited to 'examples/device/dynamic_configuration/src')
-rw-r--r--examples/device/dynamic_configuration/src/msc_disk.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/examples/device/dynamic_configuration/src/msc_disk.c b/examples/device/dynamic_configuration/src/msc_disk.c
index e95b2e197..b545e4652 100644
--- a/examples/device/dynamic_configuration/src/msc_disk.c
+++ b/examples/device/dynamic_configuration/src/msc_disk.c
@@ -215,20 +215,17 @@ int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, uint8_t*
// - READ_CAPACITY10, READ_FORMAT_CAPACITY, INQUIRY, MODE_SENSE6, REQUEST_SENSE
// - READ10 and WRITE10 has their own callbacks
int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, uint16_t bufsize) {
- // read10 & write10 has their own callback and MUST not be handled here
+ (void) lun;
+ (void) scsi_cmd;
(void) buffer;
(void) bufsize;
- switch (scsi_cmd[0]) {
- default:
- // Set Sense = Invalid Command Operation
- tud_msc_set_sense(lun, SCSI_SENSE_ILLEGAL_REQUEST, 0x20, 0x00);
+ // currently no other commands are supported
- // negative means error -> tinyusb could stall and/or response with failed status
- return -1;
- }
+ // Set Sense = Invalid Command Operation
+ (void) tud_msc_set_sense(lun, SCSI_SENSE_ILLEGAL_REQUEST, 0x20, 0x00);
- return -1;
+ return -1; // stall/failed command request;
}
#endif