[riot-notifications] [RIOT-OS/RIOT] drivers/ltc4150: (Re-)implemented driver for the LTC4150 coulomb counter (#10755)

Marian Buschsieweke notifications at github.com
Wed Jan 16 11:28:31 CET 2019


maribu commented on this pull request.



> +static void spin(uint32_t seconds)
+{
+    uint32_t till = xtimer_now_usec() + US_PER_SEC * seconds;
+    while (xtimer_now_usec() < till) { }
+}
+
+/**
+ * @brief Thread that will put three levels of CPU load on the MCU
+ */
+static void *busy_thread(void *arg)
+{
+    (void)arg;
+    while (1) {
+        /* one minute of ~0% CPU usage */
+        LED0_OFF;
+        LED1_OFF;

True. But this wouldn't be a problem:

https://github.com/RIOT-OS/RIOT/blob/d9be2491441c51f7945dbfd0d7fb77e7cbc60bea/drivers/include/led.h#L45-L55

(Sure, defining them to be e.g. `(void)0` would still be better, as this would still require a semicolon after the cpp macro. But this will also just work on boards with one or zero LEDs.)

-- 
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/10755#discussion_r248227124
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190116/7602b6a5/attachment-0001.html>


More information about the notifications mailing list