feat(bt/bluedroid): Added API to get local device name

This commit is contained in:
Jin Cheng
2023-12-05 14:07:53 +08:00
parent 25fcb2de2d
commit a3f68aef8a
28 changed files with 254 additions and 26 deletions
@@ -13,6 +13,7 @@
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp_bt_device.h"
#include "esp_hid_gap.h"
static const char *TAG = "ESP_HID_GAP";
@@ -677,7 +678,7 @@ esp_err_t esp_hid_ble_gap_adv_init(uint16_t appearance, const char *device_name)
return ret;
}
if ((ret = esp_ble_gap_set_device_name(device_name)) != ESP_OK) {
if ((ret = esp_bt_dev_set_device_name(device_name)) != ESP_OK) {
ESP_LOGE(TAG, "GAP set_device_name failed: %d", ret);
return ret;
}