Skip to content
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 bluetooth documentation #87220

Merged

Conversation

KyraLengfeld
Copy link
Collaborator

This commit imrpoves the bluetooth.h documentation by adding @Briefs and @details to all the structs and enums lacking such, as well as clarifying the existing documentation.

@KyraLengfeld KyraLengfeld force-pushed the improve_bluetooth_docs branch 3 times, most recently from 74446e9 to 95b7924 Compare March 18, 2025 08:36
Copy link
Member

@hermabe hermabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two pawr-related comments

* - Acceptance of a new connection
* - Transmission of scan response data
* - If PAwR (Periodic Advertising with Response) is enabled:
* - Expiration of the advertising set's validity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesnt look correct to me. There are two PAwR related callbacks, pawr_data_request and pawr_response. These are just forwarding the HCI events "LE Periodic Advertising Subevent Data Request event" and "LE Periodic Advertising Response Report event".

Copy link
Collaborator Author

@KyraLengfeld KyraLengfeld Mar 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a look, but this specifically is basically paraphrased from the elements of the structure itself (maybe wrongly). Will double check and request your review. Edit: I see now that I slipped in lines while I made that, the Expiration is part of when privacy is enabled not PAwR, will fix.

* @details This struct provides the necessary information to set the data for a specific subevent
* in a Periodic Advertising with Response (PAwR) scenario. It specifies the subevent number, the
* range of response slots to listen to, and the actual data to send. This is used to respond to
* data request from an advertiser by sending back the data in the specified subevent slots.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"subevent slots" is a bit unclear. "slots" is generally used for response slots, we can probably just use "subevent" here.

@@ -1641,7 +1641,7 @@ uint16_t bt_gatt_get_uatt_mtu(struct bt_conn *conn);

/** @brief GATT Exchange MTU parameters
*
* Used with @ref bt_gatt_exchange_mtu() to initiate an MTU exchange. The
* Used with @ref bt_gatt_exchange_mtu function to initiate an MTU exchange. The
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this file you've replace () with @ref when you fixed it.

Should we decide on one approach when referring to functions? It seem we are doing a mix of () and @ref. Doesn't need to be done in this PR though

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kartben I can't find any doxygen documentation guidelines on https://docs.zephyrproject.org/latest/contribute/documentation/guidelines.html - Should we have any?

Copy link
Collaborator Author

@KyraLengfeld KyraLengfeld Mar 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I just removed the () in the gatt.h file, because I added those instances with @ref and () recently myself.

This commit imrpoves the bluetooth.h documentation by adding @Briefs and
@details to all the structs and enums lacking such, as well as
clarifying the existing documentation.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
@KyraLengfeld KyraLengfeld force-pushed the improve_bluetooth_docs branch from 95b7924 to 7256c00 Compare March 18, 2025 10:07
@KyraLengfeld KyraLengfeld requested a review from hermabe March 18, 2025 10:07
@kartben kartben merged commit 2ae4110 into zephyrproject-rtos:main Mar 19, 2025
20 checks passed
@KyraLengfeld KyraLengfeld deleted the improve_bluetooth_docs branch March 19, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants