zephyr/doc/reference/bluetooth/connection_mgmt.rst
Ulf Magnusson 984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00

32 lines
1.3 KiB
ReStructuredText

.. _bluetooth_connection_mgmt:
Connection Management
#####################
The Zephyr Bluetooth stack uses an abstraction called :c:type:`bt_conn`
to represent connections to other devices. The internals of this struct
are not exposed to the application, but a limited amount of information
(such as the remote address) can be acquired using the
:cpp:func:`bt_conn_get_info` API. Connection objects are reference
counted, and the application is expected to use the
:cpp:func:`bt_conn_ref` API whenever storing a connection pointer for a
longer period of time, since this ensures that the object remains valid
(even if the connection would get disconnected). Similarly the
:cpp:func:`bt_conn_unref` API is to be used when releasing a reference
to a connection.
An application may track connections by registering a
:c:type:`bt_conn_cb` struct using the :cpp:func:`bt_conn_cb_register`
API. This struct lets the application define callbacks for connection &
disconnection events, as well as other events related to a connection
such as a change in the security level or the connection parameters.
When acting as a central the application will also get hold of the
connection object through the return value of the
:cpp:func:`bt_conn_create_le` API.
API Reference
*************
.. doxygengroup:: bt_conn
:project: Zephyr