From 7ae41ebd8b73f2c9c21b4ecdb083172de186ccae Mon Sep 17 00:00:00 2001 From: Roman Leonov Date: Thu, 29 Feb 2024 12:40:58 +0100 Subject: [PATCH] feat(usb_host): Added KConfig parameter for External HUB support enable --- components/usb/Kconfig | 8 +++++++- components/usb/include/usb/usb_helpers.h | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/components/usb/Kconfig b/components/usb/Kconfig index e6a426924b..8c170d17fd 100644 --- a/components/usb/Kconfig +++ b/components/usb/Kconfig @@ -93,7 +93,6 @@ menu "USB-OTG" The default value is set to 10 ms to be safe. - endmenu #Root Hub configuration # Hidden or compatibility options @@ -115,4 +114,11 @@ menu "USB-OTG" If enabled, the enumeration filter callback can be set via 'usb_host_config_t' when calling 'usb_host_install()'. + config USB_HOST_EXT_HUB_SUPPORT + depends on IDF_EXPERIMENTAL_FEATURES + bool "Support USB HUB (Experimental)" + default n + help + Feature is under development. + endmenu #USB-OTG diff --git a/components/usb/include/usb/usb_helpers.h b/components/usb/include/usb/usb_helpers.h index e64bc6de3c..faf430de39 100644 --- a/components/usb/include/usb/usb_helpers.h +++ b/components/usb/include/usb/usb_helpers.h @@ -12,9 +12,12 @@ Warning: The USB Host Library API is still a beta version and may be subject to #include #include "esp_err.h" +#include "sdkconfig.h" #include "usb/usb_types_stack.h" #include "usb/usb_types_ch9.h" +#if (CONFIG_USB_HOST_EXT_HUB_SUPPORT) #include "usb/usb_types_ch11.h" +#endif // CONFIG_USB_HOST_EXT_HUB_SUPPORT #ifdef __cplusplus extern "C" {