Skip to content

Commit 0a6db87

Browse files
authored
ESP32: Add a menuconfig option to enable/disable persist subscription (project-chip#30889)
* ESP32: Add a menuconfig option to enable/disable persist subscription * enable persistent subscription by default
1 parent bd6c4ab commit 0a6db87

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
@@ -130,6 +130,13 @@ menu "CHIP Core"
130130
help
131131
Some device types don't require the read client. Enabling this option may save some flash/ram.
132132

133+
config ENABLE_PERSIST_SUBSCRIPTIONS
134+
bool "Enable persist subscriptions"
135+
default y
136+
help
137+
Enable persist subscriptions to make the device resume the subscriptions from the persist
138+
subscriptions information after reboot.
139+
133140
config BUILD_CHIP_TESTS
134141
bool "Build CHIP tests"
135142
default n

src/platform/device.gni

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ declare_args() {
108108

109109
# Enable Subscription persistence / resumption for CI and supported platforms
110110
if (chip_device_platform == "darwin" || chip_device_platform == "linux" ||
111-
chip_device_platform == "esp32" || chip_device_platform == "fake" ||
112-
chip_device_platform == "efr32" || chip_device_platform == "SiWx917") {
111+
chip_device_platform == "fake" || chip_device_platform == "efr32" ||
112+
chip_device_platform == "SiWx917") {
113113
chip_persist_subscriptions = true
114114
} else {
115115
chip_persist_subscriptions = false

0 commit comments

Comments
 (0)