mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-16 07:20:52 +00:00
hci: add gap_set_peer_privacy_mode
This commit is contained in:
parent
7115cf4e0a
commit
c3d19a303e
@ -1385,6 +1385,13 @@ void gap_delete_bonding(bd_addr_type_t address_type, bd_addr_t address);
|
||||
* LE Privacy 1.2 - requires support by Controller and ENABLE_LE_RESOLVING_LIST to be defined
|
||||
*/
|
||||
|
||||
/**
|
||||
* Set Privacy Mode for use in Resolving List. Default: LE_PRIVACY_MODE_DEVICE
|
||||
* @note Only applies for new devices added to resolving list, please call before startup
|
||||
* @param privacy_mode
|
||||
*/
|
||||
void gap_set_peer_privacy_mode(le_privacy_mode_t privacy_mode );
|
||||
|
||||
/**
|
||||
* @brief Load LE Device DB entries into Controller Resolving List to allow filtering on
|
||||
* bonded devies with resolvable private addresses
|
||||
|
@ -4604,6 +4604,10 @@ void hci_init(const hci_transport_t *transport, const void *config){
|
||||
hci_stack->iso_packets_to_queue = 1;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_LE_PRIVACY_ADDRESS_RESOLUTION
|
||||
hci_stack->le_privacy_mode = LE_PRIVACY_MODE_DEVICE;
|
||||
#endif
|
||||
|
||||
hci_state_reset();
|
||||
}
|
||||
|
||||
@ -9117,6 +9121,10 @@ uint8_t gap_load_resolving_list_from_le_device_db(void){
|
||||
}
|
||||
return ERROR_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
void gap_set_peer_privacy_mode(le_privacy_mode_t privacy_mode ){
|
||||
hci_stack->le_privacy_mode = privacy_mode;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_BLE
|
||||
|
@ -1247,6 +1247,7 @@ typedef struct {
|
||||
|
||||
// LE Resolving List
|
||||
#ifdef ENABLE_LE_PRIVACY_ADDRESS_RESOLUTION
|
||||
le_privacy_mode_t le_privacy_mode;
|
||||
le_resolving_list_state_t le_resolving_list_state;
|
||||
uint16_t le_resolving_list_size;
|
||||
uint8_t le_resolving_list_add_entries[(MAX_NUM_RESOLVING_LIST_ENTRIES + 7) / 8];
|
||||
|
Loading…
x
Reference in New Issue
Block a user