mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
Merge branch 'backport-ble-deinit' into 'release/v1.2'
[v1.2] Added an event when BLE is deinitialized and memory is reclaimed See merge request app-frameworks/esp-matter!651
This commit is contained in:
@@ -127,6 +127,8 @@ enum
|
||||
/** Signals that operational credentials are changed, which may not be persistent.
|
||||
Can be used to affect what is needed for UpdateNOC prior to commit */
|
||||
kFabricUpdated,
|
||||
/** Signals that BLE is deinitialized and heap memory is reclaimed */
|
||||
kBLEDeinitialized,
|
||||
};
|
||||
|
||||
} // DeviceEventType
|
||||
|
||||
@@ -876,6 +876,7 @@ static void deinit_ble_if_commissioned(void)
|
||||
return;
|
||||
}
|
||||
ESP_LOGI(TAG, "BLE deinit successful and memory reclaimed");
|
||||
PostEvent(chip::DeviceLayer::DeviceEventType::kBLEDeinitialized);
|
||||
}
|
||||
#endif /* CONFIG_BT_ENABLED && CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING */
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## IDF Component Manager Manifest File
|
||||
dependencies:
|
||||
espressif/esp-now: ">=2.2.0"
|
||||
espressif/esp-now: "==2.4.0"
|
||||
## Required IDF version
|
||||
idf:
|
||||
version: ">=4.1.0"
|
||||
|
||||
@@ -106,6 +106,11 @@ static void app_event_cb(const ChipDeviceEvent *event, intptr_t arg)
|
||||
case chip::DeviceLayer::DeviceEventType::kFabricCommitted:
|
||||
ESP_LOGI(TAG, "Fabric is committed");
|
||||
break;
|
||||
|
||||
case chip::DeviceLayer::DeviceEventType::kBLEDeinitialized:
|
||||
ESP_LOGI(TAG, "BLE deinitialized and memory reclaimed");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user