2016-02-09 18:22:21 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Intel Corporation
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-02-09 18:22:21 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
struct bt_conn {
|
2017-04-21 01:00:29 +08:00
|
|
|
u16_t handle;
|
|
|
|
u8_t role;
|
2016-02-09 18:22:21 +08:00
|
|
|
atomic_t ref;
|
2016-02-15 18:39:29 +08:00
|
|
|
|
2016-02-10 01:13:11 +08:00
|
|
|
bt_addr_le_t dst;
|
2016-02-15 18:39:29 +08:00
|
|
|
|
2016-06-14 20:41:56 +08:00
|
|
|
bt_security_t sec_level;
|
|
|
|
bt_security_t required_sec_level;
|
|
|
|
|
2017-04-21 01:00:29 +08:00
|
|
|
u16_t interval;
|
|
|
|
u16_t latency;
|
|
|
|
u16_t timeout;
|
2016-02-17 17:32:11 +08:00
|
|
|
|
|
|
|
enum {
|
|
|
|
BT_CONN_DISCONNECTED,
|
|
|
|
BT_CONN_CONNECT,
|
|
|
|
BT_CONN_CONNECTED,
|
|
|
|
BT_CONN_DISCONNECT,
|
|
|
|
} state;
|
2016-02-18 22:47:53 +08:00
|
|
|
|
2016-05-12 20:22:42 +08:00
|
|
|
/* Delayed work used to update connection parameters */
|
2016-11-11 17:13:47 +08:00
|
|
|
struct k_delayed_work update_work;
|
2016-05-12 20:22:42 +08:00
|
|
|
|
2016-03-02 21:38:56 +08:00
|
|
|
void *gatt_private;
|
2016-10-27 17:51:07 +08:00
|
|
|
struct k_sem gatt_notif_sem;
|
2016-02-09 18:22:21 +08:00
|
|
|
};
|