Skip to content

Commit b2d21f9

Browse files
alwa-nordickartben
authored andcommitted
Bluetooth: Host: Improve documentation of bt_le_ext_adv_start_param
This clarifies the documentation of `bt_le_ext_adv_start_param` and `bt_le_ext_adv_cb.sent`, and links them by via references. Signed-off-by: Aleksander Wasaznik <[email protected]>
1 parent 1d65c4c commit b2d21f9

File tree

1 file changed

+45
-17
lines changed

1 file changed

+45
-17
lines changed

include/zephyr/bluetooth/bluetooth.h

+45-17
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,12 @@ struct bt_df_per_adv_sync_iq_samples_report;
9595
* @note Used in @ref bt_le_ext_adv_cb.
9696
*/
9797
struct bt_le_ext_adv_sent_info {
98-
/** The number of advertising events completed. */
98+
/**
99+
* If the advertising set was started with a non-zero
100+
* @ref bt_le_ext_adv_start_param.num_events, this field
101+
* contains the number of times this advertising set has
102+
* been sent since it was enabled.
103+
*/
99104
uint8_t num_sent;
100105
};
101106

@@ -193,12 +198,11 @@ struct bt_le_per_adv_response_info {
193198
*/
194199
struct bt_le_ext_adv_cb {
195200
/**
196-
* @brief The advertising set has finished sending adv data.
201+
* @brief The advertising set was disabled after reaching limit
197202
*
198-
* This callback notifies the application that the advertising set has
199-
* finished sending advertising data.
200-
* The advertising set can either have been stopped by a timeout or
201-
* because the specified number of advertising events has been reached.
203+
* This callback is invoked when the limit set in
204+
* @ref bt_le_ext_adv_start_param.timeout or
205+
* @ref bt_le_ext_adv_start_param.num_events is reached.
202206
*
203207
* @param adv The advertising set object.
204208
* @param info Information about the sent event.
@@ -1554,24 +1558,48 @@ int bt_le_ext_adv_create(const struct bt_le_adv_param *param,
15541558
*/
15551559
struct bt_le_ext_adv_start_param {
15561560
/**
1557-
* @brief Advertiser timeout (N * 10 ms).
1561+
* @brief Maximum advertising set duration (N * 10 ms)
1562+
*
1563+
* The advertising set can be automatically disabled after a
1564+
* certain amount of time has passed since it first appeared on
1565+
* air.
1566+
*
1567+
* Set to zero for no limit. Set in units of 10 ms.
15581568
*
1559-
* Application will be notified by the advertiser sent callback.
1560-
* Set to zero for no timeout.
1569+
* When the advertising set is automatically disabled because of
1570+
* this limit, @ref bt_le_ext_adv_cb.sent will be called.
15611571
*
1562-
* When using high duty cycle directed connectable advertising then
1563-
* this parameters must be set to a non-zero value less than or equal
1564-
* to the maximum of @ref BT_GAP_ADV_HIGH_DUTY_CYCLE_MAX_TIMEOUT.
1572+
* When using high duty cycle directed connectable advertising
1573+
* then this parameters must be set to a non-zero value less
1574+
* than or equal to the maximum of
1575+
* @ref BT_GAP_ADV_HIGH_DUTY_CYCLE_MAX_TIMEOUT.
15651576
*
1566-
* If privacy @kconfig{CONFIG_BT_PRIVACY} is enabled then the timeout
1567-
* must be less than @kconfig{CONFIG_BT_RPA_TIMEOUT}.
1577+
* If privacy @kconfig{CONFIG_BT_PRIVACY} is enabled then the
1578+
* timeout must be less than @kconfig{CONFIG_BT_RPA_TIMEOUT}.
1579+
*
1580+
* For background information, see parameter "Duration" in
1581+
* Bluetooth Core Specification Version 6.0 Vol. 4 Part E,
1582+
* Section 7.8.56.
15681583
*/
15691584
uint16_t timeout;
1585+
15701586
/**
1571-
* @brief Number of advertising events.
1587+
* @brief Maximum number of extended advertising events to be
1588+
* sent
1589+
*
1590+
* The advertiser can be automatically disabled once the whole
1591+
* advertisement (i.e. extended advertising event) has been sent
1592+
* a certain number of times. The number of advertising PDUs
1593+
* sent may be higher and is not relevant.
1594+
*
1595+
* Set to zero for no limit.
1596+
*
1597+
* When the advertising set is automatically disabled because of
1598+
* this limit, @ref bt_le_ext_adv_cb.sent will be called.
15721599
*
1573-
* Application will be notified by the advertisement sent callback, once num_events are
1574-
* reached. Set to zero for no limit.
1600+
* For background information, see parameter
1601+
* "Max_Extended_Advertising_Events" in Bluetooth Core
1602+
* Specification Version 6.0 Vol. 4 Part E, Section 7.8.56.
15751603
*/
15761604
uint8_t num_events;
15771605
};

0 commit comments

Comments
 (0)