hci.c (dd1f98b4e81ec79bc5547c3a203806c168df8ee0) | hci.c (100da3552aeb98f42b6e16f780773d2d7e8fa2ee) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 8788 unchanged lines hidden (view full) --- 8797 conn->le_phy_update_phy_options = (uint8_t) phy_options; 8798 8799 hci_run(); 8800 8801 return 0; 8802} 8803 8804static uint8_t hci_whitelist_add(bd_addr_type_t address_type, const bd_addr_t address){ | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 8788 unchanged lines hidden (view full) --- 8797 conn->le_phy_update_phy_options = (uint8_t) phy_options; 8798 8799 hci_run(); 8800 8801 return 0; 8802} 8803 8804static uint8_t hci_whitelist_add(bd_addr_type_t address_type, const bd_addr_t address){ |
8805 8806#if !defined(HAVE_MALLOC) && (!defined(MAX_NR_WHITELIST_ENTRIES) || (MAX_NR_WHITELIST_ENTRIES == 0)) 8807 // incorrect configuration: 8808 // - as MAX_NR_WHITELIST_ENTRIES is not defined or zero this function always fails 8809 // - please set MAX_NR_WHITELIST_ENTRIES in btstack_config.h 8810 btstack_assert(false); 8811#endif 8812 |
|
8805 // check if already in list 8806 btstack_linked_list_iterator_t it; 8807 btstack_linked_list_iterator_init(&it, &hci_stack->le_whitelist); 8808 while (btstack_linked_list_iterator_has_next(&it)) { 8809 whitelist_entry_t *entry = (whitelist_entry_t *) btstack_linked_list_iterator_next(&it); 8810 if (entry->address_type != address_type) { 8811 continue; 8812 } --- 797 unchanged lines hidden (view full) --- 9610} 9611#endif 9612 9613#ifdef ENABLE_BLE 9614#ifdef ENABLE_LE_CENTRAL 9615#ifdef ENABLE_LE_EXTENDED_ADVERTISING 9616 9617static uint8_t hci_periodic_advertiser_list_add(bd_addr_type_t address_type, const bd_addr_t address, uint8_t advertising_sid){ | 8813 // check if already in list 8814 btstack_linked_list_iterator_t it; 8815 btstack_linked_list_iterator_init(&it, &hci_stack->le_whitelist); 8816 while (btstack_linked_list_iterator_has_next(&it)) { 8817 whitelist_entry_t *entry = (whitelist_entry_t *) btstack_linked_list_iterator_next(&it); 8818 if (entry->address_type != address_type) { 8819 continue; 8820 } --- 797 unchanged lines hidden (view full) --- 9618} 9619#endif 9620 9621#ifdef ENABLE_BLE 9622#ifdef ENABLE_LE_CENTRAL 9623#ifdef ENABLE_LE_EXTENDED_ADVERTISING 9624 9625static uint8_t hci_periodic_advertiser_list_add(bd_addr_type_t address_type, const bd_addr_t address, uint8_t advertising_sid){ |
9626 9627#if !defined(HAVE_MALLOC) && (!defined(MAX_NR_PERIODIC_ADVERTISER_LIST_ENTRIES) || (MAX_NR_PERIODIC_ADVERTISER_LIST_ENTRIES == 0)) 9628 // incorrect configuration: 9629 // - as MAX_NR_PERIODIC_ADVERTISER_LIST_ENTRIES is not defined or zero this function always fails 9630 // - please set MAX_NR_PERIODIC_ADVERTISER_LIST_ENTRIES in btstack_config.h 9631 btstack_assert(false); 9632#endif 9633 |
|
9618 // check if already in list 9619 btstack_linked_list_iterator_t it; 9620 btstack_linked_list_iterator_init(&it, &hci_stack->le_periodic_advertiser_list); 9621 while (btstack_linked_list_iterator_has_next(&it)) { 9622 periodic_advertiser_list_entry_t *entry = (periodic_advertiser_list_entry_t *) btstack_linked_list_iterator_next(&it); 9623 if (entry->sid != advertising_sid) { 9624 continue; 9625 } --- 853 unchanged lines hidden --- | 9634 // check if already in list 9635 btstack_linked_list_iterator_t it; 9636 btstack_linked_list_iterator_init(&it, &hci_stack->le_periodic_advertiser_list); 9637 while (btstack_linked_list_iterator_has_next(&it)) { 9638 periodic_advertiser_list_entry_t *entry = (periodic_advertiser_list_entry_t *) btstack_linked_list_iterator_next(&it); 9639 if (entry->sid != advertising_sid) { 9640 continue; 9641 } --- 853 unchanged lines hidden --- |