summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2018-11-23 12:51:11 -0800
committerScott Shawcroft <scott@tannewt.org>2018-11-23 13:28:10 -0800
commit324301e3bc23d3c5d2b7aebff745999c38532d19 (patch)
tree1132c31188eadc841e96bdd26ca0911e320b5ed4 /supervisor
parent3ca74d8693cb86532aa9406403c44a0efeb57f1e (diff)
Update tinyusb to include control fixes.
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/shared/usb/usb_msc_flash.c15
-rw-r--r--supervisor/supervisor.mk2
2 files changed, 5 insertions, 12 deletions
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) {
diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk
index ac982d277..73c76ebb7 100644
--- a/supervisor/supervisor.mk
+++ b/supervisor/supervisor.mk
@@ -43,8 +43,8 @@ ifeq ($(USB),FALSE)
endif
else
SRC_SUPERVISOR += lib/tinyusb/src/common/tusb_fifo.c \
- lib/tinyusb/src/device/control.c \
lib/tinyusb/src/device/usbd.c \
+ lib/tinyusb/src/device/usbd_control.c \
lib/tinyusb/src/class/msc/msc_device.c \
lib/tinyusb/src/class/cdc/cdc_device.c \
lib/tinyusb/src/class/hid/hid_device.c \