Skip to content

Commit 7610829

Browse files
KyraLengfeldnordicjm
authored andcommitted
[nrf fromtree] Bluetooth: Host: improve GATT documentation
Clarifying `bt_gatt_attr` docs. Signed-off-by: Kyra Lengfeld <[email protected]> (cherry picked from commit c31b962)
1 parent aab91dc commit 7610829

File tree

1 file changed

+7
-7
lines changed
  • include/zephyr/bluetooth

1 file changed

+7
-7
lines changed

include/zephyr/bluetooth/gatt.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,6 @@ typedef ssize_t (*bt_gatt_attr_write_func_t)(struct bt_conn *conn,
217217
* While the formed GATT service is registered with the local
218218
* GATT server, pointers to this type can typically be given to
219219
* GATT server APIs, like bt_gatt_notify().
220-
*
221-
* @note This type is given as an argument to the
222-
* bt_gatt_discover() application callback, but it's not a
223-
* proper object of this type. The field @ref perm, and methods
224-
* read() and write() are not available, and it's unsound to
225-
* pass the pointer to GATT server APIs.
226220
*/
227221
struct bt_gatt_attr {
228222
/** @brief Attribute Type
@@ -235,7 +229,8 @@ struct bt_gatt_attr {
235229
* GATT Characteristic Presentation Format descriptor as
236230
* specified in Core Specification 3.G.3.3.3.5.
237231
*
238-
* You can define a new Attribute Type.
232+
* You can define a new Attirubute Type for your application specific
233+
* use by generating a new UUID for it.
239234
*/
240235
const struct bt_uuid *uuid;
241236

@@ -1700,6 +1695,11 @@ struct bt_gatt_discover_params;
17001695
*
17011696
* The attribute object as well as its UUID and value objects are temporary and
17021697
* must be copied to in order to cache its information.
1698+
*
1699+
* @note @ref bt_gatt_attr is given as an argument to bt_gatt_discover(), but
1700+
* it's not a proper object of this type. @ref bt_gatt_attr.perm, and methods
1701+
* bt_gatt_attr.read() and bt_gatt_attr.write() are not available, and it's
1702+
* unsound to pass the pointer to GATT server APIs.
17031703
* Only the following fields of the attribute contains valid information:
17041704
* - uuid UUID representing the type of attribute.
17051705
* - handle Handle in the remote database.

0 commit comments

Comments
 (0)