add address field to read_rmt_name_param

This commit is contained in:
keymoon
2022-05-26 23:24:56 +09:00
parent 179ea878c7
commit 2c4b135be6
2 changed files with 2 additions and 0 deletions

View File

@@ -337,6 +337,7 @@ typedef union {
* @brief ESP_BT_GAP_READ_REMOTE_NAME_EVT
*/
struct read_rmt_name_param {
esp_bd_addr_t bda; /*!< remote bluetooth device address*/
esp_bt_status_t stat; /*!< read Remote Name status */
uint8_t rmt_name[ESP_BT_GAP_MAX_BDNAME_LEN + 1]; /*!< Remote device name */
} read_rmt_name; /*!< read Remote Name parameter struct */

View File

@@ -735,6 +735,7 @@ static void btc_gap_bt_read_remote_name_cmpl_callback(void *p_data)
msg.pid = BTC_PID_GAP_BT;
msg.act = BTC_GAP_BT_READ_REMOTE_NAME_EVT;
memcpy(param.read_rmt_name.bda,result->bd_addr,BD_ADDR_LEN);
param.read_rmt_name.stat = btc_btm_status_to_esp_status(result->status);
memcpy(param.read_rmt_name.rmt_name,result->remote_bd_name,ESP_BT_GAP_MAX_BDNAME_LEN);