Merge pull request #1353 from tannewt/usb_update
Update tinyusb to include control fixes.
This commit is contained in:
commit
e77c06e8c3
@ -1 +1 @@
|
|||||||
Subproject commit c62d9a1fefa76bf59d43ff56ce6ca1e138a69c76
|
Subproject commit 47fabe42edaae4a5da6aa0d48c664a9184578753
|
@ -61,7 +61,6 @@ BASE_CFLAGS = \
|
|||||||
-Wno-endif-labels \
|
-Wno-endif-labels \
|
||||||
-Wstrict-prototypes \
|
-Wstrict-prototypes \
|
||||||
-Werror-implicit-function-declaration \
|
-Werror-implicit-function-declaration \
|
||||||
-Wpointer-arith \
|
|
||||||
-Wfloat-equal \
|
-Wfloat-equal \
|
||||||
-Wundef \
|
-Wundef \
|
||||||
-Wshadow \
|
-Wshadow \
|
||||||
@ -69,7 +68,6 @@ BASE_CFLAGS = \
|
|||||||
-Wsign-compare \
|
-Wsign-compare \
|
||||||
-Wmissing-format-attribute \
|
-Wmissing-format-attribute \
|
||||||
-Wno-deprecated-declarations \
|
-Wno-deprecated-declarations \
|
||||||
-Wpacked \
|
|
||||||
-Wnested-externs \
|
-Wnested-externs \
|
||||||
-Wunreachable-code \
|
-Wunreachable-code \
|
||||||
-Wcast-align \
|
-Wcast-align \
|
||||||
@ -265,8 +263,8 @@ SRC_C = \
|
|||||||
lib/oofatfs/ff.c \
|
lib/oofatfs/ff.c \
|
||||||
lib/oofatfs/option/ccsbcs.c \
|
lib/oofatfs/option/ccsbcs.c \
|
||||||
lib/timeutils/timeutils.c \
|
lib/timeutils/timeutils.c \
|
||||||
lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/dcd.c \
|
lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/dcd_$(CHIP_FAMILY).c \
|
||||||
lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/hal.c \
|
lib/tinyusb/src/portable/microchip/$(CHIP_FAMILY)/hal_$(CHIP_FAMILY).c \
|
||||||
lib/utils/buffer_helper.c \
|
lib/utils/buffer_helper.c \
|
||||||
lib/utils/context_manager_helpers.c \
|
lib/utils/context_manager_helpers.c \
|
||||||
lib/utils/interrupt_char.c \
|
lib/utils/interrupt_char.c \
|
||||||
|
@ -218,14 +218,7 @@ ifeq ($(MCU_SUB_VARIANT),nrf52840)
|
|||||||
|
|
||||||
SRC_C += \
|
SRC_C += \
|
||||||
lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c \
|
lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c \
|
||||||
lib/tinyusb/src/portable/nordic/nrf5x/hal_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 \
|
|
||||||
|
|
||||||
SRC_SHARED_MODULE += \
|
SRC_SHARED_MODULE += \
|
||||||
usb_hid/__init__.c \
|
usb_hid/__init__.c \
|
||||||
|
@ -133,17 +133,10 @@ int32_t tud_msc_scsi_cb (uint8_t lun, const uint8_t scsi_cmd[16], void* buffer,
|
|||||||
return resplen;
|
return resplen;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tud_lun_capacity_cb(uint8_t lun, uint32_t* last_valid_sector, uint16_t* sector_size) {
|
void tud_msc_capacity_cb(uint8_t lun, uint32_t* block_count, uint16_t* block_size) {
|
||||||
fs_user_mount_t * vfs = get_vfs(lun);
|
fs_user_mount_t * vfs = get_vfs(lun);
|
||||||
if (vfs == NULL ||
|
disk_ioctl(vfs, GET_SECTOR_COUNT, block_count);
|
||||||
disk_ioctl(vfs, GET_SECTOR_COUNT, last_valid_sector) != RES_OK ||
|
disk_ioctl(vfs, GET_SECTOR_SIZE, block_size);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tud_msc_is_writable_cb(uint8_t lun) {
|
bool tud_msc_is_writable_cb(uint8_t lun) {
|
||||||
|
@ -43,8 +43,8 @@ ifeq ($(USB),FALSE)
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
SRC_SUPERVISOR += lib/tinyusb/src/common/tusb_fifo.c \
|
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.c \
|
||||||
|
lib/tinyusb/src/device/usbd_control.c \
|
||||||
lib/tinyusb/src/class/msc/msc_device.c \
|
lib/tinyusb/src/class/msc/msc_device.c \
|
||||||
lib/tinyusb/src/class/cdc/cdc_device.c \
|
lib/tinyusb/src/class/cdc/cdc_device.c \
|
||||||
lib/tinyusb/src/class/hid/hid_device.c \
|
lib/tinyusb/src/class/hid/hid_device.c \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user