sjanc commented on a change in pull request #354: nimble/ll: Add support for 
periodic advertising
URL: https://github.com/apache/mynewt-nimble/pull/354#discussion_r272577993
 
 

 ##########
 File path: nimble/controller/src/ble_ll_sched.c
 ##########
 @@ -892,6 +892,83 @@ ble_ll_sched_adv_new(struct ble_ll_sched_item *sch, 
ble_ll_sched_adv_new_cb cb,
     return 0;
 }
 
+int
+ble_ll_sched_periodic_adv(struct ble_ll_sched_item *sch, uint32_t *start,
+                          bool after_overlap)
+{
+    int rc;
+    os_sr_t sr;
+    uint32_t adv_start;
+    uint32_t duration;
+    struct ble_ll_sched_item *entry;
+#ifdef BLE_XCVR_RFCLK
+    struct ble_ll_sched_item *orig = sch;
+#endif
+
+    /* Get length of schedule item */
+    duration = sch->end_time - sch->start_time;
+
+    OS_ENTER_CRITICAL(sr);
+    entry = ble_ll_sched_insert_if_empty(sch);
+    if (!entry) {
+        rc = 0;
 
 Review comment:
   no,  this is used to schedule all periodic events and  we want to fail (and 
skip event) if after_overlap is false and we overlap

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to