diff options
| author | Ha Thach <[email protected]> | 2025-07-01 22:43:58 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-01 22:43:58 +0700 |
| commit | 0d6cb38163692fa8795d75b8eda9454c579bea4a (patch) | |
| tree | d1c4c18b039f89fecbe9bb69442ef3a32357aca6 /examples/device/cdc_msc/src | |
| parent | cd96277bdc7ec83fd414a7a5aa8e61fa14d28a45 (diff) | |
| parent | c96cc4369f1b97efe85575f3e5633e38598e9fc2 (diff) | |
Merge pull request #2967 from HiFiPhile/async_io
MSC Device: Add asynchronous IO support
Diffstat (limited to 'examples/device/cdc_msc/src')
| -rw-r--r-- | examples/device/cdc_msc/src/msc_disk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/device/cdc_msc/src/msc_disk.c b/examples/device/cdc_msc/src/msc_disk.c index 9645f4bfc..458681f58 100644 --- a/examples/device/cdc_msc/src/msc_disk.c +++ b/examples/device/cdc_msc/src/msc_disk.c @@ -184,7 +184,7 @@ int32_t tud_msc_read10_cb(uint8_t lun, uint32_t lba, uint32_t offset, void *buff } // Check for overflow of offset + bufsize - if (offset + bufsize > DISK_BLOCK_SIZE) { + if (lba * DISK_BLOCK_SIZE + offset + bufsize > DISK_BLOCK_NUM * DISK_BLOCK_SIZE) { return -1; } |
