hci: make hci_le_set_own_address_type available for central-only builds

This commit is contained in:
Matthias Ringwald 2017-01-18 12:35:50 +01:00
parent d3365dbef3
commit 06e5cf96d4

View File

@ -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){