]> granicus.if.org Git - esp-idf/commitdiff
component/bt: Fix ble compile error when close the SMP module.
authoryulong <huangyulong@espressif.com>
Wed, 15 Nov 2017 13:13:12 +0000 (21:13 +0800)
committeryulong <huangyulong@espressif.com>
Wed, 15 Nov 2017 13:13:12 +0000 (21:13 +0800)
components/bt/bluedroid/api/esp_gap_ble_api.c
components/bt/bluedroid/btc/core/btc_dm.c

index 6b4ba68018231ff92afb9f14aa01117a48fecd6b..3846cb8775583f9036a038849f5c2a9f210e367b 100644 (file)
@@ -262,7 +262,7 @@ esp_err_t esp_ble_gap_config_scan_rsp_data_raw(uint8_t *raw_data, uint32_t raw_d
 
 }
 
-
+#if (SMP_INCLUDED)
 esp_err_t esp_ble_gap_set_security_param(esp_ble_sm_param_t param_type,
         void *value, uint8_t len)
 {
@@ -392,6 +392,7 @@ esp_err_t esp_ble_get_bond_device_list(int *dev_num, esp_ble_bond_dev_t *dev_lis
 
     return (ret == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
 }
+#endif /* #if (SMP_INCLUDED) */
 
 esp_err_t esp_ble_gap_disconnect(esp_bd_addr_t remote_device)
 {
index 8699c0d6d65040ba99b77ef15316f630efd987f3..bb35315f24b4e631c98e3dc1458f6256c304d668 100644 (file)
@@ -460,6 +460,7 @@ void btc_dm_sec_cb_handler(btc_msg_t *msg)
     case BTA_DM_SP_KEY_NOTIF_EVT:
         break;
     case BTA_DM_DEV_UNPAIRED_EVT: {
+#if (SMP_INCLUDED)
         bt_bdaddr_t bd_addr;
         rsp_app = true;
         LOG_ERROR("BTA_DM_DEV_UNPAIRED_EVT");
@@ -472,6 +473,7 @@ void btc_dm_sec_cb_handler(btc_msg_t *msg)
         ble_msg.act = ESP_GAP_BLE_REMOVE_BOND_DEV_COMPLETE_EVT;
         param.remove_bond_dev_cmpl.status = (p_data->link_down.status == HCI_SUCCESS) ? ESP_BT_STATUS_SUCCESS : ESP_BT_STATUS_FAIL;
         memcpy(param.remove_bond_dev_cmpl.bd_addr, p_data->link_down.bd_addr, sizeof(BD_ADDR));
+#endif /* #if (SMP_INCLUDED) */
         break;
     }
     case BTA_DM_BUSY_LEVEL_EVT: