hci.c (6afff83006dd177d83886f7e09a195eff45ba40b) | hci.c (f50ed5accd466e0382c16bf576fa99242f1de3ed) |
---|---|
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 --- 1716 unchanged lines hidden (view full) --- 1725 return; 1726 } 1727 // send write scan activity 1728 if ((hci_stack->gap_tasks_classic & GAP_TASK_WRITE_INQUIRY_SCAN_ACTIVITY) != 0) { 1729 hci_stack->gap_tasks_classic &= ~GAP_TASK_WRITE_INQUIRY_SCAN_ACTIVITY; 1730 hci_send_cmd(&hci_write_inquiry_scan_activity, hci_stack->inquiry_scan_interval, hci_stack->inquiry_scan_window); 1731 return; 1732 } | 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 --- 1716 unchanged lines hidden (view full) --- 1725 return; 1726 } 1727 // send write scan activity 1728 if ((hci_stack->gap_tasks_classic & GAP_TASK_WRITE_INQUIRY_SCAN_ACTIVITY) != 0) { 1729 hci_stack->gap_tasks_classic &= ~GAP_TASK_WRITE_INQUIRY_SCAN_ACTIVITY; 1730 hci_send_cmd(&hci_write_inquiry_scan_activity, hci_stack->inquiry_scan_interval, hci_stack->inquiry_scan_window); 1731 return; 1732 } |
1733 // send write inquiry transmit power level 1734 if ((hci_stack->gap_tasks_classic & GAP_TASK_WRITE_INQUIRY_TX_POWER_LEVEL) != 0) { 1735 hci_stack->gap_tasks_classic &= ~GAP_TASK_WRITE_INQUIRY_TX_POWER_LEVEL; 1736 hci_send_cmd(&hci_write_inquiry_transmit_power_level, hci_stack->inquiry_tx_power_level); 1737 return; 1738 } |
|
1733} 1734#endif 1735 1736#ifndef HAVE_HOST_CONTROLLER_API 1737 1738static uint32_t hci_transport_uart_get_main_baud_rate(void){ 1739 if (!hci_stack->config) return 0; 1740 uint32_t baud_rate = ((hci_transport_config_uart_t *)hci_stack->config)->baudrate_main; --- 7173 unchanged lines hidden (view full) --- 8914 8915void gap_inquiry_set_scan_activity(uint16_t inquiry_scan_interval, uint16_t inquiry_scan_window){ 8916 hci_stack->inquiry_scan_interval = inquiry_scan_interval; 8917 hci_stack->inquiry_scan_window = inquiry_scan_window; 8918 hci_stack->gap_tasks_classic |= GAP_TASK_WRITE_INQUIRY_SCAN_ACTIVITY; 8919 hci_run(); 8920} 8921 | 1739} 1740#endif 1741 1742#ifndef HAVE_HOST_CONTROLLER_API 1743 1744static uint32_t hci_transport_uart_get_main_baud_rate(void){ 1745 if (!hci_stack->config) return 0; 1746 uint32_t baud_rate = ((hci_transport_config_uart_t *)hci_stack->config)->baudrate_main; --- 7173 unchanged lines hidden (view full) --- 8920 8921void gap_inquiry_set_scan_activity(uint16_t inquiry_scan_interval, uint16_t inquiry_scan_window){ 8922 hci_stack->inquiry_scan_interval = inquiry_scan_interval; 8923 hci_stack->inquiry_scan_window = inquiry_scan_window; 8924 hci_stack->gap_tasks_classic |= GAP_TASK_WRITE_INQUIRY_SCAN_ACTIVITY; 8925 hci_run(); 8926} 8927 |
8928void gap_inquiry_set_transmit_power_level(int8_t tx_power) 8929{ 8930 hci_stack->inquiry_tx_power_level = tx_power; 8931 hci_stack->gap_tasks_classic |= GAP_TASK_WRITE_INQUIRY_TX_POWER_LEVEL; 8932 hci_run(); 8933} |
|
8922 | 8934 |
8935 |
|
8923/** 8924 * @brief Remote Name Request 8925 * @param addr 8926 * @param page_scan_repetition_mode 8927 * @param clock_offset only used when bit 15 is set 8928 * @events: HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 8929 */ 8930int gap_remote_name_request(const bd_addr_t addr, uint8_t page_scan_repetition_mode, uint16_t clock_offset){ --- 1357 unchanged lines hidden --- | 8936/** 8937 * @brief Remote Name Request 8938 * @param addr 8939 * @param page_scan_repetition_mode 8940 * @param clock_offset only used when bit 15 is set 8941 * @events: HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 8942 */ 8943int gap_remote_name_request(const bd_addr_t addr, uint8_t page_scan_repetition_mode, uint16_t clock_offset){ --- 1357 unchanged lines hidden --- |