Bluetooth: conn: Make bt_conn_lookup_addr_br() public
Move the declaration of the function `bt_conn_lookup_addr_br()` from `conn_internal.h` to `conn.h`. Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This commit is contained in:
parent
cb65dfbd2b
commit
18b0ac9b9a
4 changed files with 19 additions and 3 deletions
|
@ -95,6 +95,7 @@ New APIs and options
|
|||
* :c:func:`bt_le_get_local_features`
|
||||
* :c:func:`bt_le_bond_exists`
|
||||
* :c:func:`bt_br_bond_exists`
|
||||
* :c:func:`bt_conn_lookup_addr_br`
|
||||
|
||||
* Display
|
||||
|
||||
|
|
|
@ -2618,6 +2618,19 @@ struct bt_br_conn_param {
|
|||
struct bt_conn *bt_conn_create_br(const bt_addr_t *peer,
|
||||
const struct bt_br_conn_param *param);
|
||||
|
||||
/** @brief Look up an existing BR connection by address.
|
||||
*
|
||||
* Look up an existing BR connection based on the remote address.
|
||||
*
|
||||
* The caller gets a new reference to the connection object which must be
|
||||
* released with bt_conn_unref() once done using the object.
|
||||
*
|
||||
* @param peer Remote address.
|
||||
*
|
||||
* @return Connection object or NULL if not found.
|
||||
*/
|
||||
struct bt_conn *bt_conn_lookup_addr_br(const bt_addr_t *peer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -2391,6 +2391,11 @@ struct bt_conn *bt_conn_lookup_addr_br(const bt_addr_t *peer)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (peer == NULL) {
|
||||
LOG_DBG("Invalid peer address");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(acl_conns); i++) {
|
||||
struct bt_conn *conn = bt_conn_ref(&acl_conns[i]);
|
||||
|
||||
|
|
|
@ -423,9 +423,6 @@ void bt_sco_cleanup(struct bt_conn *sco_conn);
|
|||
/* Look up an existing sco connection by BT address */
|
||||
struct bt_conn *bt_conn_lookup_addr_sco(const bt_addr_t *peer);
|
||||
|
||||
/* Look up an existing connection by BT address */
|
||||
struct bt_conn *bt_conn_lookup_addr_br(const bt_addr_t *peer);
|
||||
|
||||
void bt_conn_disconnect_all(uint8_t id);
|
||||
|
||||
/* Allocate new connection object */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue