|
Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
|
Bluetooth subsystem classic core APIs. More...
#include <stdbool.h>#include <string.h>#include <zephyr/sys/util.h>#include <zephyr/net_buf.h>#include <zephyr/bluetooth/addr.h>#include <zephyr/bluetooth/hci_types.h>Go to the source code of this file.
Data Structures | |
| struct | bt_br_discovery_result |
| BR/EDR discovery result structure. More... | |
| struct | bt_br_discovery_param |
| BR/EDR discovery parameters. More... | |
| struct | bt_br_discovery_cb |
| struct | bt_br_oob |
| struct | bt_br_page_scan_param |
| Page scan parameters. More... | |
| struct | bt_br_inquiry_scan_param |
| BR/EDR inquiry scan parameters. More... | |
| struct | bt_br_bond_info |
| Information about a bond with a remote device. More... | |
Macros | |
| #define | BT_BR_EIR_SIZE_MAX 240 |
| Maximum size of Extended Inquiry Response. | |
| #define | BT_BR_SCAN_INTERVAL_MIN 0x0012 |
| Minimum BR/EDR scan interval (0x0012, 11.25 ms, 0.625 ms units). | |
| #define | BT_BR_SCAN_INTERVAL_MAX 0x1000 |
| Maximum BR/EDR scan interval (0x1000, 2.560 s, 0.625 ms units). | |
| #define | BT_BR_SCAN_WINDOW_MIN 0x0011 |
| Minimum BR/EDR scan window (0x0011, 10.625 ms, 0.625 ms units). | |
| #define | BT_BR_SCAN_WINDOW_MAX 0x1000 |
| Maximum BR/EDR scan window (0x1000, 2.560 s, 0.625 ms units). | |
| #define | BT_BR_SCAN_INIT(_interval, _window, _type) |
| Initialize BR Scan parameters. | |
| #define | BT_BR_PAGE_SCAN_PARAM(_interval, _window, _type) |
| Helper to declare BR/EDR page scan parameters inline. | |
| #define | BT_BR_PAGE_SCAN_PARAM_R0 |
| Default page scan parameters for R0. | |
| #define | BT_BR_PAGE_SCAN_PARAM_FAST_R1 |
| Fast page scan parameters for R1. | |
| #define | BT_BR_PAGE_SCAN_PARAM_MEDIUM_R1 |
| Medium page scan parameters for R1. | |
| #define | BT_BR_PAGE_SCAN_PARAM_SLOW_R1 |
| Slow page scan parameters for R1. | |
| #define | BT_BR_PAGE_SCAN_PARAM_FAST_R2 |
| Fast page scan parameters for R2. | |
| #define | BT_BR_PAGE_SCAN_PARAM_SLOW_R2 |
| Slow page scan parameters for R2. | |
| #define | BT_BR_INQUIRY_SCAN_PARAM(_interval, _window, _type) |
| Helper to declare BR/EDR inquiry scan parameters inline. | |
| #define | BT_BR_INQUIRY_SCAN_PARAM_DEFAULT |
| Default inquiry scan parameters. | |
Defined BR/EDR Page Scan Intervals and Windows | |
| #define | BT_BR_PAGE_SCAN_INTERVAL_R0 0x0800 |
| Default page scan interval (R0) (0x0800, 1.280 s, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_WINDOW_R0 0x0800 |
| Default page scan window (R0) (0x0800, 1.280 s, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_FAST_INTERVAL_R1 0x00a0 |
| Fast page scan interval (R1) (0x00a0, 100.0 ms, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_FAST_WINDOW_R1 0x0011 |
| Fast page scan window (R1) (0x0011, 10.625 ms, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_MEDIUM_INTERVAL_R1 0x0800 |
| Medium page scan interval (R1) (0x0800, 1.280 s, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_MEDIUM_WINDOW_R1 0x0011 |
| Medium page scan window (R1) (0x0011, 10.625 ms, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_SLOW_INTERVAL_R1 0x0800 |
| Slow page scan interval (R1) (0x0800, 1.280 s, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_SLOW_WINDOW_R1 0x0011 |
| Slow page scan window (R1) (0x0011, 10.625 ms, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_FAST_INTERVAL_R2 0x1000 |
| Fast page scan interval (R2) (0x1000, 2.560 s, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_FAST_WINDOW_R2 0x0011 |
| Fast page scan window (R2) (0x0011, 10.625 ms, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_SLOW_INTERVAL_R2 0x1000 |
| Slow page scan interval (R2) (0x1000, 2.560 s, 0.625 ms units). | |
| #define | BT_BR_PAGE_SCAN_SLOW_WINDOW_R2 0x0011 |
| Slow page scan window (R2) (0x0011, 10.625 ms, 0.625 ms units). | |
Defined BR Inquiry Scan Intervals and Windows | |
| #define | BT_BR_INQUIRY_SCAN_INTERVAL_DEFAULT 0x1000 |
| Default inquiry scan interval (0x1000, 2.560 s, 0.625 ms units). | |
| #define | BT_BR_INQUIRY_SCAN_WINDOW_DEFAULT 0x0012 |
| Default inquiry scan window (0x0012, 11.25 ms, 0.625 ms units). | |
Typedefs | |
| typedef enum bt_br_conn_req_rsp(* | bt_br_conn_req_func_t) (const bt_addr_t *addr, uint32_t cod) |
| Callback type for incoming BR/EDR connection requests. | |
Enumerations | |
| enum | bt_br_conn_req_rsp { BT_BR_CONN_REQ_ACCEPT_CENTRAL = BT_HCI_ROLE_CENTRAL , BT_BR_CONN_REQ_ACCEPT_PERIPHERAL = BT_HCI_ROLE_PERIPHERAL , BT_BR_CONN_REQ_REJECT_NO_RESOURCES = BT_HCI_ERR_INSUFFICIENT_RESOURCES , BT_BR_CONN_REQ_REJECT_SECURITY = BT_HCI_ERR_INSUFFICIENT_SECURITY , BT_BR_CONN_REQ_REJECT_ADDR = BT_HCI_ERR_BD_ADDR_UNACCEPTABLE } |
| BR/EDR connection request response codes. More... | |
| enum | bt_br_scan_type { BT_BR_SCAN_TYPE_STANDARD = 0 , BT_BR_SCAN_TYPE_INTERLACED = 1 } |
| Page scan type. More... | |
Functions | |
| int | bt_br_discovery_start (const struct bt_br_discovery_param *param, struct bt_br_discovery_result *results, size_t count) |
| Start BR/EDR discovery. | |
| int | bt_br_discovery_stop (void) |
| Stop BR/EDR discovery. | |
| void | bt_br_discovery_cb_register (struct bt_br_discovery_cb *cb) |
| Register discovery packet callbacks. | |
| void | bt_br_discovery_cb_unregister (struct bt_br_discovery_cb *cb) |
| Unregister discovery packet callbacks. | |
| int | bt_br_oob_get_local (struct bt_br_oob *oob) |
| Get BR/EDR local Out Of Band information. | |
| int | bt_br_set_discoverable (bool enable, bool limited) |
| Enable/disable set controller in discoverable state. | |
| int | bt_br_set_connectable (bool enable, bt_br_conn_req_func_t func) |
| Enable/disable set controller in connectable state. | |
| int | bt_br_page_scan_update_param (const struct bt_br_page_scan_param *param) |
| Update BR/EDR page scan parameters. | |
| int | bt_br_inquiry_scan_update_param (const struct bt_br_inquiry_scan_param *param) |
| Update BR/EDR inquiry scan parameters. | |
| int | bt_br_set_class_of_device (uint32_t cod) |
| Set the Class of Device of the local BR/EDR Controller. | |
| int | bt_br_get_class_of_device (uint32_t *cod) |
| Get the Class of Device of the local BR/EDR Controller. | |
| bool | bt_br_bond_exists (const bt_addr_t *addr) |
| Check if a Bluetooth classic device address is bonded. | |
| int | bt_br_unpair (const bt_addr_t *addr) |
| Clear classic pairing information . | |
| void | bt_br_foreach_bond (void(*func)(const struct bt_br_bond_info *info, void *user_data), void *user_data) |
| Iterate through all existing bonds of Classic. | |
Bluetooth subsystem classic core APIs.