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

Sebastian Meiling notifications at github.com
Wed Jan 16 11:46:42 CET 2019


smlng commented on this pull request.



> +
+static void init_or_reset(ltc4150_dev_t *dev, uint64_t now_usec, void *arg);
+static void pulse(ltc4150_dev_t *dev, ltc4150_dir_t dir, uint64_t now_usec,
+                  void *arg);
+
+const ltc4150_recorder_t ltc4150_last_minute = {
+    .reset = init_or_reset,
+    .pulse = pulse,
+};
+
+static void init_or_reset(ltc4150_dev_t *dev, uint64_t now_usec, void *arg)
+{
+    (void)dev;
+    ltc4150_last_minute_data_t *data = arg;
+
+    memset(data, 0, sizeof(ltc4150_last_minute_data_t));

agreed

-- 
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_r248232959
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190116/53a7a947/attachment.html>


More information about the notifications mailing list