Skip to content

Commit 46e1ad8

Browse files
Jerry-ESPwqx6
andauthored
ESP32: Add a menuconfig option to enable/disable persist subscription (#30889) (#33483)
* ESP32: Add a menuconfig option to enable/disable persist subscription * enable persistent subscription by default Co-authored-by: Wang Qixiang <43193572+wqx6@users.noreply.github.com>
1 parent 7a469fd commit 46e1ad8

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

config/esp32/components/chip/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ if ((CONFIG_BT_ENABLED) AND (CONFIG_ENABLE_CHIPOBLE))
185185
endif()
186186
endif()
187187

188+
if (CONFIG_ENABLE_PERSIST_SUBSCRIPTIONS)
189+
chip_gn_arg_append("chip_persist_subscriptions" "true")
190+
else()
191+
chip_gn_arg_append("chip_persist_subscriptions" "false")
192+
endif()
193+
188194
if (CONFIG_ENABLE_ESP32_BLE_CONTROLLER)
189195
chip_gn_arg_append("chip_enable_ble_controller" "true")
190196
endif()

config/esp32/components/chip/Kconfig

+7
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ menu "CHIP Core"
114114
help
115115
Some device types don't require the read client. Enabling this option may save some flash/ram.
116116

117+
config ENABLE_PERSIST_SUBSCRIPTIONS
118+
bool "Enable persist subscriptions"
119+
default y
120+
help
121+
Enable persist subscriptions to make the device resume the subscriptions from the persist
122+
subscriptions information after reboot.
123+
117124
config BUILD_CHIP_TESTS
118125
bool "Build CHIP tests"
119126
default n

src/platform/device.gni

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ declare_args() {
103103

104104
# Enable Subscription persistence / resumption for CI and supported platforms
105105
if (chip_device_platform == "darwin" || chip_device_platform == "linux" ||
106-
chip_device_platform == "esp32" || chip_device_platform == "fake" ||
107-
chip_device_platform == "efr32" || chip_device_platform == "SiWx917") {
106+
chip_device_platform == "fake" || chip_device_platform == "efr32" ||
107+
chip_device_platform == "SiWx917") {
108108
chip_persist_subscriptions = true
109109
} else {
110110
chip_persist_subscriptions = false

0 commit comments

Comments
 (0)