From 1a967ab23aece2bbce32e7d5c549ecdb099fb13d Mon Sep 17 00:00:00 2001
From: smlng <s@mlng.net>
Date: Mon, 3 Jul 2017 19:52:49 +0200
Subject: [PATCH] sys: enhance trickle docu

---
 sys/include/trickle.h | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/sys/include/trickle.h b/sys/include/trickle.h
index e8155b6c27..bad2118102 100644
--- a/sys/include/trickle.h
+++ b/sys/include/trickle.h
@@ -12,9 +12,14 @@
 /**
  * @defgroup sys_trickle Trickle Timer
  * @ingroup sys
+ * @brief   Implementation of a generic Trickle Algorithm (RFC 6206)
+ *
+ * @see https://tools.ietf.org/html/rfc6206
+ *
  * @{
+ *
  * @file
- * @brief   Implementation of a generic Trickle Algorithm (RFC 6206)
+ * @brief   Trickle timer interface definition
  *
  * @author  Eric Engel <eric.engel@fu-berlin.de>
  * @author  Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
@@ -31,29 +36,31 @@
 #include "thread.h"
 
 /**
- * @brief a generic callback function with arguments that is called by
- *        trickle periodically
+ * @brief Trickle callback function with arguments
  */
 typedef struct {
     void (*func)(void *);       /**< callback function pointer */
     void *args;                 /**< callback function arguments */
 } trickle_callback_t;
 
-/** @brief all state variables for a trickle timer */
+/**
+ * @brief all state variables of a trickle timer
+ */
 typedef struct {
     uint8_t k;                      /**< redundancy constant */
-    uint8_t Imax;                   /**< maximum interval size, described as doublings */
+    uint8_t Imax;                   /**< maximum interval size,
+                                         described as of Imin doublings */
     uint16_t c;                     /**< counter */
     uint32_t Imin;                  /**< minimum interval size */
     uint32_t I;                     /**< current interval size */
     uint32_t t;                     /**< time within the current interval */
     kernel_pid_t pid;               /**< pid of trickles target thread */
-    trickle_callback_t callback;    /**< the callback function and parameter that trickle is calling
-                                         after each interval */
+    trickle_callback_t callback;    /**< callback function and parameter that
+                                         trickle calls after each interval */
     msg_t msg;                      /**< the msg_t to use for intervals */
     uint64_t msg_time;              /**< interval in ms */
-    xtimer_t msg_timer;             /**< xtimer to send a msg_t to the target thread
-                                         for a new interval */
+    xtimer_t msg_timer;             /**< xtimer to send a msg_t to the target
+                                         thread for a new interval */
 } trickle_t;
 
 /**
@@ -106,7 +113,7 @@ void trickle_increment_counter(trickle_t *trickle);
 void trickle_interval(trickle_t *trickle);
 
 /**
- * @brief is called after the callback interval is over and calls the callback function
+ * @brief is called after the interval is over and executes callback function
  *
  * @param[in] trickle   trickle timer
  */
-- 
GitLab