mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-21 08:49:25 +00:00
Examples: Demonstrate the usage of esp_err_to_name
This commit is contained in:
@@ -223,17 +223,17 @@ void app_main()
|
||||
|
||||
ret = esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
|
||||
if (ret) {
|
||||
ESP_LOGI(tag, "Bluetooth controller release classic bt memory failed");
|
||||
ESP_LOGI(tag, "Bluetooth controller release classic bt memory failed: %s", esp_err_to_name(ret));
|
||||
return;
|
||||
}
|
||||
|
||||
if (esp_bt_controller_init(&bt_cfg) != ESP_OK) {
|
||||
ESP_LOGI(tag, "Bluetooth controller initialize failed");
|
||||
if ((ret = esp_bt_controller_init(&bt_cfg)) != ESP_OK) {
|
||||
ESP_LOGI(tag, "Bluetooth controller initialize failed: %s", esp_err_to_name(ret));
|
||||
return;
|
||||
}
|
||||
|
||||
if (esp_bt_controller_enable(ESP_BT_MODE_BLE) != ESP_OK) {
|
||||
ESP_LOGI(tag, "Bluetooth controller enable failed");
|
||||
if ((ret = esp_bt_controller_enable(ESP_BT_MODE_BLE)) != ESP_OK) {
|
||||
ESP_LOGI(tag, "Bluetooth controller enable failed: %s", esp_err_to_name(ret));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user