fix build

This commit is contained in:
Matthias Ringwald 2021-06-11 13:03:56 +02:00
parent e06798b61b
commit f58736741d
3 changed files with 13 additions and 7 deletions

View File

@ -1100,7 +1100,7 @@ static int hci_le_supported(void){
#ifdef ENABLE_BLE
static void hci_get_own_address_for_addr_type(bd_addr_type_t own_addr_type, bd_addr_t own_addr){
static void hci_get_own_address_for_addr_type(uint8_t own_addr_type, bd_addr_t own_addr){
if (own_addr_type == BD_ADDR_TYPE_LE_PUBLIC){
(void)memcpy(own_addr, hci_stack->local_bd_addr, 6);
} else {

View File

@ -993,8 +993,8 @@ typedef struct {
uint16_t le_maximum_ce_length;
uint16_t le_connection_scan_interval;
uint16_t le_connection_scan_window;
bd_addr_type_t le_connection_own_addr_type;
bd_addr_t le_connection_own_address;
uint8_t le_connection_own_addr_type;
bd_addr_t le_connection_own_address;
#endif
le_connection_parameter_range_t le_connection_parameter_range;
@ -1018,8 +1018,8 @@ typedef struct {
uint8_t le_advertisements_channel_map;
uint8_t le_advertisements_filter_policy;
bd_addr_t le_advertisements_direct_address;
bd_addr_type_t le_advertisements_own_addr_type;
bd_addr_t le_advertisements_own_address;
uint8_t le_advertisements_own_addr_type;
bd_addr_t le_advertisements_own_address;
uint8_t le_max_number_peripheral_connections;
#endif

View File

@ -152,12 +152,18 @@ void hci_connections_get_iterator(btstack_linked_list_iterator_t *it){
btstack_linked_list_iterator_init(it, &connections);
}
// get addr type and address used in advertisement packets
// get addr type and address used in different contexts
void gap_le_get_own_address(uint8_t * addr_type, bd_addr_t addr){
static uint8_t dummy[] = { 0x00, 0x1b, 0xdc, 0x07, 0x32, 0xef };
*addr_type = 0;
uint8_t dummy[] = { 0x00, 0x1b, 0xdc, 0x07, 0x32, 0xef };
memcpy(addr, dummy, 6);
}
void gap_le_get_own_advertisements_address(uint8_t * addr_type, bd_addr_t addr){
gap_le_get_own_address(addr_type, addr);
}
void gap_le_get_own_connection_address(uint8_t * addr_type, bd_addr_t addr){
gap_le_get_own_address(addr_type, addr);
}
void hci_le_advertisements_set_params(uint16_t adv_int_min, uint16_t adv_int_max, uint8_t adv_type,
uint8_t direct_address_typ, bd_addr_t direct_address, uint8_t channel_map, uint8_t filter_policy) {