mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-30 15:32:41 +00:00
gap: new gap_set_scan_params allows to specify scanning filter policy
This commit is contained in:
parent
a3b69fde2a
commit
a7a719e99a
13
src/hci.c
13
src/hci.c
@ -4942,13 +4942,18 @@ void gap_stop_scan(void){
|
|||||||
hci_run();
|
hci_run();
|
||||||
}
|
}
|
||||||
|
|
||||||
void gap_set_scan_parameters(uint8_t scan_type, uint16_t scan_interval, uint16_t scan_window){
|
void gap_set_scan_params(uint8_t scan_type, uint16_t scan_interval, uint16_t scan_window, uint8_t scanning_filter_policy){
|
||||||
hci_stack->le_scan_type = scan_type;
|
hci_stack->le_scan_type = scan_type;
|
||||||
hci_stack->le_scan_interval = scan_interval;
|
hci_stack->le_scan_filter_policy = scanning_filter_policy;
|
||||||
hci_stack->le_scan_window = scan_window;
|
hci_stack->le_scan_interval = scan_interval;
|
||||||
|
hci_stack->le_scan_window = scan_window;
|
||||||
hci_run();
|
hci_run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gap_set_scan_parameters(uint8_t scan_type, uint16_t scan_interval, uint16_t scan_window){
|
||||||
|
gap_set_scan_params(scan_type, scan_interval, scan_window, 0);
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t gap_connect(bd_addr_t addr, bd_addr_type_t addr_type){
|
uint8_t gap_connect(bd_addr_t addr, bd_addr_type_t addr_type){
|
||||||
hci_connection_t * conn = hci_connection_for_bd_addr_and_type(addr, addr_type);
|
hci_connection_t * conn = hci_connection_for_bd_addr_and_type(addr, addr_type);
|
||||||
if (!conn){
|
if (!conn){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user