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

Francisco notifications at github.com
Tue May 5 11:20:13 CEST 2020

@fjmolinas commented on this pull request.

>  /**
  * @brief   Default ztimer microsecond clock
 extern ztimer_clock_t *const ZTIMER_USEC;
+ *
+ * @brief   The frequency of the base ztimer for ZTIMER_USEC
+ */
+#ifdef XTIMER_HZ

I didn't use an `extern uint32_t` because then you can't do compile checks in other places, e.g. I can't know if I need to `shift` or scale down the timer at compile time, I would have to have a `ztimer_convert_shift_t ` and `ztimer_convert_frac_t` and at runtime check the speed to know which one to use.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200505/859210d3/attachment-0001.htm>

More information about the notifications mailing list