Bluetooth: BR/EDR: Introduce bt_conn_add_br() routine

Adds routine to allow early initialization of connection object.

Change-Id: Icfa4a00732e631571a42dfd50f87b0779ea7f9a9
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
Arkadiusz Lichwa 2015-11-25 11:51:25 +01:00 committed by Anas Nashif
commit 7422e70c37
2 changed files with 22 additions and 0 deletions

View file

@ -533,6 +533,22 @@ struct bt_conn *bt_conn_add_le(const bt_addr_le_t *peer)
return conn;
}
#if defined(CONFIG_BLUETOOTH_BREDR)
struct bt_conn *bt_conn_add_br(const bt_addr_t *peer)
{
struct bt_conn *conn = conn_new();
if (!conn) {
return NULL;
};
bt_addr_copy(&conn->br.dst, peer);
conn->type = BT_CONN_TYPE_BREDR;
return conn;
}
#endif
static void timeout_fiber(int arg1, int arg2)
{
struct bt_conn *conn = (struct bt_conn *)arg1;