Bluetooth: Add bt_conn_get_dst function
This function allows to pick connection destination address. Change-Id: I3e4959eec00905c64de3d8b9ef810b613c2e9f91 Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
This commit is contained in:
parent
b40b3363e4
commit
441e01ec04
2 changed files with 13 additions and 0 deletions
|
@ -69,6 +69,14 @@ void bt_conn_put(struct bt_conn *conn);
|
||||||
*/
|
*/
|
||||||
struct bt_conn *bt_conn_lookup_addr_le(const bt_addr_le_t *peer);
|
struct bt_conn *bt_conn_lookup_addr_le(const bt_addr_le_t *peer);
|
||||||
|
|
||||||
|
/*! @brief Get destination (peer) address of a connection.
|
||||||
|
*
|
||||||
|
* @param conn Connection object.
|
||||||
|
*
|
||||||
|
* @return Destination address.
|
||||||
|
*/
|
||||||
|
const bt_addr_le_t *bt_conn_get_dst(const struct bt_conn *conn);
|
||||||
|
|
||||||
/*! Connection callback structure */
|
/*! Connection callback structure */
|
||||||
struct bt_conn_cb {
|
struct bt_conn_cb {
|
||||||
void (*connected)(struct bt_conn *conn);
|
void (*connected)(struct bt_conn *conn);
|
||||||
|
|
|
@ -351,3 +351,8 @@ void bt_conn_put(struct bt_conn *conn)
|
||||||
|
|
||||||
conn->handle = 0;
|
conn->handle = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bt_addr_le_t *bt_conn_get_dst(const struct bt_conn *conn)
|
||||||
|
{
|
||||||
|
return &conn->dst;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue