sjanc commented on code in PR #1599:
URL: https://github.com/apache/mynewt-nimble/pull/1599#discussion_r1403307125


##########
nimble/host/include/host/ble_gap.h:
##########
@@ -2682,6 +2682,17 @@ int ble_gap_set_path_loss_reporting_param(uint16_t 
conn_handle, uint8_t high_thr
                                           uint8_t high_hysteresis, uint8_t 
low_threshold,
                                           uint8_t low_hysteresis, uint16_t 
min_time_spent);
 #endif
+
+/**
+ * Set Data Related Address Changes Param
+ *
+ * @param adv_handle        Advertising handle
+ * @param change_reason     Reasons for refreshing addresses
+ *
+ * @return                  0 on success; nonzero on failure.
+ */
+int ble_gap_set_data_related_addr_change_param(uint8_t adv_handle, uint8_t 
change_reason);

Review Comment:
   since behavior is different if legacy commands are used I'd split this into 
two separate APIs and make parameters name follow other adv api conventions:
   ```
   struct ble_gap_adv_addr_change_params {
         unsigned int on_adv_data_change : 1;
         unsigned int on_scan_rsp_change : 1;
   }
   
   int ble_gap_ext_adv_set_data_related_addr_change(uint8_t instance,
                                                    const struct 
ble_gap_adv_addr_change_param *params);
   
   int ble_gap_adv_set_data_related_addr_change(const struct 
ble_gap_adv_addr_change_param *params);
   ```
   
   and put them under proper ifdef sections in headers and source code.
   Legacy variant can skipped as it is unlikely to be used anyway with legacy 
HCI.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to