From 324301e3bc23d3c5d2b7aebff745999c38532d19 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 23 Nov 2018 12:51:11 -0800 Subject: Update tinyusb to include control fixes. --- supervisor/shared/usb/usb_msc_flash.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'supervisor/shared') diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c index 13b5c3966..658aab0d8 100644 --- a/supervisor/shared/usb/usb_msc_flash.c +++ b/supervisor/shared/usb/usb_msc_flash.c @@ -133,17 +133,10 @@ int32_t tud_msc_scsi_cb (uint8_t lun, const uint8_t scsi_cmd[16], void* buffer, return resplen; } -bool tud_lun_capacity_cb(uint8_t lun, uint32_t* last_valid_sector, uint16_t* sector_size) { - fs_user_mount_t * vfs = get_vfs(lun); - if (vfs == NULL || - disk_ioctl(vfs, GET_SECTOR_COUNT, last_valid_sector) != RES_OK || - disk_ioctl(vfs, GET_SECTOR_SIZE, sector_size) != RES_OK) { - return false; - } - // Subtract one from the sector count to get the last valid sector. - (*last_valid_sector)--; - - return true; +void tud_msc_capacity_cb(uint8_t lun, uint32_t* block_count, uint16_t* block_size) { + fs_user_mount_t * vfs = get_vfs(lun); + disk_ioctl(vfs, GET_SECTOR_COUNT, block_count); + disk_ioctl(vfs, GET_SECTOR_SIZE, block_size); } bool tud_msc_is_writable_cb(uint8_t lun) { -- cgit v1.2.3