From c679f69a7970fd54a6ff8bfe9f6bb5472569a45a Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Fri, 7 Apr 2023 09:49:49 +0800 Subject: [PATCH] ESP32: Add menuconfig to use Thread for non-matter task. (#25962) --- config/esp32/components/chip/CMakeLists.txt | 6 +++++- config/esp32/components/chip/Kconfig | 7 +++++++ src/platform/ESP32/CHIPDevicePlatformConfig.h | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 7f898b242302f2..a88839a5565fee 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -155,12 +155,16 @@ if ((CONFIG_BT_ENABLED) AND (CONFIG_ENABLE_CHIPOBLE)) endif() endif() -if (CONFIG_OPENTHREAD_ENABLED) +if (CONFIG_ENABLE_MATTER_OVER_THREAD) chip_gn_arg_append("chip_enable_openthread" "true") +else() + chip_gn_arg_append("chip_enable_openthread" "false") endif() if (CONFIG_OPENTHREAD_FTD) chip_gn_arg_append("chip_openthread_ftd" "true") +else() + chip_gn_arg_append("chip_openthread_ftd" "false") endif() if (CONFIG_ENABLE_OTA_REQUESTOR) diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 3a8dc89affa58e..3b6d84a5c776fc 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -498,6 +498,13 @@ menu "CHIP Device Layer" menu "CHIP Thread Options" visible if OPENTHREAD_ENABLED + config ENABLE_MATTER_OVER_THREAD + bool "Enable Matter-over-Thread Support" + default y + depends on OPENTHREAD_ENABLED + help + Enables support for sending and receiving CHIP messages over a Thread Connection. + config THREAD_TASK_STACK_SIZE int "Thread task stack size" default 5120 diff --git a/src/platform/ESP32/CHIPDevicePlatformConfig.h b/src/platform/ESP32/CHIPDevicePlatformConfig.h index 13360bf91cda89..757af45869a7dd 100644 --- a/src/platform/ESP32/CHIPDevicePlatformConfig.h +++ b/src/platform/ESP32/CHIPDevicePlatformConfig.h @@ -47,7 +47,7 @@ #endif /* CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID */ -#define CHIP_DEVICE_CONFIG_ENABLE_THREAD CONFIG_OPENTHREAD_ENABLED +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD CONFIG_ENABLE_MATTER_OVER_THREAD #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT CONFIG_OPENTHREAD_SRP_CLIENT #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT CONFIG_OPENTHREAD_DNS_CLIENT