From 37f6720da3c0ee703a1cf32fb2ee0ea572bfbf19 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Mon, 14 Nov 2022 22:11:08 +0100 Subject: [PATCH] pkg/tinyusb: fix CFG_TUD_MAX_SPEED The commit 98478e02fe59902e82d6a80ad4219b0917d0b765 removed the setting of the CFG_TUD_MAX_SPEED define to OPT_MODE_DEFAULT_SPEED. This setting is usually not required since CFG_TUD_MAX_SPEED is determined from CFG_TUSB_RHPORT{0,1}_MODE. However, this does not work for STM32F429I-DISC1 where the HS port is used via the internal FS-PHY. Therefore the default speed setting is added again. --- pkg/tinyusb/contrib/include/tusb_config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/tinyusb/contrib/include/tusb_config.h b/pkg/tinyusb/contrib/include/tusb_config.h index f090b43113..06181ab416 100644 --- a/pkg/tinyusb/contrib/include/tusb_config.h +++ b/pkg/tinyusb/contrib/include/tusb_config.h @@ -251,6 +251,10 @@ */ #define CFG_TUD_ENABLED MODULE_TINYUSB_DEVICE +#ifndef CFG_TUD_MAX_SPEED +#define CFG_TUD_MAX_SPEED OPT_MODE_DEFAULT_SPEED +#endif + #ifndef CFG_TUD_ENDPOINT0_SIZE #define CFG_TUD_ENDPOINT0_SIZE CONFIG_TUSBD_EP0_SIZE #endif