diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-11-23 12:51:11 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2018-11-23 13:28:10 -0800 |
| commit | 324301e3bc23d3c5d2b7aebff745999c38532d19 (patch) | |
| tree | 1132c31188eadc841e96bdd26ca0911e320b5ed4 | |
| parent | 3ca74d8693cb86532aa9406403c44a0efeb57f1e (diff) | |
Update tinyusb to include control fixes.
| m--------- | lib/tinyusb | 0 | ||||
| -rw-r--r-- | ports/atmel-samd/Makefile | 6 | ||||
| -rwxr-xr-x | ports/nrf/Makefile | 9 | ||||
| -rw-r--r-- | supervisor/shared/usb/usb_msc_flash.c | 15 | ||||
| -rw-r--r-- | supervisor/supervisor.mk | 2 |
5 files changed, 8 insertions, 24 deletions
diff --git a/lib/tinyusb b/lib/tinyusb -Subproject c62d9a1fefa76bf59d43ff56ce6ca1e138a69c7 +Subproject 47fabe42edaae4a5da6aa0d48c664a918457875 diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 23fb39779..99b8842c6 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -61,7 +61,6 @@ BASE_CFLAGS = \ -Wno-endif-labels \ -Wstrict-prototypes \ -Werror-implicit-function-declaration \ - -Wpointer-arith \ -Wfloat-equal \ -Wundef \ -Wshadow \ @@ -69,7 +68,6 @@ BASE_CFLAGS = \ -Wsign-compare \ -Wmissing-format-attribute \ -Wno-deprecated-declarations \ - -Wpacked \ -Wnested-externs \ -Wunreachable-code \ -Wcast-align \ @@ -265,8 +263,8 @@ SRC_C = \ lib/oofatfs/ff.c \ lib/oofatfs/option/ccsbcs.c \ lib/timeutils/timeutils.c \ - lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/dcd.c \ - lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/hal.c \ + lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/dcd_$(CHIP_FAMILY).c \ + lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/hal_$(CHIP_FAMILY).c \ lib/utils/buffer_helper.c \ lib/utils/context_manager_helpers.c \ lib/utils/interrupt_char.c \ diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 8d0d6d000..558731a44 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -218,14 +218,7 @@ ifeq ($(MCU_SUB_VARIANT),nrf52840) SRC_C += \ lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c \ - lib/tinyusb/src/portable/nordic/nrf5x/hal_nrf5x.c \ - lib/tinyusb/src/common/tusb_fifo.c \ - lib/tinyusb/src/device/control.c \ - lib/tinyusb/src/device/usbd.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 \ - lib/tinyusb/src/tusb.c \ + lib/tinyusb/src/portable/nordic/nrf5x/hal_nrf5x.c SRC_SHARED_MODULE += \ usb_hid/__init__.c \ 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 \ |
