You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/11/15 10:15:56 UTC

[GitHub] [mynewt-nimble] michal-narajowski commented on a change in pull request #651: Support for BT 5.1 periodic sync transfer

michal-narajowski commented on a change in pull request #651: Support for BT 5.1 periodic sync transfer
URL: https://github.com/apache/mynewt-nimble/pull/651#discussion_r346750930
 
 

 ##########
 File path: nimble/host/include/host/ble_gap.h
 ##########
 @@ -1379,6 +1424,64 @@ int ble_gap_periodic_adv_create_sync_cancel(void);
  */
 int ble_gap_periodic_adv_terminate_sync(uint16_t sync_handle);
 
+#if MYNEWT_VAL(BLE_PERIODIC_ADV_SYNC_TRANSFER)
+/**
+ * Disable or enable periodic reports for specified sync.
+ *
+ * @param sync_handle        Handle identifying synchronization.
+ * @param enable             If reports should be enabled.
+ *
+ * @return                   0 on success; nonzero on failure.
+ */
+int ble_gap_periodic_adv_receive_enable(uint16_t sync_handle, bool enable);
+
+/**
+ * Initialize sync transfer procedure for specified handles.
+ *
+ * @param sync_handle        Handle identifying synchronization.
+ * @param conn_handle        Handle identifying connection.
+ * @param service_data       Sync transfer service data
+ *
+ * @return                   0 on success; nonzero on failure.
+ */
+int ble_gap_periodic_adv_transfer_sync(uint16_t sync_handle,
+                                       uint16_t conn_handle,
+                                       uint16_t service_data);
+
+/**
+ * Initialize set info transfer procedure for specified handles.
+ *
+ * @param instance           Advertising instance with periodic adv enabled.
+ * @param conn_handle        Handle identifying connection.
+ * @param service_data       Sync transfer service data
+ *
+ * @return                   0 on success; nonzero on failure.
+ */
+int ble_gap_periodic_adv_transfer_set_info(uint8_t instance,
+                                           uint16_t conn_handle,
+                                           uint16_t service_data);
+
+/**
+ * Enables or disables sync transfer reception on specified connection.
+ * When BLE_GAP_EVENT_PERIODIC_TRANSFER is sent transfer reception is terminated
+ * on that connection.
+ *
+ * @param conn_handle        Handle identifying connection.
+ * @param params             Parameters for enabled sync transfer reception.
+ *                           Specify NULL to disable reception.
+ * @param cb                 The callback to associate with this synchronization
+ *                           procedure. BLE_GAP_EVENT_PERIODIC_REPORT events
+ *                           are reported only by this callback.
+ * @param cb_arg             The optional argument to pass to the callback
+ *                           function.
+ *
+ * @return                   0 on success; nonzero on failure.
+ */
+int ble_gap_periodic_adv_transfer(uint16_t conn_handle,
 
 Review comment:
   The name does not really indicate that this function can be used to receive sync transfer. I would change it to something like ble_gap_periodic_adv_transfer_receive().

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services