mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-03 20:54:18 +00:00
hci: make hci_le_set_own_address_type available for central-only builds
This commit is contained in:
parent
d3365dbef3
commit
06e5cf96d4
23
src/hci.c
23
src/hci.c
@ -3581,17 +3581,6 @@ uint8_t gap_connect_cancel(void){
|
||||
}
|
||||
#endif
|
||||
|
||||
void hci_le_set_own_address_type(uint8_t own_address_type){
|
||||
log_info("hci_le_set_own_address_type: old %u, new %u", hci_stack->le_own_addr_type, own_address_type);
|
||||
if (own_address_type == hci_stack->le_own_addr_type) return;
|
||||
hci_stack->le_own_addr_type = own_address_type;
|
||||
|
||||
// update advertisement parameters, too
|
||||
hci_stack->le_advertisements_todo |= LE_ADVERTISEMENT_TASKS_SET_PARAMS;
|
||||
gap_advertisments_changed();
|
||||
// note: we don't update scan parameters or modify ongoing connection attempts
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Updates the connection parameters for a given LE connection
|
||||
* @param handle
|
||||
@ -3716,6 +3705,18 @@ void gap_advertisements_enable(int enabled){
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void hci_le_set_own_address_type(uint8_t own_address_type){
|
||||
log_info("hci_le_set_own_address_type: old %u, new %u", hci_stack->le_own_addr_type, own_address_type);
|
||||
if (own_address_type == hci_stack->le_own_addr_type) return;
|
||||
hci_stack->le_own_addr_type = own_address_type;
|
||||
|
||||
// update advertisement parameters, too
|
||||
hci_stack->le_advertisements_todo |= LE_ADVERTISEMENT_TASKS_SET_PARAMS;
|
||||
gap_advertisments_changed();
|
||||
// note: we don't update scan parameters or modify ongoing connection attempts
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
uint8_t gap_disconnect(hci_con_handle_t handle){
|
||||
|
Loading…
x
Reference in New Issue
Block a user