Skip to content

Commit f2af4a7

Browse files
carlescufijhedberg
authored andcommitted
Bluetooth: host: document the connection states
Connection states are non-trivial to understand based on their names only, so add short descriptions in the header file explaining what they do. Signed-off-by: Carles Cufi <[email protected]>
1 parent 410c02a commit f2af4a7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

subsys/bluetooth/host/conn_internal.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
#include <zephyr/bluetooth/iso.h>
1313

1414
typedef enum __packed {
15-
BT_CONN_DISCONNECTED,
16-
BT_CONN_DISCONNECT_COMPLETE,
17-
BT_CONN_CONNECTING_SCAN,
18-
BT_CONN_CONNECTING_AUTO,
19-
BT_CONN_CONNECTING_ADV,
20-
BT_CONN_CONNECTING_DIR_ADV,
21-
BT_CONN_CONNECTING,
22-
BT_CONN_CONNECTED,
23-
BT_CONN_DISCONNECTING,
15+
BT_CONN_DISCONNECTED, /* Disconnected, conn is completely down */
16+
BT_CONN_DISCONNECT_COMPLETE, /* Received disconn comp event, transition to DISCONNECTED */
17+
BT_CONN_CONNECTING_SCAN, /* Central passive scanning */
18+
BT_CONN_CONNECTING_AUTO, /* Central connection establishment w/ filter */
19+
BT_CONN_CONNECTING_ADV, /* Peripheral connectable advertising */
20+
BT_CONN_CONNECTING_DIR_ADV, /* Peripheral directed advertising */
21+
BT_CONN_CONNECTING, /* Central connection establishment */
22+
BT_CONN_CONNECTED, /* Peripheral or Central connected */
23+
BT_CONN_DISCONNECTING, /* Peripheral or Central issued disconnection command */
2424
} bt_conn_state_t;
2525

2626
/* bt_conn flags: the flags defined here represent connection parameters */

0 commit comments

Comments
 (0)