Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
classic.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2015-2016 Intel Corporation
7 * Copyright 2024 NXP
8 *
9 * SPDX-License-Identifier: Apache-2.0
10 */
11#ifndef ZEPHYR_INCLUDE_BLUETOOTH_CLASSIC_H_
12#define ZEPHYR_INCLUDE_BLUETOOTH_CLASSIC_H_
13
21#include <stdbool.h>
22#include <string.h>
23
24#include <zephyr/sys/util.h>
25#include <zephyr/net_buf.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
45struct bt_br_discovery_priv {
47 uint16_t clock_offset;
49 uint8_t pscan_rep_mode;
51 uint8_t resolve_state;
52};
53
57 struct bt_br_discovery_priv _priv;
58
61
64
67
70};
71
82
101 struct bt_br_discovery_result *results, size_t count);
102
113
115
121 void (*recv)(const struct bt_br_discovery_result *result);
122
129 size_t count);
130
132};
133
146
155
160
170
188int bt_br_set_discoverable(bool enable, bool limited);
189
202int bt_br_set_connectable(bool enable);
203
210bool bt_br_bond_exists(const bt_addr_t *addr);
211
219int bt_br_unpair(const bt_addr_t *addr);
220
226
233void bt_br_foreach_bond(void (*func)(const struct bt_br_bond_info *info, void *user_data),
234 void *user_data);
235
240#ifdef __cplusplus
241}
242#endif
247#endif /* ZEPHYR_INCLUDE_BLUETOOTH_CLASSIC_H_ */
Bluetooth device address definitions and utilities.
struct result result[2]
Definition errno.c:33
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.
void bt_br_discovery_cb_register(struct bt_br_discovery_cb *cb)
Register discovery packet callbacks.
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.
int bt_br_discovery_stop(void)
Stop BR/EDR discovery.
int bt_br_set_connectable(bool enable)
Enable/disable set controller in connectable state.
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_unpair(const bt_addr_t *addr)
Clear classic pairing information .
bool bt_br_bond_exists(const bt_addr_t *addr)
Check if a Bluetooth classic device address is bonded.
int bt_br_set_discoverable(bool enable, bool limited)
Enable/disable set controller in discoverable state.
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
ZTEST_BMEM int count
Definition main.c:33
static void func(void *arg1, void *arg2, void *arg3)
Definition main.c:26
static const intptr_t user_data[5]
Definition main.c:588
Buffer management.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT8_TYPE__ int8_t
Definition stdint.h:72
Bluetooth Device Address.
Definition addr.h:40
Information about a bond with a remote device.
Definition classic.h:222
bt_addr_t addr
Address of the remote device.
Definition classic.h:224
Definition classic.h:114
void(* timeout)(const struct bt_br_discovery_result *results, size_t count)
The inquiry has stopped after discovery timeout.
Definition classic.h:128
void(* recv)(const struct bt_br_discovery_result *result)
An inquiry response received callback.
Definition classic.h:121
sys_snode_t node
Definition classic.h:131
BR/EDR discovery parameters.
Definition classic.h:73
uint8_t length
Maximum length of the discovery in units of 1.28 seconds.
Definition classic.h:77
bool limited
True if limited discovery procedure is to be used.
Definition classic.h:80
BR/EDR discovery result structure.
Definition classic.h:55
uint8_t eir[240]
Extended Inquiry Response.
Definition classic.h:69
bt_addr_t addr
Remote device address.
Definition classic.h:60
int8_t rssi
RSSI from inquiry.
Definition classic.h:63
uint8_t cod[3]
Class of Device.
Definition classic.h:66
Definition classic.h:156
bt_addr_t addr
BR/EDR address.
Definition classic.h:158
Misc utilities.
static int results[3]
Definition timeout_order.c:16