summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2019-10-03 11:35:10 -0700
committerGitHub <noreply@github.com>2019-10-03 11:35:10 -0700
commit68273545275f4ba782e0965abba0f03be82340d8 (patch)
treea201a40b9b5bd9d6b934d919ec8e314499d10cd8
parent22b7050c4cd8f2cad31657f91dd4a217b0444a76 (diff)
parent463415a7efcdd0c852a9673cb3a438fde15af887 (diff)
Merge pull request #2185 from dhalbert/xac-gamepad-fixes
Update tinyusb to fix gamepad;add HID OUT interface descriptor
m---------lib/tinyusb0
-rwxr-xr-xports/stm32f4/Makefile8
-rw-r--r--tools/gen_usb_descriptor.py9
3 files changed, 12 insertions, 5 deletions
diff --git a/lib/tinyusb b/lib/tinyusb
-Subproject f8081536310e5ac7a1e8c8ba9295890429a2cb6
+Subproject d3e48da5a1266a88f5f0fdfe28818c8599b0984
diff --git a/ports/stm32f4/Makefile b/ports/stm32f4/Makefile
index 7cee0d8e7..bef26d662 100755
--- a/ports/stm32f4/Makefile
+++ b/ports/stm32f4/Makefile
@@ -93,7 +93,7 @@ C_DEFS = -DMCU_PACKAGE=$(MCU_PACKAGE) -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -D$(
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -nostdlib $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT)
# Undo some warnings.
-# STM32 apparently also uses undefined preprocessor variables quite casually,
+# STM32 apparently also uses undefined preprocessor variables quite casually,
# so we can't do warning checks for these.
CFLAGS += -Wno-undef
# STM32 might do casts that increase alignment requirements.
@@ -165,7 +165,7 @@ SRC_STM32 = \
stm32f4/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c \
stm32f4/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c \
stm32f4/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c \
- system_stm32f4xx.c
+ system_stm32f4xx.c
SRC_C += \
background.c \
@@ -190,9 +190,9 @@ SRC_C += \
lib/utils/stdout_helpers.c \
lib/utils/sys_stdio_mphal.c \
supervisor/shared/memory.c
-
+
ifneq ($(USB),FALSE)
-SRC_C += lib/tinyusb/src/portable/st/stm32f4/dcd_stm32f4.c
+SRC_C += lib/tinyusb/src/portable/st/synopsys/dcd_synopsys.c
endif
SRC_S = \
diff --git a/tools/gen_usb_descriptor.py b/tools/gen_usb_descriptor.py
index 6bb401ef5..c4ff74d39 100644
--- a/tools/gen_usb_descriptor.py
+++ b/tools/gen_usb_descriptor.py
@@ -199,7 +199,13 @@ hid_endpoint_in_descriptor = standard.EndpointDescriptor(
description="HID in",
bEndpointAddress=0x0 | standard.EndpointDescriptor.DIRECTION_IN,
bmAttributes=standard.EndpointDescriptor.TYPE_INTERRUPT,
- bInterval=10)
+ bInterval=8)
+
+hid_endpoint_out_descriptor = standard.EndpointDescriptor(
+ description="HID out",
+ bEndpointAddress=0x0 | standard.EndpointDescriptor.DIRECTION_OUT,
+ bmAttributes=standard.EndpointDescriptor.TYPE_INTERRUPT,
+ bInterval=8)
hid_interfaces = [
standard.InterfaceDescriptor(
@@ -213,6 +219,7 @@ hid_interfaces = [
description="HID",
wDescriptorLength=len(bytes(combined_hid_report_descriptor))),
hid_endpoint_in_descriptor,
+ hid_endpoint_out_descriptor,
]
),
]