Examples: Demonstrate the usage of esp_err_to_name

This commit is contained in:
Roland Dobai
2018-02-22 14:48:53 +01:00
parent f891eac827
commit 27a63c492f
31 changed files with 156 additions and 145 deletions

View File

@@ -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;
}