hci.c (3176c8960745732744d7ee0d964ce2ef788f1e57) | hci.c (c0c8a8293ce46e8f8082cf05b50606cfd6b3ded6) |
---|---|
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 --- 1345 unchanged lines hidden (view full) --- 1354 return; 1355 } 1356 // send scan enable 1357 if ((hci_stack->gap_tasks & GAP_TASK_WRITE_SCAN_ENABLE) != 0) { 1358 hci_stack->gap_tasks &= ~GAP_TASK_WRITE_SCAN_ENABLE; 1359 hci_send_cmd(&hci_write_scan_enable, hci_stack->new_scan_enable_value); 1360 return; 1361 } | 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 --- 1345 unchanged lines hidden (view full) --- 1354 return; 1355 } 1356 // send scan enable 1357 if ((hci_stack->gap_tasks & GAP_TASK_WRITE_SCAN_ENABLE) != 0) { 1358 hci_stack->gap_tasks &= ~GAP_TASK_WRITE_SCAN_ENABLE; 1359 hci_send_cmd(&hci_write_scan_enable, hci_stack->new_scan_enable_value); 1360 return; 1361 } |
1362 // send write scan activity 1363 if ((hci_stack->gap_tasks & GAP_TASK_WRITE_INQUIRY_SCAN_ACTIVITY) != 0) { 1364 hci_stack->gap_tasks &= ~GAP_TASK_WRITE_INQUIRY_SCAN_ACTIVITY; 1365 hci_send_cmd(&hci_write_inquiry_scan_activity, hci_stack->inquiry_scan_interval, hci_stack->inquiry_scan_window); 1366 return; 1367 } |
|
1362} 1363#endif 1364 1365#ifndef HAVE_HOST_CONTROLLER_API 1366 1367static uint32_t hci_transport_uart_get_main_baud_rate(void){ 1368 if (!hci_stack->config) return 0; 1369 uint32_t baud_rate = ((hci_transport_config_uart_t *)hci_stack->config)->baudrate_main; --- 5023 unchanged lines hidden (view full) --- 6393 hci_run(); 6394 return 0; 6395} 6396 6397void gap_inquiry_set_lap(uint32_t lap){ 6398 hci_stack->inquiry_lap = lap; 6399} 6400 | 1368} 1369#endif 1370 1371#ifndef HAVE_HOST_CONTROLLER_API 1372 1373static uint32_t hci_transport_uart_get_main_baud_rate(void){ 1374 if (!hci_stack->config) return 0; 1375 uint32_t baud_rate = ((hci_transport_config_uart_t *)hci_stack->config)->baudrate_main; --- 5023 unchanged lines hidden (view full) --- 6399 hci_run(); 6400 return 0; 6401} 6402 6403void gap_inquiry_set_lap(uint32_t lap){ 6404 hci_stack->inquiry_lap = lap; 6405} 6406 |
6407void gap_inquiry_set_activity(uint16_t inquiry_scan_interval, uint16_t inquiry_scan_window){ 6408 hci_stack->inquiry_scan_interval = inquiry_scan_interval; 6409 hci_stack->inquiry_scan_window = inquiry_scan_window; 6410 hci_stack->gap_tasks |= GAP_TASK_WRITE_INQUIRY_SCAN_ACTIVITY; 6411 hci_run(); 6412} |
|
6401 | 6413 |
6414 |
|
6402/** 6403 * @brief Remote Name Request 6404 * @param addr 6405 * @param page_scan_repetition_mode 6406 * @param clock_offset only used when bit 15 is set 6407 * @events: HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 6408 */ 6409int gap_remote_name_request(const bd_addr_t addr, uint8_t page_scan_repetition_mode, uint16_t clock_offset){ --- 562 unchanged lines hidden --- | 6415/** 6416 * @brief Remote Name Request 6417 * @param addr 6418 * @param page_scan_repetition_mode 6419 * @param clock_offset only used when bit 15 is set 6420 * @events: HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 6421 */ 6422int gap_remote_name_request(const bd_addr_t addr, uint8_t page_scan_repetition_mode, uint16_t clock_offset){ --- 562 unchanged lines hidden --- |