Skip to content

Update tinyusb to include control fixes. #1353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/tinyusb
Submodule tinyusb updated 182 files
6 changes: 2 additions & 4 deletions ports/atmel-samd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,13 @@ BASE_CFLAGS = \
-Wno-endif-labels \
-Wstrict-prototypes \
-Werror-implicit-function-declaration \
-Wpointer-arith \
-Wfloat-equal \
-Wundef \
-Wshadow \
-Wwrite-strings \
-Wsign-compare \
-Wmissing-format-attribute \
-Wno-deprecated-declarations \
-Wpacked \
-Wnested-externs \
-Wunreachable-code \
-Wcast-align \
Expand Down Expand Up @@ -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 \
Expand Down
9 changes: 1 addition & 8 deletions ports/nrf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
15 changes: 4 additions & 11 deletions supervisor/shared/usb/usb_msc_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion supervisor/supervisor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down