mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-23 00:39:51 +00:00
gap: add gap_extended_advertising_set_resolvable_private_address_update
This commit is contained in:
parent
027f4677e6
commit
2052d96cc1
@ -670,6 +670,14 @@ void gap_advertisements_enable(int enabled);
|
||||
*/
|
||||
void gap_scan_response_set_data(uint8_t scan_response_data_length, uint8_t * scan_response_data);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Set update interval for resolvable private addresses generated by the Controller
|
||||
* @param update_s timeout for updates in seconds
|
||||
* @return status
|
||||
*/
|
||||
uint8_t gap_extended_advertising_set_resolvable_private_address_update(uint16_t update_s);
|
||||
|
||||
/**
|
||||
* @brief Provide storage for new advertising set and setup on Controller
|
||||
* @param storage to use by stack, needs to stay valid until adv set is removed with gap_extended_advertising_remove
|
||||
|
15
src/hci.c
15
src/hci.c
@ -5882,6 +5882,15 @@ static bool hci_run_general_gap_le(void){
|
||||
|
||||
btstack_linked_list_iterator_t lit;
|
||||
|
||||
#ifdef ENABLE_LE_EXTENDED_ADVERTISING
|
||||
if (hci_stack->le_resolvable_private_address_update_s > 0){
|
||||
uint16_t update_s = hci_stack->le_resolvable_private_address_update_s;
|
||||
hci_stack->le_resolvable_private_address_update_s = 0;
|
||||
hci_send_cmd(&hci_le_set_resolvable_private_address_timeout, update_s);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Phase 1: collect what to stop
|
||||
|
||||
#ifdef ENABLE_LE_CENTRAL
|
||||
@ -8424,6 +8433,12 @@ static le_advertising_set_t * hci_advertising_set_for_handle(uint8_t advertising
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint8_t gap_extended_advertising_set_resolvable_private_address_update(uint16_t update_s){
|
||||
hci_stack->le_resolvable_private_address_update_s = update_s;
|
||||
hci_run();
|
||||
return ERROR_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
uint8_t gap_extended_advertising_setup(le_advertising_set_t * storage, const le_extended_advertising_parameters_t * advertising_parameters, uint8_t * out_advertising_handle){
|
||||
// find free advertisement handle
|
||||
uint8_t advertisement_handle;
|
||||
|
Loading…
x
Reference in New Issue
Block a user