mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-04 02:50:58 +02:00
component/bt: support BLE Authorization
This commit is contained in:
@@ -749,3 +749,14 @@ esp_err_t esp_gap_ble_set_channels(esp_gap_ble_channels channels)
|
||||
arg.set_channels.channels[ESP_GAP_BLE_CHANNELS_LEN -1] &= 0x1F;
|
||||
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gap_args_t), NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
|
||||
}
|
||||
|
||||
esp_err_t esp_gap_ble_set_authorization(esp_bd_addr_t bd_addr, bool authorize)
|
||||
{
|
||||
if (!bd_addr) {
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
if (BTM_Ble_Authorization(bd_addr, authorize)) {
|
||||
return ESP_OK;
|
||||
}
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user