Update tinyusb to include control fixes.

This commit is contained in:
Scott Shawcroft 2018-11-23 12:51:11 -08:00
parent 3ca74d8693
commit 324301e3bc
No known key found for this signature in database
GPG Key ID: FD0EDC4B6C53CA59
5 changed files with 9 additions and 25 deletions

@ -1 +1 @@
Subproject commit c62d9a1fefa76bf59d43ff56ce6ca1e138a69c76
Subproject commit 47fabe42edaae4a5da6aa0d48c664a9184578753

View File

@ -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 \

View File

@ -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 \

View File

@ -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) {

View File

@ -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 \