Component/bt: add new param for update_whitelist()

This commit is contained in:
zhiweijian
2019-03-14 14:03:36 +08:00
committed by bot
parent 69b58f1e9c
commit c0bdea6aae
14 changed files with 90 additions and 24 deletions
@@ -112,6 +112,12 @@ typedef enum {
BLE_ADDR_TYPE_RPA_RANDOM = 0x03,
} esp_ble_addr_type_t;
/// white list address type
typedef enum {
BLE_WL_ADDR_TYPE_PUBLIC = 0x00,
BLE_WL_ADDR_TYPE_RANDOM = 0x01,
} esp_ble_wl_addr_type_t;
/// Used to exchange the encryption key in the init key & response key
#define ESP_BLE_ENC_KEY_MASK (1 << 0) /* relate to BTM_BLE_ENC_KEY_MASK in stack/btm_api.h */
/// Used to exchange the IRK key in the init key & response key
@@ -932,12 +932,13 @@ esp_err_t esp_ble_gap_config_local_icon (uint16_t icon);
*
* @param[in] add_remove: the value is true if added the ble device to the white list, and false remove to the white list.
* @param[in] remote_bda: the remote device address add/remove from the white list.
* @param[in] wl_addr_type: whitelist address type
* @return
* - ESP_OK : success
* - other : failed
*
*/
esp_err_t esp_ble_gap_update_whitelist(bool add_remove, esp_bd_addr_t remote_bda);
esp_err_t esp_ble_gap_update_whitelist(bool add_remove, esp_bd_addr_t remote_bda, esp_ble_wl_addr_type_t wl_addr_type);
/**
* @brief Get the whitelist size in the controller