[riot-notifications] [RIOT-OS/RIOT] sys/ztimer: expose ZTIMER_MSEC/USEC_BASE (#13990)

Juergen Fitschen notifications at github.com
Tue May 5 16:39:56 CEST 2020


@jue89 requested changes on this pull request.

First of all: A nice side effect of your PR: `auto_init.c` becomes more readable :)

I cannot test you PR right now. But I have minor comments related to the documentation and style.

> +
+#ifndef ZTIMER_CONFIG_H
+#define ZTIMER_CONFIG_H
+
+#include "board.h"
+#include "periph_conf.h"
+
+#include "ztimer.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * @brief   Use periph_timer as the base timer for ZTIMER_USEC
+ *

Empty line -> Could be removed

> @@ -513,6 +513,41 @@ extern ztimer_clock_t *const ZTIMER_USEC;
  */
 extern ztimer_clock_t *const ZTIMER_MSEC;
 
+/**
+ * @brief   Base ztimer for the microsecond clock (ZTIMER_USEC)
+ *
+ * This ztimer will reference the counter device object at the end of the
+ * chain of ztimer_clock_t for ZTIMER_USEC.
+ *
+ * If the base counter device object's frequency (CONFIG_ZTIMER_USEC_BASE_FREQ)
+ * is not 1Mhz then ZTIMER_USEC will be converted on top of this one. Otherwise

1Mhz -> 1MHz

> + * @brief   The minimum pm mode required for the clock to run.
+ *

Empty line -> Could be removed

Furthermore, I would rephrase this to "The minimum pm mode required for ZTIMER_USEC to run."

> +/**
+ * @brief   The minimum pm mode required for the clock to run
+ */

Insert an empty line above this block.

Rephrase to "The minimum pm mode required for ZTIMER_MSEC to run."

-- 
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/13990#pullrequestreview-405833345
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200505/0a72afc7/attachment.htm>


More information about the notifications mailing list