[riot-notifications] [RIOT-OS/RIOT] net: add Skald, a BLE advertising stack (#8884)

Hauke Petersen notifications at github.com
Thu Apr 5 15:19:31 CEST 2018


haukepetersen commented on this pull request.



> +    /* schedule next advertising event, adding a random jitter between
+     * 0ms and 10ms (see spec v5.0-vol6-b-4.4.2.2.1) */
+    ctx->last += random_uint32_range(JITTER_MIN, JITTER_MAX);
+    /* compensate the time passed since the timer triggered last by using the
+     * current value of the timer */
+    xtimer_set(&ctx->timer, (ctx->last - xtimer_now_usec()));
+}
+
+static void _on_adv_evt(void *arg)
+{
+    skald_ctx_t *ctx = (skald_ctx_t *)arg;
+
+    /* advertise on the next adv channel - or skip this event if the radio is
+     * busy */
+    if (_radio->context != NULL) {
+

debugging leftover, removed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/8884#discussion_r179458637
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180405/037fbd73/attachment.html>


More information about the notifications mailing list