-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: Host: improve GATT documentation #86359
base: main
Are you sure you want to change the base?
Bluetooth: Host: improve GATT documentation #86359
Conversation
Great! Will do a proper review once it passes CI. Did you use https://docs.zephyrproject.org/api-coverage/latest/zephyr/bluetooth/gatt.h.gcov.html to find the missing parts? |
The gatt docs are very sparce, this commit adds imrpovements for the GATT server API part. Others will follow. Signed-off-by: Kyra Lengfeld <[email protected]>
80ba50d
to
6df1842
Compare
Nope :) but we should probably use that once all our planned additions are in to double check. (We tried splitting our planned doc improvements into trivial chunks. So there will be a handful more small PRs coming anyway.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks OK; some non-blocking comments
@@ -645,7 +648,7 @@ typedef uint8_t (*bt_gatt_attr_func_t)(const struct bt_gatt_attr *attr, | |||
* Iterate attributes in the given range matching given UUID and/or data. | |||
* | |||
* @param start_handle Start handle. | |||
* @param end_handle End handle. | |||
* @param end_handle End handle. Often set to start_handle + attr_count or 0xFFFF. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could consider referring to BT_ATT_LAST_ATTRIBUTE_HANDLE
instead of 0xFFFF
/** | ||
* @brief Gatt Characterisitc Initialization Macro. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The style in this file seems to be to have @brief
on the same line as /**
* \internal | ||
* @note Only use this with attributes which user_data is a _bt_gatt_ccc. | ||
* _bt_gatt_ccc being the internal representation of CCC value. | ||
* \endinternal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK the way to make things internal is to use @cond INTERNAL_HIDDEN
+ @endcond
. @kartben please verify
* See also @ref bt_gatt_notify_cb and @ref bt_gatt_notify_multiple, using this parameter. | ||
* | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* See also @ref bt_gatt_notify_cb and @ref bt_gatt_notify_multiple, using this parameter. | |
* | |
*/ | |
* See also @ref bt_gatt_notify_cb and @ref bt_gatt_notify_multiple, using this parameter. | |
*/ |
#if defined(CONFIG_BT_EATT) | ||
/** Att channel options. Only available if @kconfig{CONFIG_BT_EATT} is set. */ | ||
enum bt_att_chan_opt chan_opt; | ||
#endif /* CONFIG_BT_EATT */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe outside the scope of this PR, but AFAIk we need to do something like
#if defined(CONFIG_BT_EATT) || defined(__DOXYGEN__)
to ensure that they are in the Doxygen documentation when they are otherwise guarded. @kartben please verify
The gatt docs are very sparce, this commit adds imrpovements for the GATT server API part. Others will follow.