Skip to content

Commit

Permalink
[ESP32] Add esp32c6 to release bt memory after commissioned (#31476)
Browse files Browse the repository at this point in the history
* add esp32c6 ble released after commissioned

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed May 14, 2024
1 parent 9858fe5 commit 3983383
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/all-clusters-app/esp32/sdkconfig.defaults.esp32c6
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,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

# Disable OpenThread
CONFIG_OPENTHREAD_ENABLED=n

# 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
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,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

# Disable OpenThread
CONFIG_OPENTHREAD_ENABLED=n

# 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/lighting-app/esp32/sdkconfig.defaults.esp32c6
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,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

# Disable OpenThread
CONFIG_OPENTHREAD_ENABLED=n

# 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/lock-app/esp32/sdkconfig.defaults.esp32c6
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,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

# Disable OpenThread
CONFIG_OPENTHREAD_ENABLED=n

# 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
3 changes: 2 additions & 1 deletion examples/platform/esp32/common/Esp32AppServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ void Esp32AppServer::DeInitBLEIfCommissioned(void)

#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

Expand Down

0 comments on commit 3983383

Please sign in to comment.