Skip to content

Commit

Permalink
update esp32c6 ble deinit and mem release config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry-ESP committed Jan 17, 2024
1 parent 3951246 commit 1977e50
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
9 changes: 5 additions & 4 deletions components/esp_matter/esp_matter_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,8 @@ static void deinit_ble_if_commissioned(void)
#endif /* CONFIG_BT_NIMBLE_ENABLED */
#if CONFIG_IDF_TARGET_ESP32
err |= esp_bt_mem_release(ESP_BT_MODE_BTDM);
#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32H2
#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32H2 \
|| CONFIG_IDF_TARGET_ESP32C6
err |= esp_bt_mem_release(ESP_BT_MODE_BLE);
#endif
if (err != ESP_OK) {
Expand Down Expand Up @@ -1020,8 +1021,8 @@ esp_err_t start(event_callback_t callback, intptr_t callback_arg)
return ESP_ERR_INVALID_STATE;
}
esp_err_t err = esp_event_loop_create_default();
// In case create event loop returns ESP_ERR_INVALID_STATE it is not necessary to fail startup

// In case create event loop returns ESP_ERR_INVALID_STATE it is not necessary to fail startup
// as of it means that default event loop is already initialized and no additional actions should be done.
if (err != ESP_OK && err != ESP_ERR_INVALID_STATE) {
ESP_LOGE(TAG, "Error create default event loop");
Expand Down Expand Up @@ -2040,7 +2041,7 @@ uint16_t get_count(node_t *node)
ESP_LOGE(TAG, "Node cannot be NULL");
return 0;
}
uint16_t count = 0;
uint16_t count = 0;
endpoint_t *endpoint = get_first(node);
while (endpoint) {
count++;
Expand Down
4 changes: 2 additions & 2 deletions examples/generic_switch/sdkconfig.defaults.esp32c6
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=y

# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y

# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
CONFIG_LWIP_IPV6_AUTOCONFIG=y

# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
Expand Down
4 changes: 2 additions & 2 deletions examples/light/sdkconfig.defaults.esp32c6
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=y

# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y

# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
CONFIG_LWIP_IPV6_AUTOCONFIG=y

# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
Expand Down
4 changes: 2 additions & 2 deletions examples/light_switch/sdkconfig.defaults.esp32c6
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=y

# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y

# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
CONFIG_LWIP_IPV6_AUTOCONFIG=y

# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
Expand Down
4 changes: 2 additions & 2 deletions examples/refrigerator/sdkconfig.defaults.esp32c6
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=y

# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y

# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
CONFIG_LWIP_IPV6_AUTOCONFIG=y

# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
Expand Down
4 changes: 2 additions & 2 deletions examples/room_air_conditioner/sdkconfig.defaults.esp32c6
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=n
CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING=y

# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y

# Disable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=n
CONFIG_LWIP_IPV6_AUTOCONFIG=y

# Use a custom partition table
CONFIG_PARTITION_TABLE_CUSTOM=y
Expand Down

0 comments on commit 1977e50

Please sign in to comment.