gap: new gap_set_scan_params allows to specify scanning filter policy

This commit is contained in:
Matthias Ringwald 2020-08-17 15:46:16 +02:00
parent a3b69fde2a
commit a7a719e99a

View File

@ -4942,13 +4942,18 @@ void gap_stop_scan(void){
hci_run();
}
void gap_set_scan_parameters(uint8_t scan_type, uint16_t scan_interval, uint16_t scan_window){
hci_stack->le_scan_type = scan_type;
hci_stack->le_scan_interval = scan_interval;
hci_stack->le_scan_window = 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_filter_policy = scanning_filter_policy;
hci_stack->le_scan_interval = scan_interval;
hci_stack->le_scan_window = scan_window;
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){
hci_connection_t * conn = hci_connection_for_bd_addr_and_type(addr, addr_type);
if (!conn){