mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-06 05:14:45 +00:00
feat(nimble): Support for getting the currently using local IRK
This commit is contained in:
@@ -4143,6 +4143,16 @@ int ble_gap_rd_local_resolv_addr(uint8_t peer_addr_type, const ble_addr_t *peer_
|
||||
uint8_t *out_addr);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Read local IRK command
|
||||
*
|
||||
* @param out_irk Local Identity Resolving Key received from the Host
|
||||
*
|
||||
* @return 0 on success; BLE_HS_EINVAL if @param out_irk is NULL
|
||||
*
|
||||
*/
|
||||
int ble_gap_read_local_irk(uint8_t * out_irk);
|
||||
|
||||
#if MYNEWT_VAL(BLE_CHANNEL_SOUNDING)
|
||||
/**
|
||||
* Set or clear a bit controlled by the host in the link layer featureSet
|
||||
|
||||
@@ -10165,9 +10165,23 @@ ble_gap_rd_local_resolv_addr(uint8_t peer_addr_type, const ble_addr_t *peer_addr
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int
|
||||
ble_gap_read_local_irk(uint8_t * out_irk)
|
||||
{
|
||||
const uint8_t * local_irk;
|
||||
|
||||
if (out_irk == NULL) {
|
||||
return BLE_HS_EINVAL;
|
||||
}
|
||||
|
||||
ble_hs_pvcy_our_irk(&local_irk);
|
||||
memcpy(out_irk, local_irk, 16);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if MYNEWT_VAL(BLE_HCI_VS)
|
||||
#if MYNEWT_VAL(BLE_POWER_CONTROL)
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user